eslint 9.11.0 → 9.12.0

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.
@@ -803,7 +803,17 @@ export interface BestPractices extends Linter.RulesRecord {
803
803
  * @since 0.5.1
804
804
  * @see https://eslint.org/docs/rules/no-sequences
805
805
  */
806
- "no-sequences": Linter.RuleEntry<[]>;
806
+ "no-sequences": Linter.RuleEntry<
807
+ [
808
+ Partial<{
809
+ /**
810
+ * @since 7.23.0
811
+ * @default true
812
+ */
813
+ allowInParentheses: boolean;
814
+ }>,
815
+ ]
816
+ >;
807
817
 
808
818
  /**
809
819
  * Rule to disallow throwing literals as exceptions.
@@ -842,6 +852,11 @@ export interface BestPractices extends Linter.RulesRecord {
842
852
  * @default false
843
853
  */
844
854
  allowTaggedTemplates: boolean;
855
+ /**
856
+ * @since 7.20.0
857
+ * @default false
858
+ */
859
+ enforceForJSX: boolean;
845
860
  }>,
846
861
  ]
847
862
  >;
@@ -386,6 +386,10 @@ export interface ECMAScript6 extends Linter.RulesRecord {
386
386
  * @default false
387
387
  */
388
388
  ignoreConstructors: boolean;
389
+ /**
390
+ * @since 8.22.0
391
+ */
392
+ methodsIgnorePattern: string;
389
393
  /**
390
394
  * @default false
391
395
  */
@@ -552,7 +552,17 @@ export interface PossibleErrors extends Linter.RulesRecord {
552
552
  * @since 3.3.0
553
553
  * @see https://eslint.org/docs/rules/no-unsafe-negation
554
554
  */
555
- "no-unsafe-negation": Linter.RuleEntry<[]>;
555
+ "no-unsafe-negation": Linter.RuleEntry<
556
+ [
557
+ Partial<{
558
+ /**
559
+ * @since 6.6.0
560
+ * @default false
561
+ */
562
+ enforceForOrderingRelations: boolean;
563
+ }>,
564
+ ]
565
+ >;
556
566
 
557
567
  /**
558
568
  * Disallow use of optional chaining in contexts where the `undefined` value is not allowed.
@@ -583,7 +593,17 @@ export interface PossibleErrors extends Linter.RulesRecord {
583
593
  * @since 5.3.0
584
594
  * @see https://eslint.org/docs/rules/require-atomic-updates
585
595
  */
586
- "require-atomic-updates": Linter.RuleEntry<[]>;
596
+ "require-atomic-updates": Linter.RuleEntry<
597
+ [
598
+ Partial<{
599
+ /**
600
+ * @since 8.3.0
601
+ * @default false
602
+ */
603
+ allowProperties: boolean;
604
+ }>,
605
+ ]
606
+ >;
587
607
 
588
608
  /**
589
609
  * Rule to require calls to `isNaN()` when checking for `NaN`.
@@ -1385,10 +1385,35 @@ export interface StylisticIssues extends Linter.RulesRecord {
1385
1385
  * @default false
1386
1386
  */
1387
1387
  allowAfterSuper: boolean;
1388
+ /**
1389
+ * @since 6.7.0
1390
+ * @default false
1391
+ */
1392
+ allowAfterThisConstructor: boolean;
1388
1393
  /**
1389
1394
  * @default false
1390
1395
  */
1391
1396
  enforceInMethodNames: boolean;
1397
+ /**
1398
+ * @since 8.15.0
1399
+ * @default false
1400
+ */
1401
+ enforceInClassFields: boolean;
1402
+ /**
1403
+ * @since 8.31.0
1404
+ * @default true
1405
+ */
1406
+ allowInArrayDestructuring: boolean;
1407
+ /**
1408
+ * @since 8.31.0
1409
+ * @default true
1410
+ */
1411
+ allowInObjectDestructuring: boolean;
1412
+ /**
1413
+ * @since 7.7.0
1414
+ * @default true
1415
+ */
1416
+ allowFunctionParams: boolean;
1392
1417
  }>,
1393
1418
  ]
1394
1419
  >;
@@ -100,6 +100,11 @@ export interface Variables extends Linter.RulesRecord {
100
100
  */
101
101
  hoist: "functions" | "all" | "never";
102
102
  allow: string[];
103
+ /**
104
+ * @since 8.10.0
105
+ * @default false
106
+ */
107
+ ignoreOnInitialization: boolean;
103
108
  }>,
104
109
  ]
105
110
  >;
@@ -14,13 +14,14 @@
14
14
  const { FileEnumerator } = require("./cli-engine/file-enumerator");
15
15
  const { ESLint: FlatESLint, shouldUseFlatConfig } = require("./eslint/eslint");
16
16
  const { LegacyESLint } = require("./eslint/legacy-eslint");
17
+ const builtinRules = require("./rules");
17
18
 
18
19
  //-----------------------------------------------------------------------------
19
20
  // Exports
20
21
  //-----------------------------------------------------------------------------
21
22
 
