astro-eslint-parser 2.0.0 → 2.1.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.
- package/lib/index.mjs +10 -11
- package/package.json +5 -6
package/lib/index.mjs
CHANGED
|
@@ -8,8 +8,7 @@ import path from "path";
|
|
|
8
8
|
import * as fs$1 from "fs";
|
|
9
9
|
import fs from "fs";
|
|
10
10
|
import semver, { satisfies } from "semver";
|
|
11
|
-
import
|
|
12
|
-
import isGlob from "is-glob";
|
|
11
|
+
import { globSync, isDynamicPattern } from "tinyglobby";
|
|
13
12
|
import { Reference, Variable, analyze } from "@typescript-eslint/scope-manager";
|
|
14
13
|
import * as eslintScope$1 from "eslint-scope";
|
|
15
14
|
import { DecodingMode, EntityDecoder, htmlDecodeTree } from "entities/decode";
|
|
@@ -177,7 +176,6 @@ function toAbsolutePath(filePath, baseDir) {
|
|
|
177
176
|
* Code from: https://github.com/typescript-eslint/typescript-eslint/blob/v5.62.0/packages/typescript-estree/src/parseSettings/resolveProjectList.ts
|
|
178
177
|
* Code updated to exclude caching.
|
|
179
178
|
*/
|
|
180
|
-
const { sync: globSync } = fastGlob;
|
|
181
179
|
/**
|
|
182
180
|
* Normalizes, sanitizes, resolves and filters the provided project paths
|
|
183
181
|
*/
|
|
@@ -188,13 +186,14 @@ function resolveProjectList(options) {
|
|
|
188
186
|
for (const project of options.project) if (typeof project === "string") sanitizedProjects.push(project);
|
|
189
187
|
}
|
|
190
188
|
if (sanitizedProjects.length === 0) return [];
|
|
191
|
-
const projectFolderIgnoreList = (options.projectFolderIgnoreList ?? ["**/node_modules/**"]).
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
189
|
+
const projectFolderIgnoreList = (options.projectFolderIgnoreList ?? ["**/node_modules/**"]).filter((folder) => typeof folder === "string");
|
|
190
|
+
const nonGlobProjects = sanitizedProjects.filter((project) => !isDynamicPattern(project));
|
|
191
|
+
const globProjects = sanitizedProjects.filter((project) => isDynamicPattern(project));
|
|
192
|
+
const uniqueCanonicalProjectPaths = new Set(nonGlobProjects.concat(globProjects.length === 0 ? [] : globSync(globProjects, {
|
|
193
|
+
cwd: options.tsconfigRootDir,
|
|
194
|
+
expandDirectories: false,
|
|
195
|
+
ignore: projectFolderIgnoreList
|
|
196
|
+
})).map((project) => getCanonicalFileName(ensureAbsolutePath(project, options.tsconfigRootDir))));
|
|
198
197
|
return Array.from(uniqueCanonicalProjectPaths);
|
|
199
198
|
}
|
|
200
199
|
/**
|
|
@@ -2414,7 +2413,7 @@ var ast_exports = /* @__PURE__ */ __exportAll({});
|
|
|
2414
2413
|
//#endregion
|
|
2415
2414
|
//#region package.json
|
|
2416
2415
|
var name = "astro-eslint-parser";
|
|
2417
|
-
var version = "2.
|
|
2416
|
+
var version = "2.1.0";
|
|
2418
2417
|
//#endregion
|
|
2419
2418
|
//#region src/meta.ts
|
|
2420
2419
|
var meta_exports = /* @__PURE__ */ __exportAll({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-eslint-parser",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Astro component parser for ESLint",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.mjs",
|
|
@@ -64,9 +64,8 @@
|
|
|
64
64
|
"eslint-scope": "^9.1.2",
|
|
65
65
|
"eslint-visitor-keys": "^5.0.1",
|
|
66
66
|
"espree": "^11.2.0",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"semver": "^7.3.8"
|
|
67
|
+
"semver": "^7.3.8",
|
|
68
|
+
"tinyglobby": "^0.2.17"
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
71
|
"@changesets/changelog-github": "^0.7.0",
|
|
@@ -83,7 +82,7 @@
|
|
|
83
82
|
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
|
84
83
|
"@typescript-eslint/parser": "^8.61.0",
|
|
85
84
|
"@typescript-eslint/typescript-estree": "^8.61.0",
|
|
86
|
-
"astro": "^
|
|
85
|
+
"astro": "^7.0.0",
|
|
87
86
|
"astro-eslint-parser": ">=0.1.0",
|
|
88
87
|
"benchmark": "^2.1.4",
|
|
89
88
|
"chai": "^6.0.0",
|
|
@@ -91,7 +90,7 @@
|
|
|
91
90
|
"eslint": "^10.5.0",
|
|
92
91
|
"eslint-config-prettier": "^10.0.0",
|
|
93
92
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
94
|
-
"eslint-plugin-astro": "^
|
|
93
|
+
"eslint-plugin-astro": "^2.0.0",
|
|
95
94
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
96
95
|
"eslint-plugin-jsdoc": "^63.0.2",
|
|
97
96
|
"eslint-plugin-json-schema-validator": "^6.0.0",
|