@nx/eslint 18.2.0-canary.20240320-64b2396 → 18.2.0-canary.20240321-2a4c57d

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/eslint",
3
- "version": "18.2.0-canary.20240320-64b2396",
3
+ "version": "18.2.0-canary.20240321-2a4c57d",
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": {
@@ -33,12 +33,12 @@
33
33
  "js-yaml": "4.1.0"
34
34
  },
35
35
  "dependencies": {
36
- "@nx/devkit": "18.2.0-canary.20240320-64b2396",
37
- "@nx/js": "18.2.0-canary.20240320-64b2396",
36
+ "@nx/devkit": "18.2.0-canary.20240321-2a4c57d",
37
+ "@nx/js": "18.2.0-canary.20240321-2a4c57d",
38
38
  "eslint": "^8.0.0",
39
39
  "tslib": "^2.3.0",
40
40
  "typescript": "~5.4.2",
41
- "@nx/linter": "18.2.0-canary.20240320-64b2396"
41
+ "@nx/linter": "18.2.0-canary.20240321-2a4c57d"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "js-yaml": {
@@ -104,6 +104,10 @@ function migrateEslintFile(projectEslintPath, tree) {
104
104
  }
105
105
  // add extends
106
106
  json.extends = json.extends || [];
107
+ // ensure extends is an array
108
+ if (typeof json.extends === 'string') {
109
+ json.extends = [json.extends];
110
+ }
107
111
  const pathToRootConfig = `${(0, devkit_1.offsetFromRoot)((0, path_1.dirname)(projectEslintPath))}${baseFile}`;
108
112
  if (json.extends.indexOf(pathToRootConfig) === -1) {
109
113
  json.extends.push(pathToRootConfig);