Skip to content

Commit

Permalink
feat: eslint add vitest rules
Browse files Browse the repository at this point in the history
  • Loading branch information
zzxming committed Sep 2, 2024
1 parent 7769032 commit eeb97d9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
11 changes: 11 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ import { factory } from '@zzxming/eslint-config';

export default factory({
tailwindcss: true,
vitest: {
files: ['**/__tests__/*.{test,spec}.?([cm])[jt]s?(x)', '**/__tests__/*.{test,spec}-d.?([cm])[jt]s?(x)'],
},
overrides: [
{
rules: {
'ts/no-unused-expressions': 'off',

'vitest/prefer-lowercase-title': 'off',
},
},
{
files: ['**/__tests__/*.{test,spec}-d.?([cm])[jt]s?(x)'],
rules: {
'vitest/expect-expect': 'off',
},
},
],
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/eslint-plugin": "^1.1.0",
"@vitest/ui": "^1.6.0",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.0",
"@zzxming/eslint-config": "^0.0.12",
"@zzxming/eslint-config": "^0.0.14",
"cdx-component": "workspace:^",
"consola": "^3.2.3",
"eslint": "^9.3.0",
Expand Down
36 changes: 30 additions & 6 deletions pnpm-lock.yaml

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

0 comments on commit eeb97d9

Please sign in to comment.