-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
43 lines (43 loc) · 1.23 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
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
env: {
browser: true
},
root: true,
ignorePatterns: ['*.cjs', '*.d.ts'],
rules: {
'indent': ['error', 2],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'jsx-quotes': ['error', 'prefer-single'],
'space-infix-ops': 'error',
'keyword-spacing': 'error',
'eol-last': 'error',
'comma-dangle': ['error', {
'arrays': 'never',
'objects': 'only-multiline',
'imports': 'never',
'exports': 'never',
'functions': 'never'
}],
'object-curly-spacing': 'error',
'space-before-function-paren': ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'arrow-spacing': 'error',
'@typescript-eslint/type-annotation-spacing': ['error', {
before: false,
after: true,
overrides: {
arrow: {before: true, after: true}
}
}],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
overrides: [{
files: ["**/*.jsx", "**/*.tsx"]
}]
};