Skip to content

Commit

Permalink
chore(frontend): migrate to new ESLint config format
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed May 23, 2024
1 parent b936293 commit 8901d5f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 24 deletions.
24 changes: 0 additions & 24 deletions frontend/.eslintrc.js

This file was deleted.

37 changes: 37 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const js = require('@eslint/js');
const prettier = require('eslint-config-prettier');
const reactRecommended = require('eslint-plugin-react/configs/recommended');
const reactJSXRuntime = require('eslint-plugin-react/configs/jsx-runtime');
const reactHooks = require('eslint-plugin-react-hooks');
const typescript = require('typescript-eslint').default;

module.exports = [
js.configs.recommended,
reactRecommended,
reactJSXRuntime,
...typescript.configs.recommended,
prettier,
{
plugins: {
'react-hooks': reactHooks,
},
settings: {
react: {
version: "detect"
}
},
rules: {
'react/prop-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
eqeqeq: ['warn', 'smart'],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: '(useRecoilCallback|useRecoilTransaction_UNSTABLE)',
},
],
}
}
]

0 comments on commit 8901d5f

Please sign in to comment.