@jgarber/stylelint-config 1.0.0 → 1.0.1

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.js CHANGED
@@ -5,8 +5,25 @@ module.exports = {
5
5
  ],
6
6
  plugins: ['stylelint-order'],
7
7
  rules: {
8
+ /*
9
+ * Specify the alphabetical order of properties within declaration blocks.
10
+ *
11
+ * @see {@link https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-alphabetical-order/README.md}
12
+ */
8
13
  'order/properties-alphabetical-order': true,
14
+
15
+ /*
16
+ * Specify Unix or Windows linebreaks.
17
+ *
18
+ * @see {@link https://github.com/elirasza/stylelint-stylistic/tree/main/lib/rules/linebreaks}
19
+ */
9
20
  'stylistic/linebreaks': 'unix',
21
+
22
+ /*
23
+ * Disallow the Unicode Byte Order Mark.
24
+ *
25
+ * @see {@link https://github.com/elirasza/stylelint-stylistic/tree/main/lib/rules/unicode-bom}
26
+ */
10
27
  'stylistic/unicode-bom': 'never'
11
28
  }
12
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jgarber/stylelint-config",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Shareable Stylelint configuration.",
5
5
  "keywords": [
6
6
  "stylelint",
@@ -23,17 +23,17 @@
23
23
  "devDependencies": {
24
24
  "@jgarber/eslint-config": "^1.1.0",
25
25
  "globals": "^13.20.0",
26
- "jasmine": "^5.0.2",
27
- "stylelint": "^15.10.1",
26
+ "jasmine": "^5.1.0",
27
+ "stylelint": "^15.10.2",
28
28
  "stylelint-config-standard": "^34.0.0",
29
29
  "stylelint-order": "^6.0.3",
30
30
  "stylelint-stylistic": "^0.4.3"
31
31
  },
32
32
  "peerDependencies": {
33
- "stylelint": ">=15.10.1",
34
- "stylelint-config-standard": ">=34.0.0",
35
- "stylelint-order": ">=6.0.3",
36
- "stylelint-stylistic": ">=0.4.3"
33
+ "stylelint": ">=15.10",
34
+ "stylelint-config-standard": ">=34.0",
35
+ "stylelint-order": ">=6.0",
36
+ "stylelint-stylistic": ">=0.4"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
package/.editorconfig DELETED
@@ -1,10 +0,0 @@
1
- # EditorConfig is awesome: https://EditorConfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- end_of_line = lf
7
- insert_final_newline = true
8
- indent_size = 2
9
- indent_style = space
10
- trim_trailing_whitespace = true
@@ -1,15 +0,0 @@
1
- version: 2
2
-
3
- updates:
4
- - package-ecosystem: "github-actions"
5
- directory: "/"
6
- schedule:
7
- interval: "weekly"
8
- assignees:
9
- - "jgarber623"
10
- - package-ecosystem: "npm"
11
- directory: "/"
12
- schedule:
13
- interval: "monthly"
14
- assignees:
15
- - "jgarber623"
@@ -1,27 +0,0 @@
1
- name: CI
2
-
3
- on: push
4
-
5
- jobs:
6
- lint:
7
- name: Lint files
8
- runs-on: ubuntu-20.04
9
- steps:
10
- - uses: actions/checkout@v3
11
- - uses: actions/setup-node@v3
12
- with:
13
- node-version-file: ".nvmrc"
14
- cache: npm
15
- - run: npm ci
16
- - run: npm run lint
17
- test:
18
- name: Test files
19
- runs-on: ubuntu-20.04
20
- steps:
21
- - uses: actions/checkout@v3
22
- - uses: actions/setup-node@v3
23
- with:
24
- node-version-file: ".nvmrc"
25
- cache: npm
26
- - run: npm ci
27
- - run: npm test
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- lts/*
package/eslint.config.js DELETED
@@ -1,14 +0,0 @@
1
- const config = require('@jgarber/eslint-config');
2
- const globals = require('globals');
3
-
4
- module.exports = [
5
- ...config,
6
- {
7
- files: ['spec/**/*[sS]pec.?(m)js'],
8
- languageOptions: {
9
- globals: {
10
- ...globals.jasmine
11
- }
12
- }
13
- }
14
- ];
package/spec/indexSpec.js DELETED
@@ -1,38 +0,0 @@
1
- const stylelint = require('stylelint');
2
-
3
- const config = require('../index');
4
-
5
- it('exports an Object', () => {
6
- expect(config).toEqual(jasmine.objectContaining({
7
- extends: ['stylelint-config-standard', 'stylelint-stylistic/config'],
8
- plugins: ['stylelint-order']
9
- }));
10
- });
11
-
12
- it('loads the config and validates correct syntax', async () => {
13
- const code = 'html { margin: 0; }\n';
14
- const { errored } = await stylelint.lint({ code, config });
15
-
16
- expect(errored).toBe(false);
17
- });
18
-
19
- it('loads the config and invalidates incorrect syntax', async () => {
20
- const code = 'html {padding: 0\r\n; margin: 0 }';
21
- const { errored, results } = await stylelint.lint({ code, config });
22
-
23
- expect(errored).toBe(true);
24
-
25
- expect(results[0].warnings.map(({ rule }) => rule))
26
- .toEqual(jasmine.arrayContaining(
27
- [
28
- 'order/properties-alphabetical-order',
29
- 'stylistic/block-closing-brace-newline-before',
30
- 'stylistic/block-opening-brace-newline-after',
31
- 'stylistic/declaration-block-semicolon-newline-after',
32
- 'stylistic/declaration-block-semicolon-space-before',
33
- 'stylistic/declaration-block-trailing-semicolon',
34
- 'stylistic/linebreaks',
35
- 'stylistic/no-missing-end-of-source-newline'
36
- ]
37
- ));
38
- });
@@ -1,14 +0,0 @@
1
- {
2
- "spec_dir": "spec",
3
- "spec_files": [
4
- "**/*[sS]pec.?(m)js"
5
- ],
6
- "helpers": [
7
- "helpers/**/*.?(m)js"
8
- ],
9
- "env": {
10
- "failSpecWithNoExpectations": true,
11
- "random": true,
12
- "stopSpecOnExpectationFailure": false
13
- }
14
- }