-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
50 lines (50 loc) · 1.53 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist'],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: [
'@html-eslint',
'@stylistic',
'@typescript-eslint',
'react',
'react-refresh',
],
overrides: [
{
files: ['*.html'],
parser: '@html-eslint/parser',
extends: ['plugin:@html-eslint/recommended'],
},
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
extends: ['plugin:react/recommended'],
}
],
rules: {
'@html-eslint/indent': ['error', 2],
'@html-eslint/quotes': ['error', 'single'],
'@stylistic/array-bracket-spacing': ['error', 'never'],
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/eol-last': ['error', 'always'],
'@stylistic/indent': ['error', 2],
'@stylistic/jsx-quotes': ['error', 'prefer-single'],
'@stylistic/max-len': ['error', 120],
'@stylistic/no-trailing-spaces': ['error'],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'always'],
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
globals: { 'module': true },
}