astro-eslint-parser 0.10.0 → 0.11.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.js +4 -2
- package/lib/index.mjs +4 -2
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1826,7 +1826,9 @@ var ParserOptionsContext = class {
|
|
|
1826
1826
|
|
|
1827
1827
|
// src/parser/scope/index.ts
|
|
1828
1828
|
var import_scope_manager2 = require("@typescript-eslint/scope-manager");
|
|
1829
|
-
var
|
|
1829
|
+
var READ_FLAG = 1;
|
|
1830
|
+
var WRITE_FLAG = 2;
|
|
1831
|
+
var READ_WRITE_FLAG = 3;
|
|
1830
1832
|
function getProgramScope(scopeManager) {
|
|
1831
1833
|
const globalScope = scopeManager.globalScope;
|
|
1832
1834
|
return globalScope.childScopes.find((s) => s.type === "module") || globalScope;
|
|
@@ -1864,7 +1866,7 @@ function addVirtualReference(node, variable, scope, readWrite) {
|
|
|
1864
1866
|
const reference = new import_scope_manager2.Reference(
|
|
1865
1867
|
node,
|
|
1866
1868
|
scope,
|
|
1867
|
-
readWrite.write && readWrite.read ?
|
|
1869
|
+
readWrite.write && readWrite.read ? READ_WRITE_FLAG : readWrite.write ? WRITE_FLAG : READ_FLAG
|
|
1868
1870
|
);
|
|
1869
1871
|
reference.astroVirtualReference = true;
|
|
1870
1872
|
addReference(variable.references, reference);
|
package/lib/index.mjs
CHANGED
|
@@ -1800,7 +1800,9 @@ import {
|
|
|
1800
1800
|
Reference as ReferenceClass,
|
|
1801
1801
|
Variable as VariableClass
|
|
1802
1802
|
} from "@typescript-eslint/scope-manager";
|
|
1803
|
-
|
|
1803
|
+
var READ_FLAG = 1;
|
|
1804
|
+
var WRITE_FLAG = 2;
|
|
1805
|
+
var READ_WRITE_FLAG = 3;
|
|
1804
1806
|
function getProgramScope(scopeManager) {
|
|
1805
1807
|
const globalScope = scopeManager.globalScope;
|
|
1806
1808
|
return globalScope.childScopes.find((s) => s.type === "module") || globalScope;
|
|
@@ -1838,7 +1840,7 @@ function addVirtualReference(node, variable, scope, readWrite) {
|
|
|
1838
1840
|
const reference = new ReferenceClass(
|
|
1839
1841
|
node,
|
|
1840
1842
|
scope,
|
|
1841
|
-
readWrite.write && readWrite.read ?
|
|
1843
|
+
readWrite.write && readWrite.read ? READ_WRITE_FLAG : readWrite.write ? WRITE_FLAG : READ_FLAG
|
|
1842
1844
|
);
|
|
1843
1845
|
reference.astroVirtualReference = true;
|
|
1844
1846
|
addReference(variable.references, reference);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-eslint-parser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Astro component parser for ESLint",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://github.com/ota-meshi/astro-eslint-parser#readme",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@astrojs/compiler": "^0.
|
|
50
|
+
"@astrojs/compiler": "^1.0.0",
|
|
51
51
|
"@typescript-eslint/scope-manager": "^5.48.2",
|
|
52
52
|
"@typescript-eslint/types": "^5.25.0",
|
|
53
53
|
"astrojs-compiler-sync": "^0.3.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"eslint": "^8.15.0",
|
|
82
82
|
"eslint-config-prettier": "^8.3.0",
|
|
83
83
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
84
|
-
"eslint-plugin-astro": "^0.
|
|
84
|
+
"eslint-plugin-astro": "^0.22.0",
|
|
85
85
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
86
86
|
"eslint-plugin-json-schema-validator": "^4.0.0",
|
|
87
87
|
"eslint-plugin-jsonc": "^2.0.0",
|