forked from yihong0618/running_page
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.cjs
More file actions
75 lines (73 loc) · 1.64 KB
/
eslint.config.cjs
File metadata and controls
75 lines (73 loc) · 1.64 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
const tsParser = require('@typescript-eslint/parser');
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const globals = require('globals');
const react = require('eslint-plugin-react');
const prettier = require('eslint-plugin-prettier');
const js = require('@eslint/js');
module.exports = [
js.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
parser: tsParser,
globals: {
...globals.browser,
NodeJS: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
'@typescript-eslint': tsPlugin,
react,
prettier,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
// React recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
// Custom rules
'prettier/prettier': 'off',
'react/prop-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
},
{
ignores: [
'**/node_modules/',
'**/dist/',
'**/pyproject.toml',
'**/LICENSE',
'**/*lock.*',
'**/*.html',
'**/*.md',
'**/*.css',
'**/*.svg',
'**/*.png',
'**/*.jpg',
'**/*.ico',
'**/*.lock',
'**/*.min.js',
],
},
];