@nx/eslint 19.3.0-canary.20240611-1600875 → 19.3.0-canary.20240612-4a5eb23

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": "19.3.0-canary.20240611-1600875",
3
+ "version": "19.3.0-canary.20240612-4a5eb23",
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,12 +35,12 @@
35
35
  "eslint": "^8.0.0 || ^9.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "19.3.0-canary.20240611-1600875",
39
- "@nx/js": "19.3.0-canary.20240611-1600875",
38
+ "@nx/devkit": "19.3.0-canary.20240612-4a5eb23",
39
+ "@nx/js": "19.3.0-canary.20240612-4a5eb23",
40
40
  "semver": "^7.5.3",
41
41
  "tslib": "^2.3.0",
42
42
  "typescript": "~5.4.2",
43
- "@nx/linter": "19.3.0-canary.20240611-1600875"
43
+ "@nx/linter": "19.3.0-canary.20240612-4a5eb23"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "@zkochan/js-yaml": {
@@ -27,31 +27,32 @@ exports.isFlatConfig = isFlatConfig;
27
27
  // https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-resolution
28
28
  function findFlatConfigFile(directory, workspaceRoot) {
29
29
  let currentDir = (0, path_1.resolve)(workspaceRoot, directory);
30
- if (currentDir === workspaceRoot) {
31
- return getConfigFileInDirectory(currentDir, exports.ESLINT_FLAT_CONFIG_FILENAMES);
32
- }
33
- while (currentDir !== workspaceRoot) {
30
+ while (true) {
34
31
  const configFilePath = getConfigFileInDirectory(currentDir, exports.ESLINT_FLAT_CONFIG_FILENAMES);
35
32
  if (configFilePath) {
36
33
  return configFilePath;
37
34
  }
35
+ if (currentDir === workspaceRoot) {
36
+ break;
37
+ }
38
38
  currentDir = (0, path_1.dirname)(currentDir);
39
39
  }
40
40
  return null;
41
41
  }
42
42
  exports.findFlatConfigFile = findFlatConfigFile;
43
43
  function findOldConfigFile(filePathOrDirectory, workspaceRoot) {
44
- let currentDir = (0, fs_1.statSync)(filePathOrDirectory).isDirectory()
45
- ? filePathOrDirectory
46
- : (0, path_1.dirname)(filePathOrDirectory);
47
- if (currentDir === workspaceRoot) {
48
- return getConfigFileInDirectory(currentDir, exports.ESLINT_OLD_CONFIG_FILENAMES);
44
+ let currentDir = (0, path_1.resolve)(workspaceRoot, filePathOrDirectory);
45
+ if (!(0, fs_1.statSync)(currentDir).isDirectory()) {
46
+ currentDir = (0, path_1.dirname)(currentDir);
49
47
  }
50
- while (currentDir !== workspaceRoot) {
48
+ while (true) {
51
49
  const configFilePath = getConfigFileInDirectory(currentDir, exports.ESLINT_OLD_CONFIG_FILENAMES);
52
50
  if (configFilePath) {
53
51
  return configFilePath;
54
52
  }
53
+ if (currentDir === workspaceRoot) {
54
+ break;
55
+ }
55
56
  currentDir = (0, path_1.dirname)(currentDir);
56
57
  }
57
58
  return null;