|
17 | 17 | "@typescript-eslint/adjacent-overload-signatures": "error",
|
18 | 18 | "@typescript-eslint/array-type": "error",
|
19 | 19 |
|
20 |
| - "camelcase": "off", |
21 |
| - "@typescript-eslint/camelcase": ["error", { "properties": "never", "allow": ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"] }], |
| 20 | + "brace-style": "off", |
| 21 | + "@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }], |
| 22 | + |
| 23 | + "@typescript-eslint/naming-convention": [ |
| 24 | + "error", |
| 25 | + { "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } }, |
| 26 | + { "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false }, "filter": { "regex": "^I(Arguments|TextWriter|O([A-Z][a-z]+[A-Za-z]*)?)$", "match": false } }, |
| 27 | + { "selector": "variable", "format": ["camelCase", "PascalCase", "UPPER_CASE"], "leadingUnderscore": "allow", "filter": { "regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$", "match": false } }, |
| 28 | + { "selector": "function", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, |
| 29 | + { "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$", "match": false } }, |
| 30 | + { "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, |
| 31 | + { "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, |
| 32 | + { "selector": "enumMember", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, |
| 33 | + { "selector": "property", "format": null } |
| 34 | + ], |
22 | 35 |
|
23 |
| - "@typescript-eslint/class-name-casing": "error", |
24 | 36 | "@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
25 |
| - "@typescript-eslint/interface-name-prefix": "error", |
| 37 | + "@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as" }], |
| 38 | + |
| 39 | + "no-duplicate-imports": "off", |
| 40 | + "@typescript-eslint/no-duplicate-imports": "error", |
| 41 | + |
26 | 42 | "@typescript-eslint/no-inferrable-types": "error",
|
27 | 43 | "@typescript-eslint/no-misused-new": "error",
|
28 | 44 | "@typescript-eslint/no-this-alias": "error",
|
| 45 | + |
| 46 | + "no-unused-expressions": "off", |
| 47 | + "@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }], |
| 48 | + |
29 | 49 | "@typescript-eslint/prefer-for-of": "error",
|
30 | 50 | "@typescript-eslint/prefer-function-type": "error",
|
31 | 51 | "@typescript-eslint/prefer-namespace-keyword": "error",
|
|
36 | 56 | "semi": "off",
|
37 | 57 | "@typescript-eslint/semi": "error",
|
38 | 58 |
|
| 59 | + "space-before-function-paren": "off", |
| 60 | + "@typescript-eslint/space-before-function-paren": ["error", { |
| 61 | + "asyncArrow": "always", |
| 62 | + "anonymous": "always", |
| 63 | + "named": "never" |
| 64 | + }], |
| 65 | + |
39 | 66 | "@typescript-eslint/triple-slash-reference": "error",
|
40 | 67 | "@typescript-eslint/type-annotation-spacing": "error",
|
41 | 68 | "@typescript-eslint/unified-signatures": "error",
|
|
54 | 81 | "simple-indent": "error",
|
55 | 82 | "debug-assert": "error",
|
56 | 83 | "no-keywords": "error",
|
| 84 | + "one-namespace-per-file": "error", |
57 | 85 |
|
58 | 86 | // eslint-plugin-import
|
59 | 87 | "import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
|
|
65 | 93 | "jsdoc/check-alignment": "error",
|
66 | 94 |
|
67 | 95 | // eslint
|
68 |
| - "brace-style": ["error", "stroustrup", { "allowSingleLine": true }], |
69 | 96 | "constructor-super": "error",
|
70 | 97 | "curly": ["error", "multi-line"],
|
71 | 98 | "dot-notation": "error",
|
|
74 | 101 | "new-parens": "error",
|
75 | 102 | "no-caller": "error",
|
76 | 103 | "no-duplicate-case": "error",
|
77 |
| - "no-duplicate-imports": "error", |
78 | 104 | "no-empty": "error",
|
79 | 105 | "no-eval": "error",
|
80 | 106 | "no-extra-bind": "error",
|
|
96 | 122 | "no-trailing-spaces": "error",
|
97 | 123 | "no-undef-init": "error",
|
98 | 124 | "no-unsafe-finally": "error",
|
99 |
| - "no-unused-expressions": ["error", { "allowTernary": true }], |
100 | 125 | "no-unused-labels": "error",
|
101 | 126 | "no-var": "error",
|
102 | 127 | "object-shorthand": "error",
|
|
0 commit comments