@tomjs/stylelint 6.0.0 → 7.1.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.
@@ -0,0 +1,7 @@
1
+ //#region src/globs.d.ts
2
+ /**
3
+ * https://github.com/antfu/eslint-config/blob/5af1d9bf96609ab1d0a820cee0f83cd6948a0c5d/src/globs.ts#L56C14-L56C26
4
+ */
5
+ declare const IGNORE_FILES: string[];
6
+ //#endregion
7
+ export { IGNORE_FILES };
package/dist/globs.js ADDED
@@ -0,0 +1,30 @@
1
+ //#region src/globs.ts
2
+ /**
3
+ * https://github.com/antfu/eslint-config/blob/5af1d9bf96609ab1d0a820cee0f83cd6948a0c5d/src/globs.ts#L56C14-L56C26
4
+ */
5
+ const IGNORE_FILES = [
6
+ "**/node_modules/**",
7
+ "**/dist/**",
8
+ "**/output/**",
9
+ "**/coverage/**",
10
+ "**/temp/**",
11
+ "**/.temp/**",
12
+ "**/tmp/**",
13
+ "**/.tmp/**",
14
+ "**/.history/**",
15
+ "**/.vitepress/cache/**",
16
+ "**/.nuxt/**",
17
+ "**/.next/**",
18
+ "**/.svelte-kit/**",
19
+ "**/.vercel/**",
20
+ "**/.changeset/**",
21
+ "**/.idea/**",
22
+ "**/.cache/**",
23
+ "**/.output/**",
24
+ "**/.vite-inspect/**",
25
+ "**/.yarn/**",
26
+ "**/__snapshots__/**"
27
+ ];
28
+
29
+ //#endregion
30
+ export { IGNORE_FILES };
@@ -0,0 +1,7 @@
1
+ import { IGNORE_FILES } from "./globs.js";
2
+ import { Config } from "stylelint";
3
+
4
+ //#region src/index.d.ts
5
+ declare const config: Config;
6
+ //#endregion
7
+ export { IGNORE_FILES, config as default };
package/dist/index.js CHANGED
@@ -1,50 +1,25 @@
1
- //#region src/globs.ts
2
- /**
3
- * https://github.com/antfu/eslint-config/blob/5af1d9bf96609ab1d0a820cee0f83cd6948a0c5d/src/globs.ts#L56C14-L56C26
4
- */
5
- const GLOB_EXCLUDE = [
6
- "**/node_modules",
7
- "**/dist",
8
- "**/output",
9
- "**/coverage",
10
- "**/temp",
11
- "**/.temp",
12
- "**/tmp",
13
- "**/.tmp",
14
- "**/.history",
15
- "**/.vitepress/cache",
16
- "**/.nuxt",
17
- "**/.next",
18
- "**/.svelte-kit",
19
- "**/.vercel",
20
- "**/.changeset",
21
- "**/.idea",
22
- "**/.cache",
23
- "**/.output",
24
- "**/.vite-inspect",
25
- "**/.yarn",
26
- "**/CHANGELOG*.md",
27
- "**/*.min.*",
28
- "**/LICENSE*",
29
- "**/__snapshots__"
30
- ];
1
+ import { IGNORE_FILES } from "./globs.js";
31
2
 
32
- //#endregion
33
3
  //#region src/index.ts
