Skip to content

Commit

Permalink
Add publint
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins committed May 29, 2023
1 parent 3920fca commit dfa47ba
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"nx-cloud": "^16.0.5",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.0",
"publint": "^0.1.12",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^4.1.2",
Expand Down
43 changes: 43 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions scripts/validate-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import path from 'node:path'
import fsp from 'node:fs/promises'
import jsonfile from 'jsonfile'
import { publint } from 'publint'
import { packages, rootDir } from './config.mjs'

async function run() {
Expand Down Expand Up @@ -53,6 +54,12 @@ async function run() {
} catch (err) {
failedValidations.push(`Missing build file: ${filePath}`)
}

const publintResult = await publint({ pkgDir: pkg.packageDir })

publintResult.forEach((message) => {
console.log(`Publint warning: ${JSON.stringify(message, null, 2)}`)
})
}),
)
console.info('')
Expand Down

0 comments on commit dfa47ba

Please sign in to comment.