@nx/eslint 20.0.6 → 20.0.7

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/eslint",
3
- "version": "20.0.6",
3
+ "version": "20.0.7",
4
4
  "private": false,
5
5
  "description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "eslint": "^8.0.0 || ^9.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "20.0.6",
39
- "@nx/js": "20.0.6",
38
+ "@nx/devkit": "20.0.7",
39
+ "@nx/js": "20.0.7",
40
40
  "semver": "^7.5.3",
41
41
  "tslib": "^2.3.0",
42
42
  "typescript": "~5.4.2"
@@ -184,7 +184,8 @@ function createEsLintConfiguration(tree, options, projectConfig, setParserOption
184
184
  });
185
185
  const nodeList = (0, ast_utils_1.createNodeList)(importMap, nodes);
186
186
  const content = (0, ast_utils_1.stringifyNodeList)(nodeList);
187
- tree.write((0, path_1.join)(projectConfig.root, 'eslint.config.js'), content);
187
+ const ext = extendedRootConfig?.endsWith('.cjs') ? '.cjs' : '.js';
188
+ tree.write((0, path_1.join)(projectConfig.root, `eslint.config${ext}`), content);
188
189
  }
189
190
  else {
190
191
  (0, devkit_1.writeJson)(tree, (0, path_1.join)(projectConfig.root, `.eslintrc.json`), {
@@ -40,7 +40,9 @@ function isEslintConfigSupported(tree, projectRoot = '') {
40
40
  if (!eslintFile) {
41
41
  return false;
42
42
  }
43
- return eslintFile.endsWith('.json') || eslintFile.endsWith('.config.js');
43
+ return (eslintFile.endsWith('.json') ||
44
+ eslintFile.endsWith('.config.js') ||
45
+ eslintFile.endsWith('.config.cjs'));
44
46
  }
45
47
  function updateRelativePathsInConfig(tree, sourcePath, destinationPath) {
46
48
  if (sourcePath === destinationPath ||