@xiaohe01/stylelint-config 3.2.0 → 3.3.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/dist/index.cjs +9 -9
- package/dist/index.mjs +9 -9
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ const GLOB_ALL = [
|
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/configs/core.ts
|
|
41
41
|
function core(options = {}) {
|
|
42
|
-
const { vue
|
|
42
|
+
const { vue = false } = options;
|
|
43
43
|
return [{
|
|
44
44
|
name: "xiaohe/core/rules",
|
|
45
45
|
files: GLOB_ALL,
|
|
@@ -89,7 +89,7 @@ function core(options = {}) {
|
|
|
89
89
|
"selector-pseudo-class-no-unknown": true,
|
|
90
90
|
"selector-pseudo-element-no-unknown": true,
|
|
91
91
|
"string-no-newline": [true, { ignore: ["at-rule-preludes", "declaration-values"] }],
|
|
92
|
-
...vue
|
|
92
|
+
...vue ? {
|
|
93
93
|
"selector-pseudo-class-no-unknown": [true, { ignorePseudoClasses: [
|
|
94
94
|
"deep",
|
|
95
95
|
"global",
|
|
@@ -129,10 +129,10 @@ function html(options = {}) {
|
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/configs/scss.ts
|
|
131
131
|
function scss(options = {}) {
|
|
132
|
-
const { vue
|
|
132
|
+
const { vue = false, uni = false } = options;
|
|
133
133
|
return [{
|
|
134
134
|
name: "xiaohe/scss/rules",
|
|
135
|
-
files: [...GLOB_SCSS, ...vue
|
|
135
|
+
files: [...GLOB_SCSS, ...vue ? GLOB_VUE : []],
|
|
136
136
|
rules: {
|
|
137
137
|
"annotation-no-unknown": null,
|
|
138
138
|
"at-rule-no-unknown": null,
|
|
@@ -164,20 +164,20 @@ function scss(options = {}) {
|
|
|
164
164
|
//#endregion
|
|
165
165
|
//#region src/configs/setup.ts
|
|
166
166
|
function setup(options = {}) {
|
|
167
|
-
const { scss
|
|
167
|
+
const { scss = false, html = false, vue = false } = options;
|
|
168
168
|
const overrides = [];
|
|
169
|
-
if (html
|
|
169
|
+
if (html) overrides.push({
|
|
170
170
|
name: "xiaohe/html/setup",
|
|
171
171
|
files: GLOB_HTML,
|
|
172
172
|
customSyntax: "postcss-html"
|
|
173
173
|
});
|
|
174
|
-
if (vue
|
|
174
|
+
if (vue) overrides.push({
|
|
175
175
|
name: "xiaohe/vue/setup",
|
|
176
176
|
files: GLOB_VUE,
|
|
177
177
|
customSyntax: "postcss-html",
|
|
178
|
-
plugins: [...scss
|
|
178
|
+
plugins: [...scss ? ["stylelint-scss"] : []]
|
|
179
179
|
});
|
|
180
|
-
if (scss
|
|
180
|
+
if (scss) overrides.push({
|
|
181
181
|
name: "xiaohe/scss/setup",
|
|
182
182
|
files: GLOB_SCSS,
|
|
183
183
|
customSyntax: "postcss-scss",
|
package/dist/index.mjs
CHANGED
|
@@ -39,7 +39,7 @@ const GLOB_ALL = [
|
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/configs/core.ts
|
|
41
41
|
function core(options = {}) {
|
|
42
|
-
const { vue
|
|
42
|
+
const { vue = false } = options;
|
|
43
43
|
return [{
|
|
44
44
|
name: "xiaohe/core/rules",
|
|
45
45
|
files: GLOB_ALL,
|
|
@@ -89,7 +89,7 @@ function core(options = {}) {
|
|
|
89
89
|
"selector-pseudo-class-no-unknown": true,
|
|
90
90
|
"selector-pseudo-element-no-unknown": true,
|
|
91
91
|
"string-no-newline": [true, { ignore: ["at-rule-preludes", "declaration-values"] }],
|
|
92
|
-
...vue
|
|
92
|
+
...vue ? {
|
|
93
93
|
"selector-pseudo-class-no-unknown": [true, { ignorePseudoClasses: [
|
|
94
94
|
"deep",
|
|
95
95
|
"global",
|
|
@@ -129,10 +129,10 @@ function html(options = {}) {
|
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/configs/scss.ts
|
|
131
131
|
function scss(options = {}) {
|
|
132
|
-
const { vue
|
|
132
|
+
const { vue = false, uni = false } = options;
|
|
133
133
|
return [{
|
|
134
134
|
name: "xiaohe/scss/rules",
|
|
135
|
-
files: [...GLOB_SCSS, ...vue
|
|
135
|
+
files: [...GLOB_SCSS, ...vue ? GLOB_VUE : []],
|
|
136
136
|
rules: {
|
|
137
137
|
"annotation-no-unknown": null,
|
|
138
138
|
"at-rule-no-unknown": null,
|
|
@@ -164,20 +164,20 @@ function scss(options = {}) {
|
|
|
164
164
|
//#endregion
|
|
165
165
|
//#region src/configs/setup.ts
|
|
166
166
|
function setup(options = {}) {
|
|
167
|
-
const { scss
|
|
167
|
+
const { scss = false, html = false, vue = false } = options;
|
|
168
168
|
const overrides = [];
|
|
169
|
-
if (html
|
|
169
|
+
if (html) overrides.push({
|
|
170
170
|
name: "xiaohe/html/setup",
|
|
171
171
|
files: GLOB_HTML,
|
|
172
172
|
customSyntax: "postcss-html"
|
|
173
173
|
});
|
|
174
|
-
if (vue
|
|
174
|
+
if (vue) overrides.push({
|
|
175
175
|
name: "xiaohe/vue/setup",
|
|
176
176
|
files: GLOB_VUE,
|
|
177
177
|
customSyntax: "postcss-html",
|
|
178
|
-
plugins: [...scss
|
|
178
|
+
plugins: [...scss ? ["stylelint-scss"] : []]
|
|
179
179
|
});
|
|
180
|
-
if (scss
|
|
180
|
+
if (scss) overrides.push({
|
|
181
181
|
name: "xiaohe/scss/setup",
|
|
182
182
|
files: GLOB_SCSS,
|
|
183
183
|
customSyntax: "postcss-scss",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiaohe01/stylelint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"description": "🤚 Xiaohe's Stylelint config preset",
|
|
6
6
|
"author": "xiaohe0601 <xiaohe0601@outlook.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"local-pkg": "^1.1.2",
|
|
37
|
-
"postcss-html": "^1.8.
|
|
37
|
+
"postcss-html": "^1.8.1",
|
|
38
38
|
"postcss-scss": "^4.0.9",
|
|
39
|
-
"stylelint-config-recess-order": "^7.
|
|
39
|
+
"stylelint-config-recess-order": "^7.6.0",
|
|
40
40
|
"stylelint-order": "^7.0.1",
|
|
41
|
-
"stylelint-scss": "^
|
|
41
|
+
"stylelint-scss": "^7.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"stylelint": "^
|
|
44
|
+
"stylelint": "^17.0.0",
|
|
45
45
|
"@xiaohe-config/shared": "^0.0.0"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|