eslint-plugin-better-stylelint 2.0.4 → 2.0.5
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/dist/index.d.ts +6 -6
- package/dist/worker.js +2 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -30,9 +30,9 @@ interface BetterStylelintProcessor {
|
|
|
30
30
|
type BetterStylelintRuleOptions = BetterStylelintOptions;
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/processor.d.ts
|
|
33
|
-
declare function createStylelintProcessor(options?: BetterStylelintRuleOptions): BetterStylelintProcessor;
|
|
34
|
-
declare const cssProcessor: BetterStylelintProcessor;
|
|
35
|
-
declare const scssProcessor: BetterStylelintProcessor;
|
|
33
|
+
export declare function createStylelintProcessor(options?: BetterStylelintRuleOptions): BetterStylelintProcessor;
|
|
34
|
+
export declare const cssProcessor: BetterStylelintProcessor;
|
|
35
|
+
export declare const scssProcessor: BetterStylelintProcessor;
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/rule.d.ts
|
|
38
38
|
interface RuleContext {
|
|
@@ -55,7 +55,7 @@ interface RuleContext {
|
|
|
55
55
|
text: string;
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
declare const lintRule: {
|
|
58
|
+
export declare const lintRule: {
|
|
59
59
|
meta: {
|
|
60
60
|
type: string;
|
|
61
61
|
docs: {
|
|
@@ -86,7 +86,7 @@ declare const lintRule: {
|
|
|
86
86
|
};
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/core.d.ts
|
|
89
|
-
declare function runStylelintSync(code: string, filename: string, options?: BetterStylelintOptions | string): BetterStylelintMessage[];
|
|
89
|
+
export declare function runStylelintSync(code: string, filename: string, options?: BetterStylelintOptions | string): BetterStylelintMessage[];
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region src/index.d.ts
|
|
92
92
|
interface BetterStylelintPlugin {
|
|
@@ -104,4 +104,4 @@ interface BetterStylelintPlugin {
|
|
|
104
104
|
}
|
|
105
105
|
declare const plugin: BetterStylelintPlugin;
|
|
106
106
|
//#endregion
|
|
107
|
-
export { type BetterStylelintConfig, type BetterStylelintMessage, type BetterStylelintOptions, type BetterStylelintProcessor, type BetterStylelintRuleOptions,
|
|
107
|
+
export { type BetterStylelintConfig, type BetterStylelintMessage, type BetterStylelintOptions, type BetterStylelintProcessor, type BetterStylelintRuleOptions, plugin as default };
|
package/dist/worker.js
CHANGED
|
@@ -45,7 +45,8 @@ function resolveStylelintEntry(cwd) {
|
|
|
45
45
|
}
|
|
46
46
|
async function runStylelint(code, filename, options) {
|
|
47
47
|
try {
|
|
48
|
-
const
|
|
48
|
+
const stylelintEntry = resolveStylelintEntry(options.cwd);
|
|
49
|
+
const stylelintModule = await import(pathToFileURL(stylelintEntry).href);
|
|
49
50
|
const stylelint = stylelintModule.default ?? stylelintModule;
|
|
50
51
|
const config = await resolveStylelintConfig(options);
|
|
51
52
|
return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-better-stylelint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.5",
|
|
5
5
|
"description": "Bridge Stylelint diagnostics into ESLint for style files and Vue SFCs",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"eslint": "^9.0.0 || ^10.0.0",
|
|
43
|
-
"stylelint": "^17.
|
|
43
|
+
"stylelint": "^17.15.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"stylelint": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"stylelint": "^17.
|
|
51
|
+
"stylelint": "^17.15.0"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public",
|