eslint-plugin-better-stylelint 2.0.5 → 2.1.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.
package/README.md CHANGED
@@ -118,5 +118,5 @@ Each `<style>` block in a `.vue` file is linted separately. The bridge:
118
118
  ## Project links
119
119
 
120
120
  - Documentation: https://repoctl.icebreaker.top
121
- - Repository: https://github.com/sonofmagic/repoctl/tree/main/packages/eslint-plugin-better-stylelint
122
- - Issues: https://github.com/sonofmagic/repoctl/issues
121
+ - Repository: https://github.com/icelib/repoctl/tree/main/packages/eslint-plugin-better-stylelint
122
+ - Issues: https://github.com/icelib/repoctl/issues
package/dist/index.js CHANGED
@@ -1,20 +1,14 @@
1
- import { createRequire } from "node:module";
2
1
  import { execFileSync } from "node:child_process";
3
2
  import { createHash } from "node:crypto";
4
- import fs from "node:fs";
5
- import os from "node:os";
6
3
  import path from "node:path";
7
4
  import process from "node:process";
8
- import { fileURLToPath, pathToFileURL } from "node:url";
5
+ import { fileURLToPath } from "node:url";
9
6
  //#region src/core.ts
10
7
  const MAX_CACHE_ENTRIES = 100;
11
- const CORE_TS_PATTERN = /core\.ts$/u;
12
8
  const CORE_JS_PATTERN = /core\.js$/u;
13
- const WORKER_BOOTSTRAP_PREFIX = "icebreaker-stylelint-worker-";
14
9
  const resultCache = /* @__PURE__ */ new Map();
15
10
  const configCacheIds = /* @__PURE__ */ new WeakMap();
16
11
  let nextConfigCacheId = 0;
17
- const require = createRequire(import.meta.url);
18
12
  const UNSUPPORTED_EXEC_ARGV_FLAGS = /* @__PURE__ */ new Set([
19
13
  "--eval",
20
14
  "-e",
@@ -86,7 +80,7 @@ function setCachedMessages(cacheKey, messages) {
86
80
  }
87
81
  function resolveWorkerPath() {
88
82
  const currentFilePath = fileURLToPath(import.meta.url);
89
- if (currentFilePath.endsWith(".ts")) return currentFilePath.replace(CORE_TS_PATTERN, "worker.ts");
83
+ if (currentFilePath.endsWith(".ts")) return path.resolve(path.dirname(currentFilePath), "../dist/worker.js");
90
84
  return currentFilePath.replace(CORE_JS_PATTERN, "worker.js");
91
85
  }
92
86
  function getWorkerExecArgv() {
@@ -107,21 +101,6 @@ function getWorkerExecArgv() {
107
101
  return workerExecArgv;
108
102
  }
109
103
  function resolveWorkerCommand(workerPath) {
110
- if (workerPath.endsWith(".ts")) {
111
- const workerEntry = pathToFileURL(workerPath).href;
112
- const tsxLoaderEntry = pathToFileURL(require.resolve("tsx/esm")).href;
113
- const bootstrapPath = path.join(os.tmpdir(), `${WORKER_BOOTSTRAP_PREFIX}${createHash("sha1").update(workerEntry).digest("hex")}.mjs`);
114
- if (!fs.existsSync(bootstrapPath)) fs.writeFileSync(bootstrapPath, `import ${JSON.stringify(workerEntry)}\n`, "utf8");
115
- return {
116
- command: process.execPath,
117
- args: [
118
- ...getWorkerExecArgv(),
119
- "--import",
120
- tsxLoaderEntry,
121
- bootstrapPath
122
- ]
123
- };
124
- }
125
104
  return {
126
105
  command: process.execPath,
127
106
  args: [...getWorkerExecArgv(), workerPath]
package/dist/worker.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createRequire } from "node:module";
2
- import fs from "node:fs";
3
2
  import path from "node:path";
4
3
  import process from "node:process";
5
4
  import { fileURLToPath, pathToFileURL } from "node:url";
5
+ import fs from "node:fs";
6
6
  //#region src/worker.ts
7
7
  function normalizeWarning(warning) {
8
8
  return {
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "eslint-plugin-better-stylelint",
3
3
  "type": "module",
4
- "version": "2.0.5",
4
+ "version": "2.1.1",
5
5
  "description": "Bridge Stylelint diagnostics into ESLint for style files and Vue SFCs",
6
- "author": "ice breaker <1324318532@qq.com>",
6
+ "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://repoctl.icebreaker.top",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/sonofmagic/repoctl.git",
11
+ "url": "git+https://github.com/icelib/repoctl.git",
12
12
  "directory": "packages/eslint-plugin-better-stylelint"
13
13
  },
14
14
  "bugs": {
15
- "url": "https://github.com/sonofmagic/repoctl/issues"
15
+ "url": "https://github.com/icelib/repoctl/issues"
16
16
  },
17
17
  "keywords": [
18
18
  "repoctl",
@@ -36,7 +36,7 @@
36
36
  "dist"
37
37
  ],
38
38
  "engines": {
39
- "node": ">=22.12.0"
39
+ "node": ">=22.13.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "eslint": "^9.0.0 || ^10.0.0",