Skip to content

Commit

Permalink
Update ESLint configuration with Jest rules
Browse files Browse the repository at this point in the history
  • Loading branch information
qvkare committed Dec 26, 2024
1 parent fb028d0 commit b183c67
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jest/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
plugins: ['@typescript-eslint', 'react', 'react-hooks', 'jest'],
env: {
browser: true,
es2021: true,
Expand All @@ -24,6 +25,11 @@ module.exports = {
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }]
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'jest/expect-expect': 'warn',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error'
}
};
27 changes: 27 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 @@ -32,6 +32,7 @@
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.10.0",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-hooks": "^5.1.0",
"husky": "^8.0.3",
Expand Down

0 comments on commit b183c67

Please sign in to comment.