Skip to content

Commit

Permalink
add publint to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jan 21, 2023
1 parent c947355 commit a7235f5
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
"compat-hermes": "zx tests/compat/hermes-adapter.mjs",
"compat-node": "node tests/compat/node-runner",
"compat-rhino": "zx tests/compat/rhino-adapter.mjs --version=1.7.14",
"lint": "run-s init test-lint",
"test": "run-s init test-lint bundle test-unit test-promises test-observables test-entries test-compat-data test-compat-tools test-builder check",
"test-lint": "npm run zxi tests/eslint/runner.mjs",
"lint": "run-s init test-eslint bundle test-publint",
"test": "run-s init test-eslint bundle test-publint test-unit test-promises test-observables test-entries test-compat-data test-compat-tools test-builder check",
"test-eslint": "npm run zxi tests/eslint/runner.mjs",
"test-publint": "npm run zxi tests/publint/runner.mjs",
"test-unit": "run-s test-unit-karma test-unit-node",
"test-unit-karma": "npm run zxi cd tests/unit-karma/runner.mjs",
"test-unit-node": "npm run zxi tests/unit-node/runner.mjs",
Expand Down
194 changes: 194 additions & 0 deletions tests/publint/package-lock.json

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

6 changes: 6 additions & 0 deletions tests/publint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "tests/publint",
"devDependencies": {
"publint": "^0.1.8"
}
}
7 changes: 7 additions & 0 deletions tests/publint/runner.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { cyan, green } = chalk;
const start = Date.now();
const pkgs = await fs.readdir('packages');

await Promise.all(pkgs.map(pkg => $`publint packages/${ pkg }`));

echo(green(`\npublint check passed in ${ cyan((Date.now() - start) / 1000) } seconds`));

0 comments on commit a7235f5

Please sign in to comment.