forked from json-schema-org/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
62 lines (60 loc) · 1.86 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
module.exports = {
env: {
es2021: true,
node: true,
browser: true,
"cypress/globals": true
},
settings: {
react: {
version: 'detect',
},
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:@next/next/recommended',
'plugin:prettier/recommended',
'plugin:cypress/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'prettier', 'cypress'],
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', process.platform === 'win32' ? 'windows' : 'unix'],
quotes: ['error', 'single'],
'jsx-quotes': ['error', 'prefer-single'],
'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/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',
'arrow-spacing': 'error',
},
};