34
4
  const config = {
35
- extends: [
36
- "stylelint-config-recommended",
37
- "stylelint-config-recommended-scss",
38
- "stylelint-config-recommended-vue/scss",
39
- "stylelint-config-html/vue",
40
- "stylelint-config-recess-order"
41
- ],
5
+ extends: ["stylelint-config-recommended", "stylelint-config-recess-order"],
6
+ plugins: ["stylelint-order", "stylelint-scss"],
7
+ ignoreFiles: [...IGNORE_FILES],
42
8
  overrides: [{
43
- files: ["**/*.{vue,html}"],
44
- customSyntax: "postcss-html"
9
+ customSyntax: "postcss-html",
10
+ files: ["*.(html|vue)", "**/*.(html|vue)"],
11
+ rules: {
12
+ "selector-pseudo-class-no-unknown": [true, { ignorePseudoClasses: ["global", "deep"] }],
13
+ "selector-pseudo-element-no-unknown": [true, { ignorePseudoElements: [
14
+ "v-deep",
15
+ "v-global",
16
+ "v-slotted"
17
+ ] }]
18
+ }
45
19
  }, {
46
- files: ["**/*.{css,scss}"],
47
- customSyntax: "postcss-scss"
20
+ files: ["*.scss", "**/*.scss"],
21
+ customSyntax: "postcss-scss",
22
+ extends: ["stylelint-config-recommended-scss", "stylelint-config-recommended-vue/scss"]
48
23
  }],
49
24
  rules: {
50
25
  "alpha-value-notation": "number",
@@ -59,17 +34,30 @@ const config = {
59
34
  "rule-empty-line-before": ["always", { ignore: ["after-comment", "first-nested"] }],
60
35
  "selector-class-pattern": null,
61
36
  "selector-not-notation": null,
62
- "selector-pseudo-class-no-unknown": [true, { ignorePseudoClasses: ["global", "deep"] }]
63
- },
64
- ignoreFiles: [
65
- ...GLOB_EXCLUDE,
66
- "**/*.js",
67
- "**/*.jsx",
68
- "**/*.tsx",
69
- "**/*.ts"
70
- ]
37
+ "at-rule-no-unknown": [true, { ignoreAtRules: [
38
+ "extends",
39
+ "ignores",
40
+ "include",
41
+ "mixin",
42
+ "if",
43
+ "else",
44
+ "media",
45
+ "for",
46
+ "at-root",
47
+ "tailwind",
48
+ "apply",
49
+ "variants",
50
+ "responsive",
51
+ "screen",
52
+ "function",
53
+ "each",
54
+ "use",
55
+ "forward",
56
+ "return"
57
+ ] }]
58
+ }
71
59
  };
72
60
  var src_default = config;
73
61
 
74
62
  //#endregion
75
- export { src_default as default };
63
+ export { IGNORE_FILES, src_default as default };
@@ -0,0 +1,6 @@
1
+ import { Config } from "stylelint";
2
+
3
+ //#region src/uniapp.d.ts
4
+ declare const _default: Config;
5
+ //#endregion
6
+ export { _default as default };
package/dist/uniapp.js ADDED
@@ -0,0 +1,12 @@
1
+ //#region src/uniapp.ts
2
+ var uniapp_default = {
3
+ extends: ["./index"],
4
+ rules: {
5
+ "unit-no-unknown": [true, { ignoreUnits: ["rpx"] }],
6
+ "declaration-property-value-no-unknown": [true, { ignoreProperties: { "/.+/": ["/rpx$/", "/$/"] } }],
7
+ "selector-type-no-unknown": [true, { ignoreTypes: ["page"] }]
8
+ }
9
+ };
10
+
11
+ //#endregion
12
+ export { uniapp_default as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tomjs/stylelint",
3
3
  "type": "module",
4
- "version": "6.0.0",
4
+ "version": "7.1.0",
5
5
  "description": "stylelint config for tomjs",
6
6
  "author": {
7
7
  "name": "Tom Gao",
@@ -24,7 +24,18 @@
24
24
  "scss",
25
25
  "vue"
26
26
  ],
27
- "exports": "./dist/index.js",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js"
31
+ },
32
+ "./uniapp": {
33
+ "types": "./dist/uniapp.d.ts",
34
+ "import": "./dist/uniapp.js"
35
+ }
36
+ },
37
+ "module": "./dist/index.js",
38
+ "types": "./dist/index.d.ts",
28
39
  "files": [
29
40
  "dist"
30
41
  ],
@@ -32,17 +43,19 @@
32
43
  "node": ">=18.12.0"
33
44
  },
34
45
  "peerDependencies": {
35
- "stylelint": "^16.8.2"
46
+ "stylelint": "^16.25.0"
36
47
  },
37
48
  "dependencies": {
38
- "postcss": "^8.5.3",
49
+ "postcss": "^8.5.6",
39
50
  "postcss-html": "^1.8.0",
40
51
  "postcss-scss": "^4.0.9",
41
52
  "stylelint-config-html": "^1.1.0",
42
- "stylelint-config-recess-order": "^6.0.0",
43
- "stylelint-config-recommended": "^14.0.1",
44
- "stylelint-config-recommended-scss": "^14.1.0",
45
- "stylelint-config-recommended-vue": "~1.5.0"
53
+ "stylelint-config-recess-order": "^7.4.0",
54
+ "stylelint-config-recommended": "^17.0.0",
55
+ "stylelint-config-recommended-scss": "^16.0.2",
56
+ "stylelint-config-recommended-vue": "^1.6.1",
57
+ "stylelint-order": "^7.0.0",
58
+ "stylelint-scss": "^6.12.1"
46
59
  },
47
60
  "scripts": {
48
61
  "build": "tsdown"