generated from UniversityOfHelsinkiCS/toskaboiler
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.js
90 lines (90 loc) · 2.49 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
module.exports = {
extends: [
'airbnb',
'prettier',
'plugin:cypress/recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
],
plugins: ['import', 'react', 'react-hooks', 'jsx-a11y', 'prettier', 'cypress'],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
},
rules: {
semi: 'off',
indent: 'off',
'max-len': [1, 400],
'no-shadow': 0,
'no-plusplus': 0,
'no-alert': 'off',
'no-unused-vars': 'warn',
'arrow-body-style': 'warn',
'no-param-reassign': 'off',
'no-restricted-exports': 'off',
'no-restricted-syntax': 'off',
'no-await-in-loop': 'off',
'spaced-comment': 'off',
'import/no-unused-modules': [1, { unusedExports: true, missingExports: false }],
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
'import/no-unused-modules': 'off',
'react/display-name': 'off',
'react/prop-types': [
1,
{
skipUndeclared: true,
},
],
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/no-array-index-key': 'off',
'react/destructuring-assignment': 'warn',
'react/no-unstable-nested-components': 'warn',
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/jsx-boolean-value': 'warn',
'react/jsx-curly-brace-presence': 'warn',
'react/jsx-props-no-spreading': 'off',
},
overrides: [
{
files: ['./**/*.ts', './**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./src/client/tsconfig.json', './src/server/tsconfig.json'],
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'airbnb-typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
semi: 'off',
quotes: ['error', 'single'],
'linebreak-style': ['error', 'unix'],
'no-use-before-define': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/comma-dangle': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
},
},
],
}