22
23
  module.exports = {
23
- builtinRules: require("./rules"),
24
+ builtinRules,
24
25
  FlatESLint,
25
26
  shouldUseFlatConfig,
26
27
  FileEnumerator,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint",
3
- "version": "9.11.0",
3
+ "version": "9.12.0",
4
4
  "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
5
  "description": "An AST-based pattern checker for JavaScript.",
6
6
  "bin": {
@@ -26,6 +26,19 @@
26
26
  "default": "./lib/universal.js"
27
27
  }
28
28
  },
29
+ "typesVersions": {
30
+ "*": {
31
+ "use-at-your-own-risk": [
32
+ "./lib/types/use-at-your-own-risk.d.ts"
33
+ ],
34
+ "rules": [
35
+ "./lib/types/rules/index.d.ts"
36
+ ],
37
+ "universal": [
38
+ "./lib/types/universal.d.ts"
39
+ ]
40
+ }
41
+ },
29
42
  "scripts": {
30
43
  "build:docs:update-links": "node tools/fetch-docs-links.js",
31
44
  "build:site": "node Makefile.js gensite",
@@ -38,6 +51,7 @@
38
51
  "lint:unused": "knip",
39
52
  "lint:fix": "trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js",
40
53
  "lint:fix:docs:js": "trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js",
54
+ "lint:types": "attw --pack",
41
55
  "release:generate:alpha": "node Makefile.js generatePrerelease -- alpha",
42
56
  "release:generate:beta": "node Makefile.js generatePrerelease -- beta",
43
57
  "release:generate:latest": "node Makefile.js generateRelease -- latest",
@@ -85,20 +99,23 @@
85
99
  "@eslint-community/eslint-utils": "^4.2.0",
86
100
  "@eslint-community/regexpp": "^4.11.0",
87
101
  "@eslint/config-array": "^0.18.0",
102
+ "@eslint/core": "^0.6.0",
88
103
  "@eslint/eslintrc": "^3.1.0",
89
- "@eslint/js": "9.11.0",
104
+ "@eslint/js": "9.12.0",
90
105
  "@eslint/plugin-kit": "^0.2.0",
106
+ "@humanfs/node": "^0.16.5",
91
107
  "@humanwhocodes/module-importer": "^1.0.1",
92
- "@humanwhocodes/retry": "^0.3.0",
93
- "@nodelib/fs.walk": "^1.2.8",
108
+ "@humanwhocodes/retry": "^0.3.1",
109
+ "@types/estree": "^1.0.6",
110
+ "@types/json-schema": "^7.0.15",
94
111
  "ajv": "^6.12.4",
95
112
  "chalk": "^4.0.0",
96
113
  "cross-spawn": "^7.0.2",
97
114
  "debug": "^4.3.2",
98
115
  "escape-string-regexp": "^4.0.0",
99
- "eslint-scope": "^8.0.2",
100
- "eslint-visitor-keys": "^4.0.0",
101
- "espree": "^10.1.0",
116
+ "eslint-scope": "^8.1.0",
117
+ "eslint-visitor-keys": "^4.1.0",
118
+ "espree": "^10.2.0",
102
119
  "esquery": "^1.5.0",
103
120
  "esutils": "^2.0.2",
104
121
  "fast-deep-equal": "^3.1.3",
@@ -108,23 +125,19 @@
108
125
  "ignore": "^5.2.0",
109
126
  "imurmurhash": "^0.1.4",
110
127
  "is-glob": "^4.0.0",
111
- "is-path-inside": "^3.0.3",
112
128
  "json-stable-stringify-without-jsonify": "^1.0.1",
113
129
  "lodash.merge": "^4.6.2",
114
130
  "minimatch": "^3.1.2",
115
131
  "natural-compare": "^1.4.0",
116
132
  "optionator": "^0.9.3",
117
- "strip-ansi": "^6.0.1",
118
133
  "text-table": "^0.2.0"
119
134
  },
120
135
  "devDependencies": {
136
+ "@arethetypeswrong/cli": "^0.16.4",
121
137
  "@babel/core": "^7.4.3",
122
138
  "@babel/preset-env": "^7.4.3",
123
- "@eslint/core": "^0.6.0",
124
- "@eslint/json": "^0.4.0",
139
+ "@eslint/json": "^0.5.0",
125
140
  "@trunkio/launcher": "^1.3.0",
126
- "@types/estree": "^1.0.5",
127
- "@types/json-schema": "^7.0.15",
128
141
  "@types/node": "^20.11.5",
129
142
  "@typescript-eslint/parser": "^8.4.0",
130
143
  "@wdio/browser-runner": "^9.0.5",
@@ -153,7 +166,7 @@
153
166
  "globals": "^15.0.0",
154
167
  "got": "^11.8.3",
155
168
  "gray-matter": "^4.0.3",
156
- "jiti": "^1.21.6",
169
+ "jiti": "^2.1.0",
157
170
  "knip": "^5.21.0",
158
171
  "lint-staged": "^11.0.0",
159
172
  "load-perf": "^0.2.0",
@@ -166,7 +179,7 @@
166
179
  "metascraper-logo": "^5.25.7",
167
180
  "metascraper-logo-favicon": "^5.25.7",
168
181
  "metascraper-title": "^5.25.7",
169
- "mocha": "^8.3.2",
182
+ "mocha": "^10.7.3",
170
183
  "node-polyfill-webpack-plugin": "^1.0.3",
171
184
  "npm-license": "^0.3.3",
172
185
  "pirates": "^4.0.5",