Skip to content

Commit

Permalink
add: vitest eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng committed Aug 23, 2024
1 parent efe5cd9 commit ecb2636
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
'plugin:react-hooks/recommended',
'plugin:vitest-globals/recommended',
],
plugins: ['react', 'react-hooks', 'header'],
plugins: ['react', 'react-hooks', 'header', 'vitest'],
settings: {
react: {
version: 'detect',
Expand Down Expand Up @@ -66,6 +66,16 @@ module.exports = {
],
},
overrides: [
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
plugins: ['vitest'],
rules: {
'vitest/expect-expect': 'off',
'vitest/no-disabled-tests': 'warn',
'vitest/no-focused-tests': 'error',
'vitest/no-identical-title': 'error',
},
},
{
files: ['vite-env.d.ts'],
rules: {
Expand Down
122 changes: 122 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"eslint-plugin-vitest": "^0.5.4",
"eslint-plugin-vitest-globals": "^1.5.0",
"husky": "^2.7.0",
"jest-styled-components": "^7.2.0",
Expand Down

0 comments on commit ecb2636

Please sign in to comment.