@newsteam/eslint-config 0.0.207 → 0.0.209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,21 +5,6 @@ exports.typescriptOverrides = {
5
5
  files: ["*.ts", "*.tsx"],
6
6
  // Overridden by @typescript-eslint
7
7
  rules: {
8
- "@stylistic/block-spacing": "off",
9
- "@stylistic/brace-style": "off",
10
- "@stylistic/comma-dangle": "off",
11
- "@stylistic/key-spacing": "off",
12
- "@stylistic/keyword-spacing": "off",
13
- "@stylistic/lines-around-comment": "off",
14
- "@stylistic/lines-between-class-members": "off",
15
- "@stylistic/no-extra-parens": "off",
16
- "@stylistic/no-extra-semi": "off",
17
- "@stylistic/padding-line-between-statements": "off",
18
- "@stylistic/quotes": "off",
19
- "@stylistic/semi": "off",
20
- "@stylistic/space-before-blocks": "off",
21
- "@stylistic/space-before-function-paren": "off",
22
- "@stylistic/space-infix-ops": "off",
23
8
  camelcase: "off",
24
9
  "default-param-last": "off",
25
10
  "dot-notation": "off",
@@ -9,7 +9,9 @@ declare const _default: {
9
9
  "import/max-dependencies": (string | {
10
10
  max: number;
11
11
  })[];
12
- "import/newline-after-import": string;
12
+ "import/newline-after-import": (string | {
13
+ count: number;
14
+ })[];
13
15
  "import/no-anonymous-default-export": (string | {
14
16
  allowObject: boolean;
15
17
  })[];
@@ -80,7 +80,12 @@ module.exports = {
80
80
  *
81
81
  * https://github.com/benmosher/eslint-plugin-import/blob/HEAD/docs/rules/newline-after-import.md
82
82
  */
83
- "import/newline-after-import": "error",
83
+ "import/newline-after-import": [
84
+ "error",
85
+ {
86
+ count: 2,
87
+ }
88
+ ],
84
89
  /*
85
90
  * Forbid anonymous values as default exports
86
91
  *
@@ -123,7 +123,7 @@ var rules = {
123
123
  * Require or disallow spacing between function identifiers and their
124
124
  * invocations
125
125
  *
126
- * https://eslint.style/rules/default/func-call-spacing
126
+ * https://eslint.style/rules/default/function-call-spacing
127
127
  */
128
128
  "@stylistic/function-call-spacing": "error",
129
129
  /*
@@ -64,18 +64,6 @@ var rules = {
64
64
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md
65
65
  */
66
66
  "@typescript-eslint/ban-types": "error",
67
- /*
68
- * Disallow or enforce spaces inside of blocks after opening block and before closing block.
69
- *
70
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/block-spacing.md
71
- */
72
- "@typescript-eslint/block-spacing": "error",
73
- /*
74
- * Enforce consistent brace style for blocks
75
- *
76
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md
77
- */
78
- "@typescript-eslint/brace-style": "error",
79
67
  /*
80
68
  * Ensures that literals on classes are exposed in a consistent style
81
69
  *
@@ -88,30 +76,6 @@ var rules = {
88
76
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/class-methods-use-this.md
89
77
  */
90
78
  "@typescript-eslint/class-methods-use-this": "error",
91
- /*
92
- * Require or disallow trailing comma
93
- *
94
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md
95
- */
96
- "@typescript-eslint/comma-dangle": [
97
- "error",
98
- {
99
- arrays: "never",
100
- enums: "never",
101
- exports: "never",
102
- functions: "never",
103
- generics: "ignore",
104
- imports: "never",
105
- objects: "always-multiline",
106
- tuples: "never",
107
- }
108
- ],
109
- /*
110
- * Enforces consistent spacing before and after commas
111
- *
112
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md
113
- */
114
- "@typescript-eslint/comma-spacing": "error",
115
79
  /*
116
80
  * Enforces specifying generic type arguments on type annotation or constructor name of a constructor call.
117
81
  *
@@ -201,28 +165,6 @@ var rules = {
201
165
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
202
166
  */
203
167
  "@typescript-eslint/explicit-module-boundary-types": "error",
204
- /*
205
- * Require or disallow spacing between function identifiers and their invocations
206
- *
207
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md
208
- */
209
- "@typescript-eslint/func-call-spacing": "error",
210
- /*
211
- * Enforce consistent indentation
212
- *
213
- * This is off because it's handled by @stylistic,
214
- * and in some cases it can conflict.
215
- *
216
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md
217
- */
218
- "@typescript-eslint/indent": [
219
- "off",
220
- settings_1.indentSpaces,
221
- {
222
- MemberExpression: 0,
223
- SwitchCase: 1,
224
- }
225
- ],
226
168
  /*
227
169
  * Require or disallow initialization in variable declarations
228
170
  *
@@ -232,103 +174,6 @@ var rules = {
232
174
  "error",
233
175
  "always"
234
176
  ],
235
- /*
236
- * Enforce consistent spacing between keys and values in object literal properties
237
- *
238
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/key-spacing.md
239
- */
240
- "@typescript-eslint/key-spacing": [
241
- "error",
242
- {
243
- afterColon: true,
244
- beforeColon: false,
245
- mode: "strict",
246
- }
247
- ],
248
- /*
249
- * Enforce consistent spacing before and after keywords
250
- *
251
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md
252
- */
253
- "@typescript-eslint/keyword-spacing": [
254
- "error",
255
- {
256
- after: true,
257
- before: true,
258
- overrides: {
259
- case: {
260
- before: false,
261
- },
262
- catch: {
263
- after: false,
264
- before: false,
265
- },
266
- class: {
267
- after: false,
268
- before: false,
269
- },
270
- const: {
271
- before: false,
272
- },
273
- else: {
274
- after: false,
275
- before: false,
276
- },
277
- export: {
278
- before: false,
279
- },
280
- finally: {
281
- after: false,
282
- before: false,
283
- },
284
- for: {
285
- after: false,
286
- },
287
- if: {
288
- after: false,
289
- },
290
- import: {
291
- before: false,
292
- },
293
- let: {
294
- before: false,
295
- },
296
- return: {
297
- before: false,
298
- },
299
- switch: {
300
- after: false,
301
- },
302
- this: {
303
- after: false,
304
- },
305
- try: {
306
- after: false,
307
- },
308
- while: {
309
- after: false,
310
- },
311
- },
312
- }
313
- ],
314
- /*
315
- * This rule extends the base eslint/lines-around-comment rule. It adds support for TypeScript syntax.
316
- *
317
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-around-comment.md
318
- */
319
- "@typescript-eslint/lines-around-comment": "error",
320
- /*
321
- * Require or disallow an empty line between class members
322
- *
323
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md
324
- */
325
- "@typescript-eslint/lines-between-class-members": [
326
- "error",
327
- "always",
328
- {
329
- exceptAfterSingleLine: true,
330
- }
331
- ],
332
177
  /*
333
178
  *
334
179
  *
@@ -340,14 +185,6 @@ var rules = {
340
185
  max: settings_1.maxFunctionParameters,
341
186
  }
342
187
  ],
343
- /*
344
- * Require a specific member delimiter style for interfaces and type literals
345
- *
346
- * Handled by @stylistic
347
- *
348
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md
349
- */
350
- "@typescript-eslint/member-delimiter-style": "off",
351
188
  /*
352
189
  * Require a consistent member declaration order
353
190
  *
@@ -598,24 +435,6 @@ var rules = {
598
435
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
599
436
  */
600
437
  "@typescript-eslint/no-extra-non-null-assertion": "error",
601
- /*
602
- * Disallow unnecessary parentheses
603
- *
604
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md
605
- */
606
- "@typescript-eslint/no-extra-parens": [
607
- "error",
608
- "all",
609
- {
610
- ignoreJSX: "multi-line",
611
- }
612
- ],
613
- /*
614
- * Disallow unnecessary semicolons
615
- *
616
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md
617
- */
618
- "@typescript-eslint/no-extra-semi": "error",
619
438
  /*
620
439
  * Forbids the use of classes as namespaces
621
440
  *
@@ -910,6 +729,12 @@ var rules = {
910
729
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-empty-export.md
911
730
  */
912
731
  "@typescript-eslint/no-useless-empty-export": "error",
732
+ /*
733
+ * Disallow unnecessary template literals.
734
+ *
735
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-template-literals.md
736
+ */
737
+ "@typescript-eslint/no-useless-template-literals": "error",
913
738
  /*
914
739
  * Disallows the use of require statements except in import statements
915
740
  *
@@ -922,32 +747,6 @@ var rules = {
922
747
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md
923
748
  */
924
749
  "@typescript-eslint/non-nullable-type-assertion-style": "error",
925
- /*
926
- * Require or disallow padding lines between statements
927
- *
928
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/padding-line-between-statements.md
929
- */
930
- "@typescript-eslint/padding-line-between-statements": [
931
- "error",
932
- {
933
- blankLine: "always",
934
- next: [
935
- "const",
936
- "directive",
937
- "interface",
938
- "let",
939
- "multiline-block-like",
940
- "return",
941
- "type",
942
- "var"
943
- ],
944
- prev: [
945
- "directive",
946
- "multiline-block-like",
947
- "return"
948
- ],
949
- }
950
- ],
951
750
  /*
952
751
  * Disallow the use of parameter properties in class constructors.
953
752
  *
@@ -1072,12 +871,6 @@ var rules = {
1072
871
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/promise-function-async.md
1073
872
  */
1074
873
  "@typescript-eslint/promise-function-async": "off",
1075
- /*
1076
- * Enforce the consistent use of either backticks, double, or single quotes
1077
- *
1078
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
1079
- */
1080
- "@typescript-eslint/quotes": "error",
1081
874
  /*
1082
875
  * Enforce giving compare argument to Array#sort
1083
876
  *
@@ -1115,50 +908,12 @@ var rules = {
1115
908
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md
1116
909
  */
1117
910
  "@typescript-eslint/return-await": "error",
1118
- /*
1119
- * Require or disallow semicolons instead of ASI
1120
- *
1121
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md
1122
- */
1123
- "@typescript-eslint/semi": "error",
1124
911
  /*
1125
912
  * Enforce constituents of a type union/intersection to be sorted alphabetically.
1126
913
  *
1127
914
  * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/sort-type-constituents.md
1128
915
  */
1129
916
  "@typescript-eslint/sort-type-constituents": "error",
1130
- /*
1131
- * Enforces consistent spacing before blocks.
1132
- *
1133
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-blocks.md
1134
- */
1135
- "@typescript-eslint/space-before-blocks": [
1136
- "error",
1137
- {
1138
- classes: "never",
1139
- functions: "never",
1140
- keywords: "never",
1141
- }
1142
- ],
1143
- /*
1144
- * Require or disallow a space before function parenthesis
1145
- *
1146
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md
1147
- */
1148
- "@typescript-eslint/space-before-function-paren": [
1149
- "error",
1150
- {
1151
- anonymous: "never",
1152
- asyncArrow: "always",
1153
- named: "never",
1154
- }
1155
- ],
1156
- /*
1157
- * This rule is aimed at ensuring there are spaces around infix operators.
1158
- *
1159
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md
1160
- */
1161
- "@typescript-eslint/space-infix-ops": "error",
1162
917
  /*
1163
918
  * Boolean expressions are limited to booleans
1164
919
  *
@@ -1186,14 +941,6 @@ var rules = {
1186
941
  types: "never",
1187
942
  }
1188
943
  ],
1189
- /*
1190
- * Require consistent spacing around type annotations
1191
- *
1192
- * Handled by @stylistic
1193
- *
1194
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/type-annotation-spacing.md
1195
- */
1196
- "@typescript-eslint/type-annotation-spacing": "off",
1197
944
  /*
1198
945
  * Require type annotations to exist
1199
946
  *
@@ -46,6 +46,7 @@ declare const _default: {
46
46
  "unicorn/no-this-assignment": string;
47
47
  "unicorn/no-typeof-undefined": string;
48
48
  "unicorn/no-unnecessary-await": string;
49
+ "unicorn/no-unnecessary-polyfills": string;
49
50
  "unicorn/no-unreadable-array-destructuring": string;
50
51
  "unicorn/no-unreadable-iife": string;
51
52
  "unicorn/no-unused-properties": string;
@@ -272,6 +272,12 @@ var rules = {
272
272
  * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unnecessary-await.md
273
273
  */
274
274
  "unicorn/no-unnecessary-await": "error",
275
+ /*
276
+ * Enforce the use of built-in methods instead of unnecessary polyfills
277
+ *
278
+ * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unnecessary-polyfills.md
279
+ */
280
+ "unicorn/no-unnecessary-polyfills": "error",
275
281
  /*
276
282
  * Disallow unreadable array destructuring.
277
283
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newsteam/eslint-config",
3
- "version": "0.0.207",
3
+ "version": "0.0.209",
4
4
  "description": "Shared config for eslint",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
@@ -54,13 +54,13 @@
54
54
  "eslint-plugin-you-dont-need-lodash-underscore": "6.13.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@stylistic/eslint-plugin": "1.5.1",
58
- "@types/eslint": "8.44.9",
57
+ "@stylistic/eslint-plugin": "1.5.3",
58
+ "@types/eslint": "8.56.2",
59
59
  "@types/jasmine": "^5.1.4",
60
- "@types/node": "20.10.4",
61
- "@typescript-eslint/eslint-plugin": "6.14.0",
62
- "@typescript-eslint/parser": "6.14.0",
63
- "eslint": "8.55.0",
60
+ "@types/node": "20.11.0",
61
+ "@typescript-eslint/eslint-plugin": "6.18.1",
62
+ "@typescript-eslint/parser": "6.18.1",
63
+ "eslint": "8.56.0",
64
64
  "eslint-find-rules": "4.1.0",
65
65
  "eslint-plugin-array-func": "4.0.0",
66
66
  "eslint-plugin-css-modules": "2.12.0",
@@ -68,7 +68,7 @@
68
68
  "eslint-plugin-eslint-comments": "3.2.0",
69
69
  "eslint-plugin-filenames": "1.3.2",
70
70
  "eslint-plugin-format-message": "6.2.4",
71
- "eslint-plugin-import": "2.29.0",
71
+ "eslint-plugin-import": "2.29.1",
72
72
  "eslint-plugin-import-newlines": "1.3.4",
73
73
  "eslint-plugin-more": "1.0.5",
74
74
  "eslint-plugin-newline-destructuring": "1.2.1",
@@ -84,25 +84,25 @@
84
84
  "eslint-plugin-react-native": "4.1.0",
85
85
  "eslint-plugin-react-perf": "3.3.1",
86
86
  "eslint-plugin-react-refresh": "^0.4.5",
87
- "eslint-plugin-security": "2.0.0",
87
+ "eslint-plugin-security": "2.1.0",
88
88
  "eslint-plugin-sort-keys-fix": "1.1.2",
89
- "eslint-plugin-unicorn": "49.0.0",
89
+ "eslint-plugin-unicorn": "50.0.1",
90
90
  "jasmine": "^5.1.0",
91
91
  "json-schema": "0.4.0",
92
92
  "typescript": "5.3.3"
93
93
  },
94
94
  "peerDependencies": {
95
- "@stylistic/eslint-plugin": "1.5.1",
96
- "@typescript-eslint/eslint-plugin": "6.14.0",
97
- "@typescript-eslint/parser": "6.14.0",
98
- "eslint": "8.55.0",
95
+ "@stylistic/eslint-plugin": "1.5.3",
96
+ "@typescript-eslint/eslint-plugin": "6.18.1",
97
+ "@typescript-eslint/parser": "6.18.1",
98
+ "eslint": "8.56.0",
99
99
  "eslint-plugin-array-func": "4.0.0",
100
100
  "eslint-plugin-css-modules": "2.12.0",
101
101
  "eslint-plugin-es": "4.1.0",
102
102
  "eslint-plugin-eslint-comments": "3.2.0",
103
103
  "eslint-plugin-filenames": "1.3.2",
104
104
  "eslint-plugin-format-message": "6.2.4",
105
- "eslint-plugin-import": "2.29.0",
105
+ "eslint-plugin-import": "2.29.1",
106
106
  "eslint-plugin-more": "1.0.5",
107
107
  "eslint-plugin-newline-destructuring": "1.2.1",
108
108
  "eslint-plugin-no-unsanitized": "4.0.2",
@@ -117,9 +117,9 @@
117
117
  "eslint-plugin-react-native": "4.1.0",
118
118
  "eslint-plugin-react-perf": "3.3.1",
119
119
  "eslint-plugin-react-refresh": "^0.4.5",
120
- "eslint-plugin-security": "2.0.0",
120
+ "eslint-plugin-security": "2.1.0",
121
121
  "eslint-plugin-sort-keys-fix": "1.1.2",
122
- "eslint-plugin-unicorn": "49.0.0",
122
+ "eslint-plugin-unicorn": "50.0.1",
123
123
  "eslint-plugin-you-dont-need-lodash-underscore": "6.13.0",
124
124
  "json-schema": "0.4.0",
125
125
  "typescript": "5.3.3"