|
1 | 1 | {
|
2 | 2 | "extends": ["plugin:@typescript-eslint/recommended"],
|
3 | 3 | "parser": "@typescript-eslint/parser",
|
4 |
| - "plugins": ["import", "@typescript-eslint", "mocha", "prettier"], |
| 4 | + "plugins": ["@typescript-eslint", "import", "mocha", "prettier"], |
5 | 5 | "parserOptions": {
|
6 | 6 | "ecmaVersion": 8
|
7 | 7 | },
|
|
49 | 49 | "rules": {
|
50 | 50 | "@typescript-eslint/no-var-requires": "off"
|
51 | 51 | }
|
| 52 | + }, |
| 53 | + { |
| 54 | + "files": ["**/*.ts"], |
| 55 | + "rules": { |
| 56 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 57 | + "@typescript-eslint/no-explicit-any": "off" |
| 58 | + } |
52 | 59 | }
|
53 | 60 | ],
|
54 | 61 | "rules": {
|
55 | 62 | "array-bracket-newline": ["error", "consistent"],
|
56 | 63 | "block-spacing": ["error", "always"],
|
57 | 64 | "brace-style": ["error", "1tbs"],
|
58 |
| - "camelcase": ["error", { "properties": "always" }], |
59 | 65 | "comma-dangle": [
|
60 | 66 | "error",
|
61 | 67 | {
|
|
66 | 72 | "functions": "always-multiline"
|
67 | 73 | }
|
68 | 74 | ],
|
69 |
| - "comma-spacing": ["error", { "before": false, "after": true }], |
70 |
| - "curly": ["error", "all"], |
71 |
| - "eqeqeq": ["error", "always"], |
72 |
| - "eol-last": ["error", "always"], |
73 |
| - "lines-around-comment": [ |
| 75 | + "comma-spacing": [ |
74 | 76 | "error",
|
75 | 77 | {
|
76 |
| - "beforeBlockComment": true |
| 78 | + "before": false, |
| 79 | + "after": true |
77 | 80 | }
|
78 | 81 | ],
|
| 82 | + "curly": ["error", "all"], |
| 83 | + "eqeqeq": ["error", "always"], |
| 84 | + "eol-last": ["error", "always"], |
79 | 85 | "lines-between-class-members": [
|
80 | 86 | "error",
|
81 | 87 | "always",
|
82 | 88 | {
|
83 | 89 | "exceptAfterSingleLine": true
|
84 | 90 | }
|
85 | 91 | ],
|
86 |
| - "max-statements-per-line": ["error", { "max": 1 }], |
| 92 | + "max-statements-per-line": [ |
| 93 | + "error", |
| 94 | + { |
| 95 | + "max": 1 |
| 96 | + } |
| 97 | + ], |
87 | 98 | "multiline-ternary": ["error", "always-multiline"],
|
88 |
| - "new-cap": ["error", { "newIsCap": true, "capIsNew": true, "properties": true }], |
| 99 | + "new-cap": [ |
| 100 | + "error", |
| 101 | + { |
| 102 | + "newIsCap": true, |
| 103 | + "capIsNew": true, |
| 104 | + "properties": true |
| 105 | + } |
| 106 | + ], |
89 | 107 | "new-parens": ["error"],
|
90 |
| - "newline-per-chained-call": ["error"], |
91 | 108 | "no-array-constructor": ["error"],
|
92 | 109 | "no-console": ["off"],
|
93 |
| - "no-dupe-args": "off", // doesn't play nice with decorators in constructors |
94 |
| - "no-else-return": ["error", { "allowElseIf": false }], |
| 110 | + "no-dupe-args": "off", |
| 111 | + // doesn't play nice with decorators in constructors |
| 112 | + "no-else-return": [ |
| 113 | + "error", |
| 114 | + { |
| 115 | + "allowElseIf": false |
| 116 | + } |
| 117 | + ], |
| 118 | + "no-inferrable-types": "off", |
95 | 119 | "no-invalid-this": ["error"],
|
96 | 120 | "no-magic-numbers": [
|
97 | 121 | "error",
|
|
115 | 139 | "no-new-func": ["error"],
|
116 | 140 | "no-lonely-if": ["error"],
|
117 | 141 | "no-multi-assign": ["error"],
|
118 |
| - "no-redeclare": "off", // doesn't play nice with decorators in constructors |
| 142 | + "no-redeclare": "off", |
| 143 | + // doesn't play nice with decorators in constructors |
119 | 144 | "no-unneeded-ternary": ["error"],
|
120 | 145 | "no-var": ["error"],
|
121 | 146 | "no-whitespace-before-property": ["error"],
|
122 |
| - "object-curly-newline": ["error", { "multiline": true, "consistent": true }], |
| 147 | + "object-curly-newline": [ |
| 148 | + "error", |
| 149 | + { |
| 150 | + "multiline": true, |
| 151 | + "consistent": true |
| 152 | + } |
| 153 | + ], |
123 | 154 | "one-var-declaration-per-line": ["error", "initializations"],
|
124 | 155 | "prefer-const": "error",
|
125 | 156 | "prefer-rest-params": "error",
|
126 | 157 | "prefer-spread": "error",
|
127 |
| - "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], |
| 158 | + "quotes": [ |
| 159 | + "error", |
| 160 | + "single", |
| 161 | + { |
| 162 | + "avoidEscape": true, |
| 163 | + "allowTemplateLiterals": true |
| 164 | + } |
| 165 | + ], |
128 | 166 | "rest-spread-spacing": ["error", "never"],
|
129 | 167 | "semi": ["error", "never"],
|
130 | 168 | "space-in-parens": ["error", "never"],
|
131 | 169 | "spaced-comment": ["error", "always"],
|
132 |
| - |
133 | 170 | "import/order": [
|
134 | 171 | "error",
|
135 | 172 | {
|
136 | 173 | "alphabetize": {
|
137 | 174 | "order": "asc",
|
138 | 175 | "caseInsensitive": false
|
139 | 176 | },
|
140 |
| - "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], |
| 177 | + "groups": ["builtin", "external", "internal", "parent", "index", "sibling", "object"], |
| 178 | + "pathGroups": [ |
| 179 | + { |
| 180 | + "pattern": "@dandi/**", |
| 181 | + "group": "builtin", |
| 182 | + "position": "before" |
| 183 | + }, |
| 184 | + { |
| 185 | + "pattern": "@dandi-contrib/**", |
| 186 | + "group": "builtin", |
| 187 | + "position": "after" |
| 188 | + } |
| 189 | + ], |
141 | 190 | "newlines-between": "always-and-inside-groups"
|
142 | 191 | }
|
143 | 192 | ],
|
144 |
| - |
145 | 193 | "@typescript-eslint/ban-types": ["off"],
|
146 |
| - "@typescript-eslint/class-name-casing": ["error"], |
147 |
| - "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }], |
148 |
| - "@typescript-eslint/generic-type-naming": ["error", "^T(?:[A-Z][a-zA-Z]+)*$"], |
| 194 | + "@typescript-eslint/explicit-function-return-type": [ |
| 195 | + "error", |
| 196 | + { |
| 197 | + "allowExpressions": true |
| 198 | + } |
| 199 | + ], |
149 | 200 | "@typescript-eslint/indent": ["off"],
|
150 |
| - "@typescript-eslint/member-delimiter-style": ["error", { "multiline": { "delimiter": "none" } }], |
151 |
| - "@typescript-eslint/no-inferrable-types": ["error", { "ignoreParameters": true, "ignoreProperties": true }], |
152 |
| - "@typescript-eslint/no-explicit-any": ["off"], |
| 201 | + "@typescript-eslint/member-delimiter-style": [ |
| 202 | + "error", |
| 203 | + { |
| 204 | + "multiline": { |
| 205 | + "delimiter": "none" |
| 206 | + } |
| 207 | + } |
| 208 | + ], |
| 209 | + "@typescript-eslint/naming-convention": [ |
| 210 | + "error", |
| 211 | + { "selector": "typeParameter", "format": ["PascalCase"], "prefix": ["T"] } |
| 212 | + ], |
| 213 | + "@typescript-eslint/no-extra-semi": ["off"], |
153 | 214 | "@typescript-eslint/no-unused-vars": ["error"],
|
154 | 215 | "@typescript-eslint/no-use-before-define": [
|
155 | 216 | "error",
|
156 |
| - { "functions": false, "classes": false, "variables": true, "enums": true } |
| 217 | + { |
| 218 | + "functions": false, |
| 219 | + "classes": false, |
| 220 | + "variables": true, |
| 221 | + "enums": true |
| 222 | + } |
157 | 223 | ],
|
158 | 224 | "@typescript-eslint/semi": ["error", "never"]
|
159 | 225 | }
|
|
0 commit comments