@2digits/eslint-config 4.5.0 → 4.5.2

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.
package/dist/index.d.mts CHANGED
@@ -260,6 +260,11 @@ interface RuleOptions {
260
260
  * @see https://github.com/eslint/css/blob/main/docs/rules/no-empty-blocks.md
261
261
  */
262
262
  'css/no-empty-blocks'?: Linter.RuleEntry<[]>
263
+ /**
264
+ * Disallow !important flags
265
+ * @see https://github.com/eslint/css/blob/main/docs/rules/no-important.md
266
+ */
267
+ 'css/no-important'?: Linter.RuleEntry<[]>
263
268
  /**
264
269
  * Disallow invalid at-rules
265
270
  * @see https://github.com/eslint/css/blob/main/docs/rules/no-invalid-at-rules.md
@@ -1289,7 +1294,7 @@ Backward pagination arguments
1289
1294
  * disallow unnecessary escape usage
1290
1295
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html
1291
1296
  */
1292
- 'jsonc/no-useless-escape'?: Linter.RuleEntry<[]>
1297
+ 'jsonc/no-useless-escape'?: Linter.RuleEntry<JsoncNoUselessEscape>
1293
1298
  /**
1294
1299
  * enforce consistent line breaks inside braces
1295
1300
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html
@@ -2260,6 +2265,11 @@ Backward pagination arguments
2260
2265
  * @deprecated
2261
2266
  */
2262
2267
  'no-trailing-spaces'?: Linter.RuleEntry<NoTrailingSpaces>
2268
+ /**
2269
+ * Disallow `let` or `var` variables that are read but never assigned
2270
+ * @see https://eslint.org/docs/latest/rules/no-unassigned-vars
2271
+ */
2272
+ 'no-unassigned-vars'?: Linter.RuleEntry<[]>
2263
2273
  /**
2264
2274
  * Disallow the use of undeclared variables unless mentioned in `/*global *\/` comments
2265
2275
  * @see https://eslint.org/docs/latest/rules/no-undef
@@ -2384,7 +2394,7 @@ Backward pagination arguments
2384
2394
  * Disallow unnecessary escape characters
2385
2395
  * @see https://eslint.org/docs/latest/rules/no-useless-escape
2386
2396
  */
2387
- 'no-useless-escape'?: Linter.RuleEntry<[]>
2397
+ 'no-useless-escape'?: Linter.RuleEntry<NoUselessEscape>
2388
2398
  /**
2389
2399
  * Disallow renaming import, export, and destructured assignments to the same name
2390
2400
  * @see https://eslint.org/docs/latest/rules/no-useless-rename
@@ -8492,6 +8502,10 @@ type JsoncNoIrregularWhitespace = []|[{
8492
8502
  skipRegExps?: boolean
8493
8503
  skipJSXText?: boolean
8494
8504
  }]
8505
+ // ----- jsonc/no-useless-escape -----
8506
+ type JsoncNoUselessEscape = []|[{
8507
+ allowRegexCharacters?: string[]
8508
+ }]
8495
8509
  // ----- jsonc/object-curly-newline -----
8496
8510
  type JsoncObjectCurlyNewline = []|[((("always" | "never") | {
8497
8511
  multiline?: boolean
@@ -9118,6 +9132,8 @@ type MaxNestedCallbacks = []|[(number | {
9118
9132
  type MaxParams = []|[(number | {
9119
9133
  maximum?: number
9120
9134
  max?: number
9135
+
9136
+ countVoidThis?: boolean
9121
9137
  })]
9122
9138
  // ----- max-statements -----
9123
9139
  type MaxStatements = []|[(number | {
@@ -9503,6 +9519,10 @@ type NoUseBeforeDefine = []|[("nofunc" | {
9503
9519
  type NoUselessComputedKey = []|[{
9504
9520
  enforceForClassMembers?: boolean
9505
9521
  }]
9522
+ // ----- no-useless-escape -----
9523
+ type NoUselessEscape = []|[{
9524
+ allowRegexCharacters?: string[]
9525
+ }]
9506
9526
  // ----- no-useless-rename -----
9507
9527
  type NoUselessRename = []|[{
9508
9528
  ignoreDestructuring?: boolean
@@ -10886,6 +10906,7 @@ type StylisticJsxSortProps = []|[{
10886
10906
  ignoreCase?: boolean
10887
10907
  noSortAlphabetically?: boolean
10888
10908
  reservedFirst?: (unknown[] | boolean)
10909
+ reservedLast?: unknown[]
10889
10910
  locale?: string
10890
10911
  }]
10891
10912
  // ----- stylistic/jsx-tag-spacing -----
@@ -10962,18 +10983,6 @@ type StylisticKeywordSpacing = []|[{
10962
10983
  before?: boolean
10963
10984
  after?: boolean
10964
10985
  }
10965
- as?: {
10966
- before?: boolean
10967
- after?: boolean
10968
- }
10969
- async?: {
10970
- before?: boolean
10971
- after?: boolean
10972
- }
10973
- await?: {
10974
- before?: boolean
10975
- after?: boolean
10976
- }
10977
10986
  boolean?: {
10978
10987
  before?: boolean
10979
10988
  after?: boolean
@@ -11066,18 +11075,10 @@ type StylisticKeywordSpacing = []|[{
11066
11075
  before?: boolean
11067
11076
  after?: boolean
11068
11077
  }
11069
- from?: {
11070
- before?: boolean
11071
- after?: boolean
11072
- }
11073
11078
  function?: {
11074
11079
  before?: boolean
11075
11080
  after?: boolean
11076
11081
  }
11077
- get?: {
11078
- before?: boolean
11079
- after?: boolean
11080
- }
11081
11082
  goto?: {
11082
11083
  before?: boolean
11083
11084
  after?: boolean
@@ -11110,10 +11111,6 @@ type StylisticKeywordSpacing = []|[{
11110
11111
  before?: boolean
11111
11112
  after?: boolean
11112
11113
  }
11113
- let?: {
11114
- before?: boolean
11115
- after?: boolean
11116
- }
11117
11114
  long?: {
11118
11115
  before?: boolean
11119
11116
  after?: boolean
@@ -11130,10 +11127,6 @@ type StylisticKeywordSpacing = []|[{
11130
11127
  before?: boolean
11131
11128
  after?: boolean
11132
11129
  }
11133
- of?: {
11134
- before?: boolean
11135
- after?: boolean
11136
- }
11137
11130
  package?: {
11138
11131
  before?: boolean
11139
11132
  after?: boolean
@@ -11154,14 +11147,6 @@ type StylisticKeywordSpacing = []|[{
11154
11147
  before?: boolean
11155
11148
  after?: boolean
11156
11149
  }
11157
- satisfies?: {
11158
- before?: boolean
11159
- after?: boolean
11160
- }
11161
- set?: {
11162
- before?: boolean
11163
- after?: boolean
11164
- }
11165
11150
  short?: {
11166
11151
  before?: boolean
11167
11152
  after?: boolean
@@ -11230,6 +11215,42 @@ type StylisticKeywordSpacing = []|[{
11230
11215
  before?: boolean
11231
11216
  after?: boolean
11232
11217
  }
11218
+ as?: {
11219
+ before?: boolean
11220
+ after?: boolean
11221
+ }
11222
+ async?: {
11223
+ before?: boolean
11224
+ after?: boolean
11225
+ }
11226
+ await?: {
11227
+ before?: boolean
11228
+ after?: boolean
11229
+ }
11230
+ from?: {
11231
+ before?: boolean
11232
+ after?: boolean
11233
+ }
11234
+ get?: {
11235
+ before?: boolean
11236
+ after?: boolean
11237
+ }
11238
+ let?: {
11239
+ before?: boolean
11240
+ after?: boolean
11241
+ }
11242
+ of?: {
11243
+ before?: boolean
11244
+ after?: boolean
11245
+ }
11246
+ satisfies?: {
11247
+ before?: boolean
11248
+ after?: boolean
11249
+ }
11250
+ set?: {
11251
+ before?: boolean
11252
+ after?: boolean
11253
+ }
11233
11254
  yield?: {
11234
11255
  before?: boolean
11235
11256
  after?: boolean
package/dist/index.d.ts CHANGED
@@ -260,6 +260,11 @@ interface RuleOptions {
260
260
  * @see https://github.com/eslint/css/blob/main/docs/rules/no-empty-blocks.md
261
261
  */
262
262
  'css/no-empty-blocks'?: Linter.RuleEntry<[]>
263
+ /**
264
+ * Disallow !important flags
265
+ * @see https://github.com/eslint/css/blob/main/docs/rules/no-important.md
266
+ */
267
+ 'css/no-important'?: Linter.RuleEntry<[]>
263
268
  /**
264
269
  * Disallow invalid at-rules
265
270
  * @see https://github.com/eslint/css/blob/main/docs/rules/no-invalid-at-rules.md
@@ -1289,7 +1294,7 @@ Backward pagination arguments
1289
1294
  * disallow unnecessary escape usage
1290
1295
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html
1291
1296
  */
1292
- 'jsonc/no-useless-escape'?: Linter.RuleEntry<[]>
1297
+ 'jsonc/no-useless-escape'?: Linter.RuleEntry<JsoncNoUselessEscape>
1293
1298
  /**
1294
1299
  * enforce consistent line breaks inside braces
1295
1300
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html
@@ -2260,6 +2265,11 @@ Backward pagination arguments
2260
2265
  * @deprecated
2261
2266
  */
2262
2267
  'no-trailing-spaces'?: Linter.RuleEntry<NoTrailingSpaces>
2268
+ /**
2269
+ * Disallow `let` or `var` variables that are read but never assigned
2270
+ * @see https://eslint.org/docs/latest/rules/no-unassigned-vars
2271
+ */
2272
+ 'no-unassigned-vars'?: Linter.RuleEntry<[]>
2263
2273
  /**
2264
2274
  * Disallow the use of undeclared variables unless mentioned in `/*global *\/` comments
2265
2275
  * @see https://eslint.org/docs/latest/rules/no-undef
@@ -2384,7 +2394,7 @@ Backward pagination arguments
2384
2394
  * Disallow unnecessary escape characters
2385
2395
  * @see https://eslint.org/docs/latest/rules/no-useless-escape
2386
2396
  */
2387
- 'no-useless-escape'?: Linter.RuleEntry<[]>
2397
+ 'no-useless-escape'?: Linter.RuleEntry<NoUselessEscape>
2388
2398
  /**
2389
2399
  * Disallow renaming import, export, and destructured assignments to the same name
2390
2400
  * @see https://eslint.org/docs/latest/rules/no-useless-rename
@@ -8492,6 +8502,10 @@ type JsoncNoIrregularWhitespace = []|[{
8492
8502
  skipRegExps?: boolean
8493
8503
  skipJSXText?: boolean
8494
8504
  }]
8505
+ // ----- jsonc/no-useless-escape -----
8506
+ type JsoncNoUselessEscape = []|[{
8507
+ allowRegexCharacters?: string[]
8508
+ }]
8495
8509
  // ----- jsonc/object-curly-newline -----
8496
8510
  type JsoncObjectCurlyNewline = []|[((("always" | "never") | {
8497
8511
  multiline?: boolean
@@ -9118,6 +9132,8 @@ type MaxNestedCallbacks = []|[(number | {
9118
9132
  type MaxParams = []|[(number | {
9119
9133
  maximum?: number
9120
9134
  max?: number
9135
+
9136
+ countVoidThis?: boolean
9121
9137
  })]
9122
9138
  // ----- max-statements -----
9123
9139
  type MaxStatements = []|[(number | {
@@ -9503,6 +9519,10 @@ type NoUseBeforeDefine = []|[("nofunc" | {
9503
9519
  type NoUselessComputedKey = []|[{
9504
9520
  enforceForClassMembers?: boolean
9505
9521
  }]
9522
+ // ----- no-useless-escape -----
9523
+ type NoUselessEscape = []|[{
9524
+ allowRegexCharacters?: string[]
9525
+ }]
9506
9526
  // ----- no-useless-rename -----
9507
9527
  type NoUselessRename = []|[{
9508
9528
  ignoreDestructuring?: boolean
@@ -10886,6 +10906,7 @@ type StylisticJsxSortProps = []|[{
10886
10906
  ignoreCase?: boolean
10887
10907
  noSortAlphabetically?: boolean
10888
10908
  reservedFirst?: (unknown[] | boolean)
10909
+ reservedLast?: unknown[]
10889
10910
  locale?: string
10890
10911
  }]
10891
10912
  // ----- stylistic/jsx-tag-spacing -----
@@ -10962,18 +10983,6 @@ type StylisticKeywordSpacing = []|[{
10962
10983
  before?: boolean
10963
10984
  after?: boolean
10964
10985
  }
10965
- as?: {
10966
- before?: boolean
10967
- after?: boolean
10968
- }
10969
- async?: {
10970
- before?: boolean
10971
- after?: boolean
10972
- }
10973
- await?: {
10974
- before?: boolean
10975
- after?: boolean
10976
- }
10977
10986
  boolean?: {
10978
10987
  before?: boolean
10979
10988
  after?: boolean
@@ -11066,18 +11075,10 @@ type StylisticKeywordSpacing = []|[{
11066
11075
  before?: boolean
11067
11076
  after?: boolean
11068
11077
  }
11069
- from?: {
11070
- before?: boolean
11071
- after?: boolean
11072
- }
11073
11078
  function?: {
11074
11079
  before?: boolean
11075
11080
  after?: boolean
11076
11081
  }
11077
- get?: {
11078
- before?: boolean
11079
- after?: boolean
11080
- }
11081
11082
  goto?: {
11082
11083
  before?: boolean
11083
11084
  after?: boolean
@@ -11110,10 +11111,6 @@ type StylisticKeywordSpacing = []|[{
11110
11111
  before?: boolean
11111
11112
  after?: boolean
11112
11113
  }
11113
- let?: {
11114
- before?: boolean
11115
- after?: boolean
11116
- }
11117
11114
  long?: {
11118
11115
  before?: boolean
11119
11116
  after?: boolean
@@ -11130,10 +11127,6 @@ type StylisticKeywordSpacing = []|[{
11130
11127
  before?: boolean
11131
11128
  after?: boolean
11132
11129
  }
11133
- of?: {
11134
- before?: boolean
11135
- after?: boolean
11136
- }
11137
11130
  package?: {
11138
11131
  before?: boolean
11139
11132
  after?: boolean
@@ -11154,14 +11147,6 @@ type StylisticKeywordSpacing = []|[{
11154
11147
  before?: boolean
11155
11148
  after?: boolean
11156
11149
  }
11157
- satisfies?: {
11158
- before?: boolean
11159
- after?: boolean
11160
- }
11161
- set?: {
11162
- before?: boolean
11163
- after?: boolean
11164
- }
11165
11150
  short?: {
11166
11151
  before?: boolean
11167
11152
  after?: boolean
@@ -11230,6 +11215,42 @@ type StylisticKeywordSpacing = []|[{
11230
11215
  before?: boolean
11231
11216
  after?: boolean
11232
11217
  }
11218
+ as?: {
11219
+ before?: boolean
11220
+ after?: boolean
11221
+ }
11222
+ async?: {
11223
+ before?: boolean
11224
+ after?: boolean
11225
+ }
11226
+ await?: {
11227
+ before?: boolean
11228
+ after?: boolean
11229
+ }
11230
+ from?: {
11231
+ before?: boolean
11232
+ after?: boolean
11233
+ }
11234
+ get?: {
11235
+ before?: boolean
11236
+ after?: boolean
11237
+ }
11238
+ let?: {
11239
+ before?: boolean
11240
+ after?: boolean
11241
+ }
11242
+ of?: {
11243
+ before?: boolean
11244
+ after?: boolean
11245
+ }
11246
+ satisfies?: {
11247
+ before?: boolean
11248
+ after?: boolean
11249
+ }
11250
+ set?: {
11251
+ before?: boolean
11252
+ after?: boolean
11253
+ }
11233
11254
  yield?: {
11234
11255
  before?: boolean
11235
11256
  after?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
5
5
  "homepage": "https://2d-configs.vercel.app/",
6
6
  "repository": {
@@ -31,27 +31,27 @@
31
31
  "@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
32
32
  "@eslint-react/eslint-plugin": "1.49.0",
33
33
  "@eslint/compat": "1.2.9",
34
- "@eslint/css": "0.7.0",
35
- "@eslint/js": "9.26.0",
34
+ "@eslint/css": "0.8.1",
35
+ "@eslint/js": "9.27.0",
36
36
  "@eslint/markdown": "6.4.0",
37
37
  "@graphql-eslint/eslint-plugin": "4.4.0",
38
38
  "@next/eslint-plugin-next": "15.3.2",
39
- "@stylistic/eslint-plugin": "4.2.0",
39
+ "@stylistic/eslint-plugin": "4.4.0",
40
40
  "@tanstack/eslint-plugin-query": "5.74.7",
41
- "@typescript-eslint/parser": "8.32.0",
42
- "@typescript-eslint/utils": "8.32.0",
41
+ "@typescript-eslint/parser": "8.32.1",
42
+ "@typescript-eslint/utils": "8.32.1",
43
43
  "eslint-config-flat-gitignore": "2.1.0",
44
44
  "eslint-config-prettier": "10.1.5",
45
- "eslint-flat-config-utils": "2.0.1",
45
+ "eslint-flat-config-utils": "2.1.0",
46
46
  "eslint-merge-processors": "2.0.0",
47
47
  "eslint-plugin-antfu": "3.1.1",
48
48
  "eslint-plugin-de-morgan": "1.2.1",
49
49
  "eslint-plugin-drizzle": "0.2.3",
50
- "eslint-plugin-jsdoc": "50.6.14",
51
- "eslint-plugin-jsonc": "2.20.0",
50
+ "eslint-plugin-jsdoc": "50.6.17",
51
+ "eslint-plugin-jsonc": "2.20.1",
52
52
  "eslint-plugin-n": "17.18.0",
53
53
  "eslint-plugin-pnpm": "0.3.1",
54
- "eslint-plugin-react-compiler": "19.1.0-rc.1",
54
+ "eslint-plugin-react-compiler": "19.1.0-rc.2",
55
55
  "eslint-plugin-react-hooks": "5.2.0",
56
56
  "eslint-plugin-regexp": "2.7.0",
57
57
  "eslint-plugin-sonarjs": "3.0.2",
@@ -61,28 +61,28 @@
61
61
  "eslint-plugin-unicorn": "59.0.1",
62
62
  "eslint-plugin-yml": "1.18.0",
63
63
  "find-up": "7.0.0",
64
- "globals": "16.1.0",
64
+ "globals": "16.2.0",
65
65
  "graphql-config": "5.1.5",
66
66
  "jsonc-eslint-parser": "2.4.0",
67
67
  "local-pkg": "1.1.1",
68
- "typescript-eslint": "8.32.0",
68
+ "typescript-eslint": "8.32.1",
69
69
  "yaml-eslint-parser": "1.3.0",
70
70
  "@2digits/constants": "1.0.0",
71
- "@2digits/eslint-plugin": "3.0.7"
71
+ "@2digits/eslint-plugin": "3.0.9"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@eslint/config-inspector": "1.0.2",
75
- "@types/node": "22.15.17",
76
- "@types/react": "19.1.3",
75
+ "@types/node": "22.15.21",
76
+ "@types/react": "19.1.5",
77
77
  "dedent": "1.6.0",
78
- "eslint": "9.26.0",
78
+ "eslint": "9.27.0",
79
79
  "eslint-typegen": "2.2.0",
80
80
  "execa": "9.5.3",
81
81
  "react": "19.1.0",
82
82
  "tinyglobby": "0.2.13",
83
83
  "typescript": "5.8.3",
84
84
  "unbuild": "3.5.0",
85
- "vitest": "3.1.3",
85
+ "vitest": "3.1.4",
86
86
  "@2digits/tsconfig": "0.7.1"
87
87
  },
88
88
  "scripts": {