@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.
Files changed (4) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +17 -10
  3. package/index.js +43 -24
  4. package/package.json +6 -9
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022–present Jason Garber
3
+ Copyright (c) 2022 Jason Garber
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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
  [![npm](https://img.shields.io/npm/v/@jgarber/stylelint-config.svg?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/@jgarber/stylelint-config)
6
6
  [![Downloads](https://img.shields.io/npm/dt/@jgarber/stylelint-config.svg?logo=npm&style=for-the-badge)](https://www.npmjs.com/package/@jgarber/stylelint-config)
7
7
  [![Build](https://img.shields.io/github/actions/workflow/status/jgarber623/stylelint-config/ci.yml?branch=main&logo=github&style=for-the-badge)](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 [CommonJS module](https://nodejs.org/api/modules.html) syntax:
44
+ In a JavaScript file using [ECMAScript module (ESM)](https://nodejs.org/api/esm.html) syntax:
42
45
 
43
46
  ```js
44
- // stylelint.config.cjs
45
- module.exports = require('@jgarber/stylelint-config');
47
+ // stylelint.config.mjs
48
+ export { default } from "@jgarber/stylelint-config";
46
49
  ```
47
50
 
48
- In a JavaScript file using [ECMAScript module (ESM)](https://nodejs.org/api/esm.html) syntax:
51
+ In a JavaScript file using [CommonJS module](https://nodejs.org/api/modules.html) syntax:
49
52
 
50
53
  ```js
51
- // stylelint.config.mjs
52
- import config from '@jgarber/stylelint-config';
53
-
54
- export default config;
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
- module.exports = {
2
- extends: ['stylelint-config-standard', '@stylistic/stylelint-config'],
3
- plugins: ['stylelint-order'],
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
- // Require an empty line before at-rules.
6
- //
7
- // https://stylelint.io/user-guide/rules/at-rule-empty-line-before/
8
- 'at-rule-empty-line-before': [
9
- 'always',
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: ['blockless-after-same-name-blockless', 'first-nested'],
12
- ignore: ['after-comment']
13
- }
24
+ except: ["blockless-after-same-name-blockless", "first-nested"],
25
+ ignore: ["after-comment"],
26
+ },
14
27
  ],
15
28
 
16
- // Specify the alphabetical order of properties within declaration blocks.
17
- //
18
- // https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-alphabetical-order/README.md
19
- 'order/properties-alphabetical-order': true,
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
- // Specify Unix or Windows linebreaks.
22
- //
23
- // https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/linebreaks
24
- '@stylistic/linebreaks': 'unix',
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
- // Disallow the Unicode Byte Order Mark.
27
- //
28
- // https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/unicode-bom
29
- '@stylistic/unicode-bom': 'never'
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.0.0",
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
- "exports": {
18
- "./package.json": "./package.json",
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": "ava"
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": "^3.0.0",
33
- "ava": "^6.0.1",
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"