Skip to content

Commit

Permalink
chore: disallow .only test to be commited
Browse files Browse the repository at this point in the history
  • Loading branch information
pionxzh committed May 26, 2024
1 parent a3511ba commit cd2f5b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export default pionxzh(
files: ['packages/unminify/**/*.spec.ts'],
rules: {
'style/indent': ['error', 2],
'no-restricted-syntax': [
'warn',
{
selector: 'CallExpression[callee.property.name=\'only\']',
message: '`.only` tests are used for local tests only',
},
],
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"test:update": "turbo run test:update",
"test:watch": "turbo run test:watch",
"test:type": "turbo run test:type",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"lint": "turbo run lint --max-warnings=0",
"lint:fix": "turbo run lint:fix --max-warnings=0",
"bump-deps": "pnpm exec taze",
"generate:pretty-testcases": "esno scripts/pretty-testcases.ts"
},
Expand Down

0 comments on commit cd2f5b2

Please sign in to comment.