@anolilab/stylelint-config 3.0.1 → 3.0.4
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/CHANGELOG.md +39 -0
- package/index.cjs +1 -1
- package/lib/postinstall.js +17 -12
- package/package.json +24 -8
- package/rules/best-practices.cjs +1 -1
- package/rules/no-unsupported-browser-features.cjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
## @anolilab/stylelint-config [3.0.4](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@3.0.3...@anolilab/stylelint-config@3.0.4) (2022-07-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* upgraded deps ([6e4b5bc](https://github.com/anolilab/javascript-style-guide/commit/6e4b5bce0599c987a93b9a65c0bf6cc7c90a3ed3))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
* **browserslist-config-anolilab:** upgraded to 3.0.4
|
|
13
|
+
|
|
14
|
+
### @anolilab/stylelint-config [3.0.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@3.0.2...@anolilab/stylelint-config@3.0.3) (2022-05-11)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* update all deps of the package and fixes found code style issues ([2776ecd](https://github.com/anolilab/javascript-style-guide/commit/2776ecd44d35f1d317abf367e69fef24dbd00335))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Dependencies
|
|
24
|
+
|
|
25
|
+
* **browserslist-config-anolilab:** upgraded to 3.0.3
|
|
26
|
+
|
|
27
|
+
### @anolilab/stylelint-config [3.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@3.0.1...@anolilab/stylelint-config@3.0.2) (2022-05-06)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **deps:** upgraded deps in all packages ([091353c](https://github.com/anolilab/javascript-style-guide/commit/091353cdd01a0bb3d0e48da9266a6a2978283e2b))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Dependencies
|
|
37
|
+
|
|
38
|
+
* **browserslist-config-anolilab:** upgraded to 3.0.2
|
|
39
|
+
|
|
1
40
|
### @anolilab/stylelint-config [3.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@3.0.0...@anolilab/stylelint-config@3.0.1) (2022-02-15)
|
|
2
41
|
|
|
3
42
|
|
package/index.cjs
CHANGED
package/lib/postinstall.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { existsSync, writeFile } from "node:fs";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
|
+
import { promisify } from "node:util";
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line no-undef
|
|
3
8
|
if (process.env.CI) {
|
|
9
|
+
// eslint-disable-next-line no-undef
|
|
4
10
|
process.exit(0);
|
|
5
11
|
}
|
|
6
12
|
|
|
7
|
-
import { writeFile, existsSync } from 'fs';
|
|
8
|
-
import { resolve, join } from 'path';
|
|
9
|
-
import { promisify } from 'util';
|
|
10
|
-
|
|
11
13
|
const writeFileAsync = promisify(writeFile);
|
|
12
14
|
|
|
13
15
|
// get the path to the host project.
|
|
14
|
-
|
|
16
|
+
// eslint-disable-next-line no-undef
|
|
17
|
+
const projectPath = resolve(process.cwd(), "..", "..", "..");
|
|
15
18
|
|
|
16
|
-
console.log(
|
|
19
|
+
console.log("Configuring @anolilab/stylelint-config", projectPath, "\n");
|
|
17
20
|
|
|
18
21
|
/**
|
|
19
22
|
* Writes .stylelintrc.cjs if it doesn't exist. Warns if it exists.
|
|
20
23
|
*/
|
|
21
24
|
const writeStylelintRc = () => {
|
|
22
|
-
const eslintPath = join(projectPath,
|
|
25
|
+
const eslintPath = join(projectPath, ".stylelintrc.cjs");
|
|
23
26
|
const content = `module.exports = {
|
|
24
27
|
"extends": [
|
|
25
28
|
"@anolilab/stylelint-config",
|
|
@@ -28,19 +31,19 @@ const writeStylelintRc = () => {
|
|
|
28
31
|
`;
|
|
29
32
|
|
|
30
33
|
if (existsSync(eslintPath)) {
|
|
31
|
-
console.warn(
|
|
34
|
+
console.warn("⚠️ .stylelintrc.cjs already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { \"extends\": [\"@anolilab/stylelint-config\"] }.");
|
|
32
35
|
|
|
33
36
|
return Promise.resolve();
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
return writeFileAsync(eslintPath, content,
|
|
39
|
+
return writeFileAsync(eslintPath, content, "utf-8");
|
|
37
40
|
};
|
|
38
41
|
|
|
39
42
|
/**
|
|
40
43
|
* Writes .stylelintignore if it doesn't exist. Warns if it exists.
|
|
41
44
|
*/
|
|
42
45
|
const writeStylelintIgnore = () => {
|
|
43
|
-
const eslintPath = join(projectPath,
|
|
46
|
+
const eslintPath = join(projectPath, ".stylelintignore");
|
|
44
47
|
const content = `package.json
|
|
45
48
|
package-lock.json
|
|
46
49
|
yarn.lock
|
|
@@ -63,11 +66,13 @@ node_modules/**
|
|
|
63
66
|
|
|
64
67
|
console.log("😎 Everything went well, have fun!");
|
|
65
68
|
|
|
69
|
+
// eslint-disable-next-line no-undef
|
|
66
70
|
process.exit(0);
|
|
67
|
-
} catch (
|
|
71
|
+
} catch (error) {
|
|
68
72
|
console.log("😬 something went wrong:");
|
|
69
|
-
console.error(
|
|
73
|
+
console.error(error.message);
|
|
70
74
|
|
|
75
|
+
// eslint-disable-next-line no-undef
|
|
71
76
|
process.exit(1);
|
|
72
77
|
}
|
|
73
78
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/stylelint-config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Stylelint shareable config for the Anolilab stylesheet guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -47,23 +47,23 @@
|
|
|
47
47
|
"postinstall": "node lib/postinstall.js"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"browserslist-config-anolilab": "3.0.
|
|
50
|
+
"browserslist-config-anolilab": "3.0.4",
|
|
51
51
|
"stylelint-a11y": "^1.2.3",
|
|
52
52
|
"stylelint-config-rational-order": "^0.1.2",
|
|
53
|
-
"stylelint-config-standard": "^
|
|
53
|
+
"stylelint-config-standard": "^26.0.0",
|
|
54
54
|
"stylelint-declaration-block-no-ignored-properties": "^2.5.0",
|
|
55
|
-
"stylelint-no-unsupported-browser-features": "^5.0.
|
|
55
|
+
"stylelint-no-unsupported-browser-features": "^5.0.3",
|
|
56
56
|
"stylelint-order": "^5.0.0",
|
|
57
57
|
"stylelint-require-units": "^1.0.2",
|
|
58
|
-
"stylelint-selector-no-empty": "^1.0.
|
|
58
|
+
"stylelint-selector-no-empty": "^1.0.9"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"lodash": "^4.17.21",
|
|
62
|
-
"postcss": "^8.4.
|
|
63
|
-
"stylelint": "14.
|
|
62
|
+
"postcss": "^8.4.14",
|
|
63
|
+
"stylelint": "14.9.1"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"postcss": "^8.4.
|
|
66
|
+
"postcss": "^8.4.14",
|
|
67
67
|
"stylelint": "^14.0.0"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|
|
@@ -71,5 +71,21 @@
|
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
|
+
},
|
|
75
|
+
"pnpm": {
|
|
76
|
+
"overrides": {
|
|
77
|
+
"glob-parent@<5.1.2": ">=5.1.2",
|
|
78
|
+
"minimist@<1.2.6": ">=1.2.6",
|
|
79
|
+
"chrono-node@<2.2.4": ">=2.2.4",
|
|
80
|
+
"yargs-parser@>=6.0.0 <13.1.2": ">=13.1.2",
|
|
81
|
+
"trim@<0.0.3": ">=0.0.3",
|
|
82
|
+
"trim-newlines@<3.0.1": ">=3.0.1",
|
|
83
|
+
"moment@<2.29.2": ">=2.29.2",
|
|
84
|
+
"semver-regex@<3.1.4": ">=3.1.4",
|
|
85
|
+
"got@<11.8.5": ">=11.8.5",
|
|
86
|
+
"moment@>=2.18.0 <2.29.4": ">=2.29.4",
|
|
87
|
+
"ansi-regex@>=3.0.0 <3.0.1": ">=3.0.1",
|
|
88
|
+
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1"
|
|
89
|
+
}
|
|
74
90
|
}
|
|
75
91
|
}
|
package/rules/best-practices.cjs
CHANGED
|
@@ -14,7 +14,7 @@ module.exports = {
|
|
|
14
14
|
// Disabled to avoid cases where semantic or
|
|
15
15
|
// pragmatic grouping is more practical
|
|
16
16
|
// https://stylelint.io/user-guide/rules/no-descending-specificity
|
|
17
|
-
"no-descending-specificity":
|
|
17
|
+
"no-descending-specificity": undefined,
|
|
18
18
|
|
|
19
19
|
// Enabled to improve consistency and readability.
|
|
20
20
|
// https://stylelint.io/user-guide/rules/at-rule-empty-line-before
|