Skip to content

Commit 400a436

Browse files
authored
Merge pull request #27 from Novage/feat/switch-to-eslint
Switch to eslint
2 parents f7295f7 + ebcf13b commit 400a436

17 files changed

+2100
-650
lines changed

.eslintrc.js

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
module.exports = {
2+
"env": {
3+
"es2017": true,
4+
"node": true,
5+
},
6+
"parserOptions": {
7+
"project": "tsconfig.lint.json",
8+
"sourceType": "module",
9+
},
10+
"plugins": [
11+
"prefer-arrow"
12+
],
13+
"extends": [
14+
"eslint:all",
15+
"plugin:@typescript-eslint/all",
16+
"plugin:import/errors",
17+
"plugin:import/warnings",
18+
"plugin:import/typescript",
19+
],
20+
"rules": {
21+
"import/order": "error",
22+
"prefer-arrow/prefer-arrow-functions": ["error", { "allowStandaloneDeclarations": true }],
23+
24+
"@typescript-eslint/no-extra-parens": "off",
25+
"@typescript-eslint/no-magic-numbers": "off",
26+
"@typescript-eslint/no-parameter-properties": "off",
27+
"@typescript-eslint/no-non-null-assertion": "off",
28+
"@typescript-eslint/typedef": "off",
29+
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
30+
"@typescript-eslint/space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
31+
"@typescript-eslint/no-use-before-define": ["error", { "classes": false, "functions": false }],
32+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
33+
"@typescript-eslint/restrict-template-expressions": ["error", { "allowNumber": true }],
34+
35+
"max-len": ["error", { "code": 160 }],
36+
"object-curly-spacing": ["error", "always"],
37+
"quote-props": ["error", "consistent-as-needed"],
38+
"object-shorthand": ["error", "never"],
39+
"one-var": ["error", "never"],
40+
"comma-dangle": ["error", {
41+
"arrays": "always-multiline",
42+
"objects": "always-multiline",
43+
"imports": "always-multiline",
44+
"exports": "always-multiline",
45+
"functions": "always-multiline",
46+
}],
47+
"array-element-newline": ["error", "consistent"],
48+
"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
49+
"max-statements": ["error", 30],
50+
"max-lines": ["error", { "max": 500 }],
51+
"function-paren-newline": ["error", "multiline-arguments"],
52+
"operator-linebreak": ["error", "before"],
53+
54+
"padded-blocks": "off",
55+
"max-classes-per-file": "off",
56+
"lines-between-class-members": "off",
57+
"function-call-argument-newline": "off",
58+
"class-methods-use-this": "off",
59+
"no-undefined": "off",
60+
"no-ternary": "off",
61+
"multiline-ternary": "off",
62+
"no-extra-parens": "off",
63+
"no-magic-numbers": "off",
64+
"func-names": "off",
65+
"no-undef-init": "off",
66+
"prefer-destructuring": "off",
67+
"newline-per-chained-call": "off",
68+
"capitalized-comments": "off",
69+
"line-comment-position": "off",
70+
"no-inline-comments": "off",
71+
"sort-imports": "off",
72+
"no-warning-comments": "off",
73+
"max-params": "off",
74+
"sort-keys": "off",
75+
"func-style": "off",
76+
"id-length": "off",
77+
"multiline-comment-style": "off",
78+
"no-continue": "off",
79+
"no-use-before-define": "off",
80+
"init-declarations": "off",
81+
"no-plusplus": "off",
82+
"no-invalid-this": "off",
83+
"max-lines-per-function": "off",
84+
},
85+
};

0 commit comments

Comments
 (0)