Skip to content

Commit cd2f5b2

Browse files
committed
chore: disallow .only test to be commited
1 parent a3511ba commit cd2f5b2

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

eslint.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ export default pionxzh(
2626
files: ['packages/unminify/**/*.spec.ts'],
2727
rules: {
2828
'style/indent': ['error', 2],
29+
'no-restricted-syntax': [
30+
'warn',
31+
{
32+
selector: 'CallExpression[callee.property.name=\'only\']',
33+
message: '`.only` tests are used for local tests only',
34+
},
35+
],
2936
},
3037
},
3138
{

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"test:update": "turbo run test:update",
2121
"test:watch": "turbo run test:watch",
2222
"test:type": "turbo run test:type",
23-
"lint": "turbo run lint",
24-
"lint:fix": "turbo run lint:fix",
23+
"lint": "turbo run lint --max-warnings=0",
24+
"lint:fix": "turbo run lint:fix --max-warnings=0",
2525
"bump-deps": "pnpm exec taze",
2626
"generate:pretty-testcases": "esno scripts/pretty-testcases.ts"
2727
},

0 commit comments

Comments
 (0)