mirror of
https://github.com/sakaljurgis/best-choice.git
synced 2026-07-08 21:47:40 +00:00
43 lines
965 B
JavaScript
43 lines
965 B
JavaScript
import js from '@eslint/js';
|
|
import reactPlugin from 'eslint-plugin-react';
|
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: ['node_modules', 'dist', 'build', 'server/dist', 'client/dist']
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
files: ['client/**/*.{ts,tsx,js,jsx}'],
|
|
plugins: {
|
|
react: reactPlugin,
|
|
'react-hooks': reactHooksPlugin
|
|
},
|
|
languageOptions: {
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true
|
|
}
|
|
}
|
|
},
|
|
rules: {
|
|
'react/react-in-jsx-scope': 'off',
|
|
'react/jsx-uses-react': 'off',
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
'react-hooks/exhaustive-deps': 'warn'
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
rules: {
|
|
quotes: ['error', 'single', { allowTemplateLiterals: true }]
|
|
}
|
|
}
|
|
);
|