-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
46 lines (44 loc) · 1.24 KB
/
eslint.config.js
File metadata and controls
46 lines (44 loc) · 1.24 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
46
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
// TypeScript specific rules
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'on',
'@typescript-eslint/no-empty-function': 'off',
'react/jsx-filename-extension': [
'warn',
{ extensions: ['.jsx', '.tsx', '.ts'] },
], // Allow jsx syntax in .jsx and .tsx files
'react/jsx-props-no-spreading': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
// General JavaScript/ESLint rules
'no-console': 'warn',
eqeqeq: ['error', 'always'],
curly: 'error',
'no-trailing-spaces': 'error',
'eol-last': ['error', 'always'],
indent: ['error', 2, { SwitchCase: 1 }],
quotes: ['error', 'single'],
semi: ['error', 'always'], // Require
},
settings: {
react: {
version: 'detect',
},
},
};