@pengzhanbo/stylelint-config 0.4.3 → 1.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.
package/README.md CHANGED
@@ -19,3 +19,40 @@ In `.stylelintrc.json`
19
19
  "extends": "@pengzhanbo/stylelint-config"
20
20
  }
21
21
  ```
22
+
23
+
24
+ ## vs Code support (auto fix)
25
+
26
+ ```json
27
+ {
28
+ "css.validate": false,
29
+ "less.validate": false,
30
+ "scss.validate": false,
31
+ "stylelint.validate": [
32
+ "css",
33
+ "scss",
34
+ "postcss",
35
+ // optional
36
+ "vue",
37
+ "markdown",
38
+ // when use css-in-js
39
+ "javascript",
40
+ "javascriptreact",
41
+ "typescript",
42
+ "typescriptreact"
43
+ ],
44
+ "editor.codeActionsOnSave": {
45
+ "source.fixAll.stylelint": "explicit"
46
+ }
47
+ }
48
+ ```
49
+
50
+ ## 相关资源
51
+ - [@pengzhanbo/eslint-config](https://github.com/pengzhanbo/configs/tree/main/packages/eslint-config)
52
+ - [@pengzhanbo/eslint-config-vue](https://github.com/pengzhanbo/configs/tree/main/packages/eslint-config-vue)
53
+ - [@pengzhanbo/eslint-config-react](https://github.com/pengzhanbo/configs/tree/main/packages/eslint-config-react)
54
+ - [@pengzhanbo/eslint-config-svelte](https://github.com/pengzhanbo/configs/tree/main/packages/eslint-config-svelte)
55
+ - [@pengzhanbo/eslint-config-solid](https://github.com/pengzhanbo/configs/tree/main/packages/eslint-config-solid)
56
+ - [@pengzhanbo/eslint-config-astro](https://github.com/pengzhanbo/configs/tree/main/packages/eslint-config-astro)
57
+ - [@pengzhanbo/prettier-config](https://github.com/pengzhanbo/configs/tree/main/packages/prettier-config)
58
+ - [@pengzhanbo/stylelint-config](https://github.com/pengzhanbo/configs/tree/main/packages/stylelint-config)
package/dist/index.cjs CHANGED
@@ -1,9 +1,31 @@
1
- 'use strict';
2
-
3
- const localPkg = require('local-pkg');
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4
19
 
5
- const cssInJs = localPkg.isPackageExists("styled-components") || localPkg.isPackageExists("@emotion/css") || localPkg.isPackageExists("@emotion/react") || localPkg.isPackageExists("@emotion/styled");
6
- const jsExtension = [
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ default: () => src_default
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ var import_local_pkg = require("local-pkg");
27
+ var cssInJs = (0, import_local_pkg.isPackageExists)("styled-components") || (0, import_local_pkg.isPackageExists)("@emotion/css") || (0, import_local_pkg.isPackageExists)("@emotion/react") || (0, import_local_pkg.isPackageExists)("@emotion/styled");
28
+ var jsExtension = [
7
29
  "*.js",
8
30
  "*.ts",
9
31
  "*.jsx",
@@ -13,16 +35,17 @@ const jsExtension = [
13
35
  "*.mts",
14
36
  "*.cts"
15
37
  ];
16
- const ignoreJs = !cssInJs ? jsExtension : [];
17
- const jsOverrides = cssInJs ? [
38
+ var ignoreJs = !cssInJs ? jsExtension : [];
39
+ var jsOverrides = cssInJs ? [
18
40
  {
19
41
  files: jsExtension.map((extension) => [extension, `**/${extension}`]).flat(),
20
42
  customSyntax: "postcss-styled-syntax"
21
43
  }
22
44
  ] : [];
23
- const index = {
45
+ var src_default = {
24
46
  extends: ["stylelint-config-standard", "stylelint-config-recess-order"],
25
47
  ignoreFiles: [
48
+ "**/node_modules/**",
26
49
  "dist",
27
50
  "*.d.ts",
28
51
  "*.min.*",
@@ -99,5 +122,3 @@ const index = {
99
122
  ]
100
123
  }
101
124
  };
102
-
103
- module.exports = index;
package/dist/index.d.cts CHANGED
@@ -18,7 +18,7 @@ declare const _default: {
18
18
  })[];
19
19
  'color-function-notation': string;
20
20
  'alpha-value-notation': string;
21
- 'selector-class-pattern': any;
21
+ 'selector-class-pattern': null;
22
22
  'selector-pseudo-class-no-unknown': (boolean | {
23
23
  ignorePseudoClasses: string[];
24
24
  })[];
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ declare const _default: {
18
18
  })[];
19
19
  'color-function-notation': string;
20
20
  'alpha-value-notation': string;
21
- 'selector-class-pattern': any;
21
+ 'selector-class-pattern': null;
22
22
  'selector-pseudo-class-no-unknown': (boolean | {
23
23
  ignorePseudoClasses: string[];
24
24
  })[];
@@ -1,7 +1,7 @@
1
- import { isPackageExists } from 'local-pkg';
2
-
3
- const cssInJs = isPackageExists("styled-components") || isPackageExists("@emotion/css") || isPackageExists("@emotion/react") || isPackageExists("@emotion/styled");
4
- const jsExtension = [
1
+ // src/index.ts
2
+ import { isPackageExists } from "local-pkg";
3
+ var cssInJs = isPackageExists("styled-components") || isPackageExists("@emotion/css") || isPackageExists("@emotion/react") || isPackageExists("@emotion/styled");
4
+ var jsExtension = [
5
5
  "*.js",
6
6
  "*.ts",
7
7
  "*.jsx",
@@ -11,16 +11,17 @@ const jsExtension = [
11
11
  "*.mts",
12
12
  "*.cts"
13
13
  ];
14
- const ignoreJs = !cssInJs ? jsExtension : [];
15
- const jsOverrides = cssInJs ? [
14
+ var ignoreJs = !cssInJs ? jsExtension : [];
15
+ var jsOverrides = cssInJs ? [
16
16
  {
17
17
  files: jsExtension.map((extension) => [extension, `**/${extension}`]).flat(),
18
18
  customSyntax: "postcss-styled-syntax"
19
19
  }
20
20
  ] : [];
21
- const index = {
21
+ var src_default = {
22
22
  extends: ["stylelint-config-standard", "stylelint-config-recess-order"],
23
23
  ignoreFiles: [
24
+ "**/node_modules/**",
24
25
  "dist",
25
26
  "*.d.ts",
26
27
  "*.min.*",
@@ -97,5 +98,6 @@ const index = {
97
98
  ]
98
99
  }
99
100
  };
100
-
101
- export { index as default };
101
+ export {
102
+ src_default as default
103
+ };
package/package.json CHANGED
@@ -1,40 +1,38 @@
1
1
  {
2
2
  "name": "@pengzhanbo/stylelint-config",
3
- "version": "0.4.3",
4
- "keywords": [
5
- "stylelint-config"
6
- ],
3
+ "type": "module",
4
+ "version": "1.1.0",
5
+ "author": "pengzhanbo <q942450674@outlook.com> (https://github/pengzhanbo/)",
6
+ "license": "MIT",
7
7
  "homepage": "https://github.com/pengzhanbo/configs#readme",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git@github.com:pengzhanbo/configs.git",
11
11
  "directory": "packages/stylelint-config"
12
12
  },
13
- "license": "MIT",
14
- "author": "pengzhanbo <q942450674@outlook.com> (https://github/pengzhanbo/)",
15
- "type": "module",
13
+ "keywords": [
14
+ "stylelint-config"
15
+ ],
16
16
  "exports": {
17
17
  ".": {
18
- "require": "./dist/index.cjs",
19
- "import": "./dist/index.mjs"
18
+ "import": {
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
21
+ },
22
+ "require": {
23
+ "types": "./dist/index.d.cts",
24
+ "default": "./dist/index.cjs"
25
+ }
20
26
  },
21
27
  "./package.json": "./package.json"
22
28
  },
23
- "main": "dist/index.cjs",
24
- "module": "dist/index.mjs",
29
+ "main": "dist/index.js",
25
30
  "types": "dist/index.d.ts",
26
31
  "files": [
27
32
  "dist"
28
33
  ],
29
- "unbuild": {
30
- "entries": [
31
- "./src/index"
32
- ],
33
- "declaration": true,
34
- "clean": true,
35
- "rollup": {
36
- "emitCJS": true
37
- }
34
+ "peerDependencies": {
35
+ "stylelint": ">=15.0.0"
38
36
  },
39
37
  "dependencies": {
40
38
  "local-pkg": "^0.5.0",
@@ -44,20 +42,17 @@
44
42
  "postcss-scss": "^4.0.9",
45
43
  "postcss-styled-syntax": "^0.5.0",
46
44
  "stylelint-config-html": "^1.1.0",
47
- "stylelint-config-recess-order": "^4.3.0",
48
- "stylelint-config-recommended-scss": "^13.0.0",
45
+ "stylelint-config-recess-order": "^4.4.0",
46
+ "stylelint-config-recommended-scss": "^13.1.0",
49
47
  "stylelint-config-standard": "^34.0.0",
50
- "stylelint-config-standard-scss": "^11.0.0"
48
+ "stylelint-config-standard-scss": "^11.1.0"
51
49
  },
52
50
  "devDependencies": {
53
- "stylelint": "^15.10.3",
54
- "unbuild": "^2.0.0"
55
- },
56
- "peerDependencies": {
57
- "stylelint": ">=14.10.0"
51
+ "stylelint": "^15.11.0",
52
+ "tsup": "^8.0.1"
58
53
  },
59
54
  "scripts": {
60
- "build": "unbuild",
61
- "stub": "unbuild --stub"
55
+ "build": "tsup src/index.ts --format esm,cjs --clean --dts --shims",
56
+ "stub": "tsup src/index.ts --format esm"
62
57
  }
63
58
  }
package/dist/index.d.mts DELETED
@@ -1,28 +0,0 @@
1
- declare const _default: {
2
- extends: string[];
3
- ignoreFiles: string[];
4
- overrides: ({
5
- files: string[];
6
- customSyntax: string;
7
- } | {
8
- files: string[];
9
- customSyntax: string;
10
- extends: string[];
11
- })[];
12
- rules: {
13
- 'at-rule-no-unknown': (boolean | {
14
- ignoreAtRules: string[];
15
- })[];
16
- 'unit-no-unknown': (boolean | {
17
- ignoreUnits: string[];
18
- })[];
19
- 'color-function-notation': string;
20
- 'alpha-value-notation': string;
21
- 'selector-class-pattern': any;
22
- 'selector-pseudo-class-no-unknown': (boolean | {
23
- ignorePseudoClasses: string[];
24
- })[];
25
- };
26
- };
27
-
28
- export { _default as default };