eslint 9.39.0 → 9.39.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/README.md CHANGED
@@ -343,7 +343,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).
343
343
  <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
344
344
  <p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
345
345
  <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
346
- <p><a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
346
+ <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
347
347
  <h3>Technology Sponsors</h3>
348
348
  Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
349
349
  <p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
@@ -1303,7 +1303,7 @@ class SourceCode extends TokenStore {
1303
1303
  new VisitNodeStep({
1304
1304
  target: node,
1305
1305
  phase: 1,
1306
- args: [node, node.parent],
1306
+ args: [node],
1307
1307
  }),
1308
1308
  );
1309
1309
  },
@@ -1312,7 +1312,7 @@ class SourceCode extends TokenStore {
1312
1312
  new VisitNodeStep({
1313
1313
  target: node,
1314
1314
  phase: 2,
1315
- args: [node, node.parent],
1315
+ args: [node],
1316
1316
  }),
1317
1317
  );
1318
1318
  },
@@ -1921,6 +1921,20 @@ class Linter {
1921
1921
  });
1922
1922
  }
1923
1923
  } else {
1924
+ if (config.language === jslang) {
1925
+ for (const comment of sourceCode.getInlineConfigNodes()) {
1926
+ const { label } = commentParser.parseDirective(
1927
+ comment.value,
1928
+ );
1929
+ if (label === "eslint-env") {
1930
+ slots.warningService.emitESLintEnvWarning(
1931
+ options.filename,
1932
+ comment.loc.start.line,
1933
+ );
1934
+ }
1935
+ }
1936
+ }
1937
+
1924
1938
  const inlineConfigResult = sourceCode.applyInlineConfig?.();
1925
1939
 
1926
1940
  if (inlineConfigResult) {
@@ -93,6 +93,19 @@ class WarningService {
93
93
  "ESLintPoorConcurrencyWarning",
94
94
  );
95
95
  }
96
+
97
+ /**
98
+ * Emits a warning when eslint-env configuration comments are found.
99
+ * @param {string} filename The name of the file being linted.
100
+ * @param {number} line The line number of the comment.
101
+ * @returns {void}
102
+ */
103
+ emitESLintEnvWarning(filename, line) {
104
+ this.emitWarning(
105
+ `/* eslint-env */ comments are no longer recognized when linting with flat config and will be reported as errors as of v10.0.0. Replace them with /* global */ comments or define globals in your config file. See https://eslint.org/docs/latest/use/configure/migration-guide#eslint-env-configuration-comments for details. Found in ${filename} at line ${line}.`,
106
+ "ESLintEnvWarning",
107
+ );
108
+ }
96
109
  }
97
110
 
98
111
  module.exports = { WarningService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint",
3
- "version": "9.39.0",
3
+ "version": "9.39.2",
4
4
  "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
5
  "description": "An AST-based pattern checker for JavaScript.",
6
6
  "type": "commonjs",
@@ -112,7 +112,7 @@
112
112
  "@eslint/config-helpers": "^0.4.2",
113
113
  "@eslint/core": "^0.17.0",
114
114
  "@eslint/eslintrc": "^3.3.1",
115
- "@eslint/js": "9.39.0",
115
+ "@eslint/js": "9.39.2",
116
116
  "@eslint/plugin-kit": "^0.4.1",
117
117
  "@humanfs/node": "^0.16.6",
118
118
  "@humanwhocodes/module-importer": "^1.0.1",