-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.eslintrc.js
71 lines (67 loc) · 2.04 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true
},
extends: [
'eslint:recommended',
],
rules: {
"semi": ["warn", "always"],
"quotes": ["warn", "double"],
"no-constant-condition": ["warn", { checkLoops: false }],
"arrow-parens": ["warn", "as-needed"],
"curly": ["warn", "multi-line", "consistent"],
"indent": ["warn", 2, { SwitchCase: 1 }],
"no-console": ["warn", { allow: ["error", "warn"] }],
"object-shorthand": ["warn", "always", { avoidQuotes: true }],
"quote-props": ["warn", "consistent-as-needed"],
"no-useless-rename": "warn",
"sort-imports": ["warn", {
ignoreDeclarationSort: true
}],
},
overrides: [
{
files: ["rollup.config.js"],
parserOptions: { sourceType: "module" },
},
// The default TS config.
{
files: ["*.ts", "*.tsx"],
parser: '@typescript-eslint/parser',
parserOptions: { project: "tsconfig.json" },
plugins: [
'@typescript-eslint',
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
"@typescript-eslint/member-delimiter-style": ["warn", {
multiline: { delimiter: "comma" },
singleline: { delimiter: "comma" },
overrides: {
interface: { multiline: { delimiter: "semi" } },
},
}],
"@typescript-eslint/no-inferrable-types": ["warn", {
ignoreParameters: true,
ignoreProperties: true,
}],
"@typescript-eslint/no-empty-function": ["warn", {
allow: ["methods"],
}],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-member-accessibility": ["warn"],
// Use Typescript's unused variable warnings instead
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars-experimental": "warn",
},
},
]
};