-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
45 lines (44 loc) · 1.23 KB
/
eslint.config.js
File metadata and controls
45 lines (44 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const reactPlugin = require('eslint-plugin-react');
const reactHooksPlugin = require('eslint-plugin-react-hooks');
const prettierConfig = require('eslint-config-prettier');
const tseslint = require('typescript-eslint');
module.exports = tseslint.config(
{
ignores: ['dist/**', 'node_modules/**', 'build/**', 'releasenotes/**', 'src-tauri/target/**'],
},
...tseslint.configs.recommended,
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
plugins: {
react: reactPlugin,
'react-hooks': reactHooksPlugin,
},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
window: 'readonly',
document: 'readonly',
process: 'readonly',
__dirname: 'readonly',
},
},
rules: {
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
...prettierConfig.rules,
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'off',
},
settings: {
react: {
version: 'detect',
},
},
}
);