@plumeria/eslint-plugin 19.4.0 → 19.5.1
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.customPropsRequireImport = void 0;
|
|
4
|
-
const
|
|
4
|
+
const compiler_1 = require("@plumeria/compiler");
|
|
5
5
|
const style_prop_1 = require("../util/style-prop");
|
|
6
6
|
const CORE = '@plumeria/core';
|
|
7
7
|
const styleRoots = (node, roots) => {
|
|
@@ -55,7 +55,7 @@ const scanTables = (cwd, styleProp) => {
|
|
|
55
55
|
if (!recentScan ||
|
|
56
56
|
recentScan.key !== key ||
|
|
57
57
|
now - recentScan.at > SCAN_REUSE_MS) {
|
|
58
|
-
recentScan = { key, at: now, tables: (0,
|
|
58
|
+
recentScan = { key, at: now, tables: (0, compiler_1.scanAll)(cwd, styleProp) };
|
|
59
59
|
}
|
|
60
60
|
return recentScan.tables;
|
|
61
61
|
};
|
|
@@ -105,11 +105,11 @@ exports.customPropsRequireImport = {
|
|
|
105
105
|
const exportName = binding.importedName ?? root.member;
|
|
106
106
|
if (!exportName)
|
|
107
107
|
return null;
|
|
108
|
-
const actualPath = (0,
|
|
108
|
+
const actualPath = (0, compiler_1.resolveImportPath)(binding.source, filename);
|
|
109
109
|
if (!actualPath)
|
|
110
110
|
return null;
|
|
111
111
|
const tables = scanTables(context.cwd, styleProp);
|
|
112
|
-
const resolved = (0,
|
|
112
|
+
const resolved = (0, compiler_1.resolveExport)(actualPath, exportName);
|
|
113
113
|
if (!resolved)
|
|
114
114
|
return null;
|
|
115
115
|
const key = `${resolved.filePath}-${resolved.localName}`;
|
package/dist/util/staticValue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.staticValueResolver = staticValueResolver;
|
|
4
|
-
const
|
|
4
|
+
const compiler_1 = require("@plumeria/compiler");
|
|
5
5
|
const CORE = '@plumeria/core';
|
|
6
6
|
const unwrap = (node) => {
|
|
7
7
|
while (node &&
|
|
@@ -52,10 +52,10 @@ function staticValueResolver(context) {
|
|
|
52
52
|
return undefined;
|
|
53
53
|
};
|
|
54
54
|
const importedValue = (source, exportName) => {
|
|
55
|
-
const actualPath = (0,
|
|
55
|
+
const actualPath = (0, compiler_1.resolveImportPath)(source, filename);
|
|
56
56
|
if (!actualPath)
|
|
57
57
|
return undefined;
|
|
58
|
-
return (0,
|
|
58
|
+
return (0, compiler_1.resolveExportValue)(actualPath, exportName);
|
|
59
59
|
};
|
|
60
60
|
const isCreateStatic = (callee) => {
|
|
61
61
|
callee = unwrap(callee);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/eslint-plugin",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.5.1",
|
|
4
4
|
"description": "Plumeria ESLint plugin",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"known-css-properties": "^0.37.0",
|
|
57
57
|
"zss-engine": "2.8.0",
|
|
58
|
-
"@plumeria/
|
|
58
|
+
"@plumeria/compiler": "19.5.1"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "rimraf dist && pnpm cjs",
|