@cgzair/stylelint-config-cgz 1.1.0 → 2.0.3

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
@@ -1,23 +1,21 @@
1
- # stylelint-config-cgz
1
+ # @cgzair/stylelint-config-cgz
2
2
 
3
3
  本包提供了《信息技术部前端编码手册》配套的 stylelint 可共享配置。
4
4
 
5
5
  ## 使用
6
6
 
7
- 安装
7
+ 安装:
8
8
 
9
9
  ```bash
10
- yarn add @cgzair/stylelint-config-cgz
10
+ pnpm add @cgzair/stylelint-config-cgz -D
11
11
  ```
12
12
 
13
13
  ### 配置
14
14
 
15
- `.stylelintrc.js` 中继承配置:
15
+ `stylelint.config.mjs` 中使用配置:
16
16
 
17
17
  ```js
18
- module.exports = {
19
- extends: ['@cgzair/cgz'],
20
- };
18
+ export { default } from "@cgzair/stylelint-config-cgz";
21
19
  ```
22
20
 
23
21
  ## IDE 插件配套集成
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ import{createRequire}from"node:module";import miniappTags from"./miniapp-tags.js";const require=createRequire(import.meta.url);export default{extends:[require.resolve("stylelint-config-standard"),require.resolve("stylelint-config-standard-scss"),require.resolve("stylelint-config-css-modules")],rules:{"at-rule-no-unknown":null,"scss/at-rule-no-unknown":!0,"scss/at-function-pattern":null,"scss/at-mixin-pattern":null,"scss/at-import-no-partial-leading-underscore":null,"scss/at-import-partial-extension":null,"scss/dollar-variable-pattern":null,"color-function-notation":"legacy","block-no-empty":null,"color-no-invalid-hex":!0,"comment-no-empty":!0,"declaration-block-no-duplicate-properties":[!0,{ignore:["consecutive-duplicates-with-different-values"]}],"declaration-block-no-shorthand-property-overrides":!0,"font-family-no-duplicate-names":!0,"font-family-no-missing-generic-family-keyword":null,"function-linear-gradient-no-nonstandard-direction":!0,"keyframe-declaration-no-important":!0,"media-feature-name-no-unknown":!0,"no-descending-specificity":null,"no-duplicate-at-import-rules":!0,"no-duplicate-selectors":!0,"no-empty-source":null,"no-invalid-double-slash-comments":!0,"property-no-unknown":!0,"selector-pseudo-class-no-unknown":[!0,{ignorePseudoClasses:["global","local","export"]}],"selector-pseudo-element-no-unknown":[!0,{ignorePseudoElements:["v-deep"]}],"selector-type-no-unknown":[!0,{ignore:["custom-elements"],ignoreTypes:miniappTags}],"string-no-newline":!0,"unit-no-unknown":[!0,{ignoreUnits:["rpx"]}],"length-zero-no-unit":[!0,{ignore:["custom-properties"]}],"function-url-quotes":null,"selector-class-pattern":null,"value-keyword-case":["lower",{ignoreProperties:["composes"]}],"alpha-value-notation":null},ignoreFiles:["node_modules/**/*","dist/**/*"],overrides:[{files:["**/*.vue","**/*.html"],customSyntax:"postcss-html"},{files:["**/*.scss"],customSyntax:"postcss-scss"},{files:["**/*.less"],customSyntax:"postcss-less"},{files:["**/*.md"],customSyntax:"postcss-markdown"}]};
@@ -0,0 +1 @@
1
+ export default["cover-image","cover-view","match-media","movable-area","movable-view","page-container","scroll-view","share-element","swiper","swiper-item","page","view","icon","progress","rich-text","text","checkbox","checkbox-group","editor","keyboard-accessory","picker","picker-view","picker-view-column","radio","radio-group","slider","switch","navigator","functional-page-navigator","camera","image","live-player","live-pusher","voip-room","lottie","map","ad","ad-custom","official-account","open-data","web-view","lifestyle","contact-button","error-view","navigation-bar","page-meta"];
package/package.json CHANGED
@@ -1,47 +1,46 @@
1
1
  {
2
2
  "name": "@cgzair/stylelint-config-cgz",
3
- "version": "1.1.0",
3
+ "type": "module",
4
+ "version": "2.0.3",
4
5
  "description": "Stylelint shareable configuration for cgz frontend Guidelines",
5
- "main": "index.js",
6
6
  "keywords": [
7
7
  "stylelint",
8
8
  "stylelint-config-cgz"
9
9
  ],
10
+ "types": "./lib/index.d.ts",
11
+ "exports": {
12
+ ".": "./lib/index.js"
13
+ },
10
14
  "scripts": {
11
- "test": "jest",
12
- "test:coverage": "jest --coverage"
15
+ "build": "tsc",
16
+ "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
17
+ "test:coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage"
13
18
  },
14
19
  "files": [
15
- "index.js",
16
- "miniapp-tags.js",
20
+ "lib",
17
21
  "README.md",
18
22
  "package.json"
19
23
  ],
20
24
  "author": "cgz",
21
- "dependencies": {
22
- "stylelint": "~14.2.0",
23
- "stylelint-config-css-modules": "^2.3.0",
24
- "stylelint-config-html": "^1.0.0",
25
- "stylelint-config-prettier": "^9.0.3",
26
- "stylelint-config-standard": "^24.0.0",
27
- "stylelint-config-standard-scss": "^3.0.0",
28
- "stylelint-declaration-block-no-ignored-properties": "^2.5.0"
25
+ "peerDependencies": {
26
+ "stylelint": "~16.26.1"
29
27
  },
30
- "devDependencies": {
31
- "jest": "^27.3.1"
28
+ "dependencies": {
29
+ "postcss-html": "^1.8.0",
30
+ "postcss-less": "^6.0.0",
31
+ "postcss-markdown": "^1.3.0",
32
+ "postcss-scss": "^4.0.9",
33
+ "stylelint-config-css-modules": "^4.5.1",
34
+ "stylelint-config-standard": "^39.0.1",
35
+ "stylelint-config-standard-scss": "^16.0.0"
32
36
  },
33
37
  "publishConfig": {
34
38
  "access": "public"
35
39
  },
36
40
  "engines": {
37
- "node": ">=12.0.0"
41
+ "node": ">=24.14.1",
42
+ "pnpm": ">=9.0.0"
38
43
  },
39
44
  "license": "MIT",
40
- "jest": {
41
- "coverageReporters": [
42
- "lcov",
43
- "cobertura"
44
- ]
45
- },
46
- "gitHead": "ac4f859f68745c4250c8aab06047ce03b0de733e"
45
+ "gitHead": "950a840ad96068b6eaae19e0d2322ba24ef5c864"
47
46
  }
package/index.js DELETED
@@ -1,102 +0,0 @@
1
- const miniappTags = require("./miniapp-tags");
2
-
3
- module.exports = {
4
- extends: [
5
- "stylelint-config-standard",
6
- "stylelint-config-standard-scss",
7
- "stylelint-config-html",
8
- "stylelint-config-css-modules",
9
- "stylelint-config-prettier",
10
- ],
11
- plugins: ["stylelint-declaration-block-no-ignored-properties"],
12
- rules: {
13
- "at-rule-no-unknown": null,
14
- "color-function-notation": "legacy",
15
- "scss/at-function-pattern": null,
16
- "scss/at-mixin-pattern": null,
17
- "scss/at-rule-no-unknown": true,
18
- "scss/at-import-no-partial-leading-underscore": null,
19
- "scss/at-import-partial-extension": null,
20
- "scss/dollar-variable-pattern": null,
21
- "block-no-empty": null,
22
- "color-no-invalid-hex": true,
23
- "comment-no-empty": true,
24
- "declaration-block-no-duplicate-properties": [
25
- true,
26
- {
27
- ignore: ["consecutive-duplicates-with-different-values"],
28
- },
29
- ],
30
- "declaration-block-no-shorthand-property-overrides": true,
31
- "font-family-no-duplicate-names": true,
32
- "font-family-no-missing-generic-family-keyword": null,
33
- "function-calc-no-unspaced-operator": true,
34
- "function-linear-gradient-no-nonstandard-direction": true,
35
- "keyframe-declaration-no-important": true,
36
- "media-feature-name-no-unknown": true,
37
- "no-descending-specificity": null,
38
- "no-duplicate-at-import-rules": true,
39
- "no-duplicate-selectors": true,
40
- "no-empty-source": null,
41
- "no-extra-semicolons": true,
42
- "no-invalid-double-slash-comments": true,
43
- "property-no-unknown": true,
44
- "selector-pseudo-class-no-unknown": [
45
- true,
46
- {
47
- ignorePseudoClasses: ["global", "local", "export"],
48
- },
49
- ],
50
- "selector-pseudo-element-no-unknown": [true, { ignorePseudoElements: ["v-deep"] }],
51
- "selector-type-no-unknown": [
52
- true,
53
- {
54
- ignore: ["custom-elements"],
55
- ignoreTypes: miniappTags,
56
- },
57
- ],
58
- "string-no-newline": true,
59
- "unit-no-unknown": [
60
- true,
61
- {
62
- ignoreUnits: ["rpx"],
63
- },
64
- ],
65
- indentation: 2,
66
- "block-closing-brace-newline-before": "always-multi-line",
67
- "block-closing-brace-space-before": "always-single-line",
68
- "block-opening-brace-newline-after": "always-multi-line",
69
- "block-opening-brace-space-before": "always",
70
- "block-opening-brace-space-after": "always-single-line",
71
- "color-hex-case": "lower",
72
- "color-hex-length": "short",
73
- "comment-whitespace-inside": "always",
74
- "declaration-colon-space-before": "never",
75
- "declaration-colon-space-after": "always",
76
- "declaration-block-single-line-max-declarations": 1,
77
- "declaration-block-trailing-semicolon": [
78
- "always",
79
- {
80
- severity: "error",
81
- },
82
- ],
83
- "length-zero-no-unit": [
84
- true,
85
- {
86
- ignore: ["custom-properties"],
87
- },
88
- ],
89
- "max-line-length": 100,
90
- "selector-max-id": null,
91
- "value-list-comma-space-after": "always-single-line",
92
- "scss/double-slash-comment-whitespace-inside": "always",
93
- "function-url-quotes": null,
94
- "selector-class-pattern": null,
95
- "selector-attribute-quotes": "always",
96
- "number-leading-zero": "always",
97
- "plugin/declaration-block-no-ignored-properties": true,
98
- "value-keyword-case": ["lower", { ignoreProperties: ["composes"] }],
99
- "alpha-value-notation": null,
100
- },
101
- ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts"],
102
- };
package/miniapp-tags.js DELETED
@@ -1,61 +0,0 @@
1
- /*
2
- * 小程序使用的非标准选择器,支付宝扩展组件由于官方停止更新,暂不包含
3
- */
4
-
5
- module.exports = [
6
- // 视图容器
7
- "cover-image",
8
- "cover-view",
9
- "match-media",
10
- "movable-area",
11
- "movable-view",
12
- "page-container",
13
- "scroll-view",
14
- "share-element",
15
- "swiper",
16
- "swiper-item",
17
- "page",
18
- "view",
19
- // 基础内容
20
- "icon",
21
- "progress",
22
- "rich-text",
23
- "text",
24
- // 表单组件
25
- "checkbox",
26
- "checkbox-group",
27
- "editor",
28
- "keyboard-accessory",
29
- "picker",
30
- "picker-view",
31
- "picker-view-column",
32
- "radio",
33
- "radio-group",
34
- "slider",
35
- "switch",
36
- // 导航
37
- "navigator",
38
- "functional-page-navigator",
39
- // 媒体组件
40
- "camera",
41
- "image",
42
- "live-player",
43
- "live-pusher",
44
- "voip-room",
45
- "lottie",
46
- // 地图
47
- "map",
48
- // 开发能力
49
- "ad",
50
- "ad-custom",
51
- "official-account",
52
- "open-data",
53
- "web-view",
54
- "lifestyle",
55
- "contact-button",
56
- "error-view",
57
- // 导航栏
58
- "navigation-bar",
59
- // 页面属性节点
60
- "page-meta",
61
- ];