@nice-move/stylelint-config 0.6.7 → 0.6.11
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/index.cjs +8 -6
- package/lib/base.cjs +2 -0
- package/lib/ignore.cjs +14 -10
- package/lib/scss.cjs +0 -1
- package/package.json +8 -7
- package/style.scss +24 -0
package/index.cjs
CHANGED
|
@@ -11,12 +11,9 @@ module.exports = {
|
|
|
11
11
|
require.resolve('./lib/base.cjs'),
|
|
12
12
|
require.resolve('stylelint-config-prettier'),
|
|
13
13
|
],
|
|
14
|
-
|
|
15
|
-
// 'stylelint-declaration-block-no-ignored-properties',
|
|
16
|
-
// ],
|
|
14
|
+
plugins: ['stylelint-declaration-block-no-ignored-properties'],
|
|
17
15
|
rules: {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
'plugin/declaration-block-no-ignored-properties': true,
|
|
20
17
|
...isMiniApp({
|
|
21
18
|
'selector-type-no-unknown': [true, { ignoreTypes: ['page'] }],
|
|
22
19
|
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
|
|
@@ -26,10 +23,15 @@ module.exports = {
|
|
|
26
23
|
{
|
|
27
24
|
files: ['**/*.scss'],
|
|
28
25
|
extends: [
|
|
29
|
-
require.resolve('stylelint-config-
|
|
26
|
+
require.resolve('stylelint-config-recommended-scss'),
|
|
27
|
+
require.resolve('./lib/ignore.cjs'),
|
|
30
28
|
require.resolve('./lib/scss.cjs'),
|
|
29
|
+
require.resolve('./lib/base.cjs'),
|
|
31
30
|
require.resolve('stylelint-config-prettier'),
|
|
32
31
|
],
|
|
32
|
+
rules: {
|
|
33
|
+
'at-rule-no-unknown': null,
|
|
34
|
+
},
|
|
33
35
|
},
|
|
34
36
|
{
|
|
35
37
|
files: ['**/*.less'],
|
package/lib/base.cjs
CHANGED
|
@@ -36,8 +36,10 @@ module.exports = {
|
|
|
36
36
|
// ---- off --------------------
|
|
37
37
|
'custom-media-pattern': null,
|
|
38
38
|
'custom-property-pattern': null,
|
|
39
|
+
'declaration-block-single-line-max-declarations': null,
|
|
39
40
|
'keyframes-name-pattern': null,
|
|
40
41
|
'selector-class-pattern': null,
|
|
42
|
+
'comment-no-empty': null,
|
|
41
43
|
'selector-id-pattern': null,
|
|
42
44
|
|
|
43
45
|
// ---- handle by prettier -----
|
package/lib/ignore.cjs
CHANGED
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
const { join } = require('path');
|
|
4
4
|
|
|
5
|
+
const { readJson, getPkg } = require('settingz');
|
|
6
|
+
|
|
7
|
+
function ignoreList() {
|
|
8
|
+
const { ignore: { all = [], stylelint = [] } = {} } = getPkg('nice-move');
|
|
9
|
+
|
|
10
|
+
return [...all, ...stylelint];
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
function BestShot() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line import/no-unresolved
|
|
11
|
-
} = require('@best-shot/cli/config/ignore.json');
|
|
12
|
-
return stylelint;
|
|
13
|
-
} catch {
|
|
14
|
-
return [];
|
|
15
|
-
}
|
|
14
|
+
const { git = [], stylelint = git } = readJson(
|
|
15
|
+
'@best-shot/cli/config/ignore.json',
|
|
16
|
+
);
|
|
17
|
+
return stylelint;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
module.exports = {
|
|
@@ -20,6 +22,8 @@ module.exports = {
|
|
|
20
22
|
'**/*.min.*',
|
|
21
23
|
'**/dist/**',
|
|
22
24
|
'**/.(cache|svn|git)/**',
|
|
25
|
+
'**/miniprogram_npm/**',
|
|
23
26
|
...BestShot(),
|
|
27
|
+
...ignoreList(),
|
|
24
28
|
].map((item) => join(process.cwd(), item)),
|
|
25
29
|
};
|
package/lib/scss.cjs
CHANGED
|
@@ -10,7 +10,6 @@ module.exports = {
|
|
|
10
10
|
rules: {
|
|
11
11
|
'scss/at-import-no-partial-leading-underscore': null,
|
|
12
12
|
'scss/at-import-partial-extension': 'always',
|
|
13
|
-
'at-rule-no-unknown': null,
|
|
14
13
|
'scss/at-rule-no-unknown': AT_RULE_NO_UNKNOWN,
|
|
15
14
|
'scss/declaration-nested-properties': 'never',
|
|
16
15
|
'scss/dimension-no-non-numeric-values': true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-move/stylelint-config",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11",
|
|
4
4
|
"description": "A `stylelint` config created by personal preferences",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -29,16 +29,17 @@
|
|
|
29
29
|
},
|
|
30
30
|
"main": "index.cjs",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"postcss-html": "^1.
|
|
32
|
+
"postcss-html": "^1.3.0",
|
|
33
33
|
"postcss-less": "^5.0.0",
|
|
34
|
-
"postcss-markdown": "^1.
|
|
35
|
-
"settingz": "^0.1.
|
|
34
|
+
"postcss-markdown": "^1.2.0",
|
|
35
|
+
"settingz": "^0.1.2",
|
|
36
36
|
"stylelint-config-prettier": "^9.0.3",
|
|
37
|
-
"stylelint-config-
|
|
38
|
-
"stylelint-config-standard
|
|
37
|
+
"stylelint-config-recommended-scss": "^5.0.2",
|
|
38
|
+
"stylelint-config-standard": "^24.0.0",
|
|
39
|
+
"stylelint-declaration-block-no-ignored-properties": "^2.5.0"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
41
|
-
"stylelint": "^14.0
|
|
42
|
+
"stylelint": "^14.1.0"
|
|
42
43
|
},
|
|
43
44
|
"engines": {
|
|
44
45
|
"node": "^12.22.0 || ^14.17.0 || >=16.13.0"
|
package/style.scss
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.ant-layout-header {
|
|
2
|
+
box-shadow: 0 2px 4px rgba(black, 0.08);
|
|
3
|
+
|
|
4
|
+
.trigger {
|
|
5
|
+
&.anticon {
|
|
6
|
+
padding: 0.75em;
|
|
7
|
+
font-size: 1.25em;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
background-color: #eeeeee;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.notice-overlay {
|
|
17
|
+
min-width: 320px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.search-bar {
|
|
21
|
+
width: 40%;
|
|
22
|
+
min-width: 240px;
|
|
23
|
+
max-width: 400px;
|
|
24
|
+
}
|