-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc
118 lines (118 loc) · 3.88 KB
/
.eslintrc
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
"plugin:react/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"ignorePatterns": [
"config/",
"coverage/",
"dist/",
"node_modules/",
"src/frontend/javascript/",
"src/components/calculator/pegjsGrammerParser.js"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"project": true,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"functional",
"import",
"jsx-a11y",
"react"
],
"root": true,
"rules": {
"@typescript-eslint/array-type": ["error", {"default": "generic", "readonly": "generic"}],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-types": ["error", {"types": {"{}": false, "object": false}}],
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/naming-convention": ["warn", {"selector": "interface", "format": ["PascalCase"], "custom": {"regex": "^I[A-Z]", "match": true}}],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/promise-function-async": "error",
"arrow-parens": ["error", "as-needed"],
"comma-dangle": ["error", "always-multiline"],
"functional/no-let": "warn",
"functional/prefer-readonly-type": ["warn", {"ignoreClass": true}],
"import/no-amd": "error",
"import/no-commonjs": "error",
"import/order": ["warn", {"alphabetize": {"order": "asc", "caseInsensitive": true}, "newlines-between": "always"}],
"jsx-quotes": ["error", "prefer-double"],
"jsx-a11y/no-noninteractive-tabindex": "warn",
"jsx-a11y/no-redundant-roles": ["error", {"details": ["group"]}],
"linebreak-style": ["error", "unix"],
"max-len": ["warn", {"code": 120}],
"newline-before-return": "warn",
"no-case-declarations": "warn",
"no-console": "warn",
"no-delete-var": "error",
"no-eval": "error",
"no-octal": "error",
"no-param-reassign": "error",
"no-sequences": "error",
"no-trailing-spaces": "warn",
"no-unused-expressions": "warn",
"object-curly-spacing": ["warn", "always"],
"prefer-const": "warn",
"prefer-object-spread": "warn",
"prefer-template": "warn",
"quotes": ["warn", "single"],
"react/no-danger": "error",
"require-await": "error",
"semi": ["warn", "always"],
"sort-imports": ["warn", {"ignoreCase": true, "ignoreDeclarationSort": true}],
"sort-keys": ["warn", "asc", {"caseSensitive": false, "natural": false, "minKeys": 2}],
"use-isnan": "error"
},
"overrides": [
{
"files": [
"acceptance-tests/**/*.test.{ts,tsx,js,jsx}",
"src/**/*.test.{ts,tsx,js,jsx}",
"stub-api/**/*.{ts,tsx,js,jsx}"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"functional/functional-parameters": "off",
"functional/no-let": "off",
"functional/prefer-readonly-type": "off",
"jsx-a11y/anchor-is-valid": "off",
"no-empty-pattern": "off"
}
}
],
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
}
}