-
Notifications
You must be signed in to change notification settings - Fork 39
/
.eslintrc.js
89 lines (88 loc) · 2.71 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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require("path");
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
ignorePatterns: [
"services/minespace-web/webpack.config.ts",
"services/minespace-web/cypress.config.ts",
"services/minespace-web/cypress/**",
"services/core-web/webpack.config.ts",
"services/core-web/webpack.parts.js",
"services/core-web/cypress.config.ts",
"services/core-web/cypress/**",
"services/common/jest.polyfills.js",
"services/minespace-web/jest.polyfills.js",
"services/core-web/jest.polyfills.js",
"services/core-web/jest.config.js",
"services/core-web/runner/server.js",
"services/minespace-web/runner/server.js",
],
parserOptions: {
project: [
"./services/common/tsconfig.json",
"./services/minespace-web/tsconfig.json",
"./services/core-web/tsconfig.json",
],
},
env: {
browser: true,
node: true,
"jest/globals": true,
es6: true,
},
plugins: ["jest", "@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"airbnb-typescript",
"prettier",
],
settings: {
"import/parser": {
"typescript-eslint-parser": [".ts", ".tsx"],
},
"import/resolver": {
alias: {
map: [
["@", path.join(__dirname, "src")],
["vendor", path.join(__dirname, "vendor")],
["@common", path.join(__dirname, "common")],
],
extensions: [".js", ".json", ".ts", ".tsx"],
},
},
},
rules: {
"react/jsx-filename-extension": "off",
"no-case-declarations": 0,
"react/display-name": 0,
"react/no-deprecated": 0,
"import/no-named-as-default": 0,
// TODO: fix unresolved imports for eslint with @common aliases
"import/no-unresolved": 0,
"import/extensions": 0,
"react/jsx-props-no-spreading": "off",
"jsx-a11y/anchor-is-valid": 0,
"react/destructuring-assignment": "off",
camelcase: 0,
"jsx-a11y/label-has-for": 0, // deprecated rule
"import/no-cycle": 0,
"no-param-reassign": 0,
"no-shadow": 0,
"@typescript-eslint/no-shadow": 1,
"@typescript-eslint/no-unused-vars": 1,
"import/no-extraneous-dependencies": 0,
"@typescript-eslint/quotes": [0, "double"],
"@typescript-eslint/indent": [0, 4],
"@typescript-eslint/comma-dangle": 0,
"@typescript-eslint/naming-convention": 0,
"react/prop-types": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/default-param-last": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-children-prop": 0,
"@typescript-eslint/lines-between-class-members": 0,
},
};