@jgarber/stylelint-config 3.0.0 → 4.0.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/LICENSE +1 -1
- package/README.md +17 -10
- package/index.js +43 -24
- package/package.json +6 -9
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
# stylelint-config
|
|
1
|
+
# @jgarber/stylelint-config
|
|
2
2
|
|
|
3
|
-
Shareable [Stylelint](https://stylelint.io) configuration
|
|
3
|
+
**Shareable [Stylelint](https://stylelint.io) configuration.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@jgarber/stylelint-config)
|
|
6
6
|
[](https://www.npmjs.com/package/@jgarber/stylelint-config)
|
|
7
7
|
[](https://github.com/jgarber623/stylelint-config/actions/workflows/ci.yml)
|
|
8
8
|
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> See [@jgarber/stylelint-config-scss](https://www.npmjs.com/package/@jgarber/stylelint-config-scss) for a shareable Stylelint configuration suitable for SCSS syntax Sass files.
|
|
11
|
+
|
|
9
12
|
## Installation
|
|
10
13
|
|
|
11
14
|
```sh
|
|
@@ -38,18 +41,22 @@ In a file named `.stylelintrc` or `.stylelintrc.json`:
|
|
|
38
41
|
|
|
39
42
|
### JavaScript
|
|
40
43
|
|
|
41
|
-
In a JavaScript file using [
|
|
44
|
+
In a JavaScript file using [ECMAScript module (ESM)](https://nodejs.org/api/esm.html) syntax:
|
|
42
45
|
|
|
43
46
|
```js
|
|
44
|
-
// stylelint.config.
|
|
45
|
-
|
|
47
|
+
// stylelint.config.mjs
|
|
48
|
+
export { default } from "@jgarber/stylelint-config";
|
|
46
49
|
```
|
|
47
50
|
|
|
48
|
-
In a JavaScript file using [
|
|
51
|
+
In a JavaScript file using [CommonJS module](https://nodejs.org/api/modules.html) syntax:
|
|
49
52
|
|
|
50
53
|
```js
|
|
51
|
-
// stylelint.config.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
// stylelint.config.cjs
|
|
55
|
+
module.exports = {
|
|
56
|
+
extends: "@jgarber/stylelint-config"
|
|
57
|
+
}
|
|
55
58
|
```
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
@jgarber/stylelint-config is freely available under the [MIT License](https://opensource.org/licenses/MIT).
|
package/index.js
CHANGED
|
@@ -1,31 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export default {
|
|
2
|
+
/**
|
|
3
|
+
* @see {@link https://stylelint.io/user-guide/configure#extends}
|
|
4
|
+
* @see {@link https://www.npmjs.com/package/stylelint-config-standard}
|
|
5
|
+
* @see {@link https://www.npmjs.com/package/@stylistic/stylelint-config}
|
|
6
|
+
*/
|
|
7
|
+
extends: ["stylelint-config-standard", "@stylistic/stylelint-config"],
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link https://stylelint.io/user-guide/configure#plugins}
|
|
11
|
+
* @see {@link https://www.npmjs.com/package/stylelint-order}
|
|
12
|
+
*/
|
|
13
|
+
plugins: ["stylelint-order"],
|
|
14
|
+
|
|
4
15
|
rules: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Require an empty line before at-rules.
|
|
18
|
+
*
|
|
19
|
+
* @see {@link https://stylelint.io/user-guide/rules/at-rule-empty-line-before/}
|
|
20
|
+
*/
|
|
21
|
+
"at-rule-empty-line-before": [
|
|
22
|
+
"always",
|
|
10
23
|
{
|
|
11
|
-
except: [
|
|
12
|
-
ignore: [
|
|
13
|
-
}
|
|
24
|
+
except: ["blockless-after-same-name-blockless", "first-nested"],
|
|
25
|
+
ignore: ["after-comment"],
|
|
26
|
+
},
|
|
14
27
|
],
|
|
15
28
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Specify the alphabetical order of properties within declaration blocks.
|
|
31
|
+
*
|
|
32
|
+
* @see {@link https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-alphabetical-order/README.md}
|
|
33
|
+
*/
|
|
34
|
+
"order/properties-alphabetical-order": true,
|
|
20
35
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Specify Unix or Windows linebreaks.
|
|
38
|
+
*
|
|
39
|
+
* @see {@link https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/linebreaks}
|
|
40
|
+
*/
|
|
41
|
+
"@stylistic/linebreaks": "unix",
|
|
25
42
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Disallow the Unicode Byte Order Mark.
|
|
45
|
+
*
|
|
46
|
+
* @see {@link https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/unicode-bom}
|
|
47
|
+
*/
|
|
48
|
+
"@stylistic/unicode-bom": "never",
|
|
49
|
+
},
|
|
31
50
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jgarber/stylelint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Shareable Stylelint configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stylelint",
|
|
@@ -14,14 +14,12 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"index.js"
|
|
16
16
|
],
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
".": "./index.js"
|
|
20
|
-
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": "./index.js",
|
|
21
19
|
"repository": "github:jgarber623/stylelint-config",
|
|
22
20
|
"scripts": {
|
|
23
21
|
"lint": "eslint .",
|
|
24
|
-
"test": "
|
|
22
|
+
"test": "NODE_V8_COVERAGE=coverage node --experimental-test-coverage --test"
|
|
25
23
|
},
|
|
26
24
|
"dependencies": {
|
|
27
25
|
"@stylistic/stylelint-config": "^1.0.1",
|
|
@@ -29,9 +27,8 @@
|
|
|
29
27
|
"stylelint-order": "^6.0.4"
|
|
30
28
|
},
|
|
31
29
|
"devDependencies": {
|
|
32
|
-
"@jgarber/eslint-config": "^
|
|
33
|
-
"
|
|
34
|
-
"stylelint": "^16.1.0"
|
|
30
|
+
"@jgarber/eslint-config": "^4.0.0",
|
|
31
|
+
"stylelint": "^16.2.1"
|
|
35
32
|
},
|
|
36
33
|
"peerDependencies": {
|
|
37
34
|
"stylelint": ">=16.1"
|