forked from json-schema-org/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (69 loc) · 2.03 KB
/
.eslintrc.js
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
module.exports = {
env: {
es2021: true,
node: true,
browser: true
},
settings: {
react: {
version: 'detect'
}
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:@next/next/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: 'module'
},
plugins: [
'react',
'@typescript-eslint'
],
rules: {
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'react/jsx-curly-spacing': ['error', { 'when': 'never', 'children': true }],
'indent': ['error', 2, { 'SwitchCase': 1 }],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'jsx-quotes': ['error', 'prefer-single'],
'semi': ['error', 'never'],
'no-eval': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': ['error', { 'ignoreRestSiblings': true }],
'@typescript-eslint/member-delimiter-style': ['error', {
'singleline': {
'delimiter': 'comma',
'requireLast': false
},
'multiline': {
'delimiter': 'none',
'requireLast': false
}
}],
'@typescript-eslint/type-annotation-spacing': ['error'],
'react/no-unescaped-entities': 'off',
'react/jsx-tag-spacing': 'error',
'react-hooks/exhaustive-deps': 'off',
'keyword-spacing': ['error', { 'before': true, 'after': true }],
'comma-spacing': ['error', { 'before': false, 'after': true }],
'key-spacing': ['error', { 'beforeColon': false, 'afterColon': true }],
'@next/next/no-img-element': 'off',
'no-multi-spaces': 'error',
'space-infix-ops': 'error',
'space-before-blocks': 'error',
'nonblock-statement-body-position': 'error',
'arrow-spacing': 'error'
}
}