eslint-plugin-vue-scoped-css 2.4.0 → 2.5.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.
|
@@ -37,7 +37,12 @@ function getVueComponentObject(node) {
|
|
|
37
37
|
}
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
+
const vueComponentCache = new WeakMap();
|
|
40
41
|
function findVueComponent(context) {
|
|
42
|
+
const cached = vueComponentCache.get(context);
|
|
43
|
+
if (cached !== undefined && cached.cachedAt > Date.now() - 1000) {
|
|
44
|
+
return cached.component;
|
|
45
|
+
}
|
|
41
46
|
const sourceCode = context.getSourceCode();
|
|
42
47
|
const componentComments = sourceCode
|
|
43
48
|
.getAllComments()
|
|
@@ -77,6 +82,10 @@ function findVueComponent(context) {
|
|
|
77
82
|
leaveNode() {
|
|
78
83
|
},
|
|
79
84
|
});
|
|
85
|
+
vueComponentCache.set(context, {
|
|
86
|
+
component: result,
|
|
87
|
+
cachedAt: Date.now(),
|
|
88
|
+
});
|
|
80
89
|
return result;
|
|
81
90
|
}
|
|
82
91
|
exports.default = findVueComponent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-vue-scoped-css",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "ESLint plugin for Scoped CSS in Vue.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"raw-loader": "^4.0.1",
|
|
83
83
|
"rimraf": "^3.0.2",
|
|
84
84
|
"semver": "^7.3.2",
|
|
85
|
-
"stylelint": "^
|
|
85
|
+
"stylelint": "^15.0.0",
|
|
86
86
|
"stylelint-config-recommended-vue": "^1.1.0",
|
|
87
|
-
"stylelint-config-standard": "^
|
|
88
|
-
"stylelint-stylus": "^0.
|
|
87
|
+
"stylelint-config-standard": "^33.0.0",
|
|
88
|
+
"stylelint-stylus": "^0.18.0",
|
|
89
89
|
"ts-node": "^10.9.1",
|
|
90
|
-
"typescript": "^
|
|
90
|
+
"typescript": "^5.0.0",
|
|
91
91
|
"vue-eslint-editor": "^1.1.0",
|
|
92
92
|
"vue-eslint-parser": "^9.0.0",
|
|
93
93
|
"vuepress": "^1.8.2"
|