@primer/stylelint-config 12.1.0 → 12.2.0-rc.0c2130c

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/CHANGELOG.md +16 -0
  2. package/README.md +2 -0
  3. package/index.js +38 -94
  4. package/package.json +17 -34
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 12.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#170](https://github.com/primer/stylelint-config/pull/170) [`b56fcd1`](https://github.com/primer/stylelint-config/commit/b56fcd1bce90d2e3e1621ef7af7545c52c935579) Thanks [@jonrohan](https://github.com/jonrohan)! - Moving config from primer/css's [stylelint.config.cjs](https://github.com/primer/css/blob/c65be7f0c8b0fb6e1ba406b5d35c6073df161a33/stylelint.config.cjs) file to this package.
8
+
9
+ * [#168](https://github.com/primer/stylelint-config/pull/168) [`d6ff2b9`](https://github.com/primer/stylelint-config/commit/d6ff2b94ff0d309c1b79e783e6ee1b2f87a375ff) Thanks [@jonrohan](https://github.com/jonrohan)! - Extending stylelint-config-standard and removing defaults
10
+
11
+ - [#170](https://github.com/primer/stylelint-config/pull/170) [`b56fcd1`](https://github.com/primer/stylelint-config/commit/b56fcd1bce90d2e3e1621ef7af7545c52c935579) Thanks [@jonrohan](https://github.com/jonrohan)! - Adding config from the [stylelint-scss recommended config](https://github.com/stylelint-scss/stylelint-config-recommended-scss/blob/82d51c399ddaa2f9d282e419399dd2028f47830c/index.js).
12
+
13
+ ## 12.1.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [#161](https://github.com/primer/stylelint-config/pull/161) [`48c4afc`](https://github.com/primer/stylelint-config/commit/48c4afc1913863136d62967653697323f8da57b7) Thanks [@dependabot](https://github.com/apps/dependabot)! - Bump @primer/primitives from 6.1.0 to 7.0.1
18
+
3
19
  ## 12.1.0
4
20
 
5
21
  ### Minor Changes
package/README.md CHANGED
@@ -22,6 +22,8 @@ Within your [stylelint config object](http://stylelint.io/user-guide/configurati
22
22
 
23
23
  ## Documentation
24
24
 
25
+ Primer Stylelint Config extends the [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) configuration supplied by Stylelint, and makes modifications in `/index.js`.
26
+
25
27
  ### Plugins
26
28
 
27
29
  - [stylelint-order](https://github.com/hudochenkov/stylelint-order): Order-related linting rules for stylelint. Properties must be [sorted according to this list](https://github.com/primer/stylelint-config/blob/main/property-order.js).
package/index.js CHANGED
@@ -2,6 +2,9 @@ const browsers = require('./browsers')
2
2
  const propertyOrder = require('./property-order')
3
3
 
4
4
  module.exports = {
5
+ extends: ['stylelint-config-standard'],
6
+ customSyntax: require('postcss-scss'),
7
+ ignoreFiles: ['**/*.js', '**/*.cjs'],
5
8
  plugins: [
6
9
  'stylelint-no-unsupported-browser-features',
7
10
  'stylelint-order',
@@ -18,129 +21,70 @@ module.exports = {
18
21
  './plugins/typography'
19
22
  ],
20
23
  rules: {
24
+ 'alpha-value-notation': 'number',
21
25
  'at-rule-disallowed-list': ['extend'],
22
- 'at-rule-name-case': 'lower',
23
- 'at-rule-name-space-after': 'always-single-line',
24
- 'at-rule-semicolon-newline-after': 'always',
25
- 'block-closing-brace-newline-after': 'always',
26
- 'block-closing-brace-newline-before': 'always-multi-line',
27
- 'block-closing-brace-space-before': 'always-single-line',
26
+ 'at-rule-no-unknown': null,
28
27
  'block-no-empty': true,
29
- 'block-opening-brace-newline-after': 'always-multi-line',
30
- 'block-opening-brace-space-after': 'always-single-line',
31
- 'block-opening-brace-space-before': 'always',
32
- 'color-hex-case': 'lower',
33
- 'color-hex-length': 'short',
28
+ 'color-function-notation': null,
34
29
  'color-named': 'never',
35
30
  'color-no-invalid-hex': true,
36
- 'comment-empty-line-before': [
37
- 'always',
38
- {
39
- except: ['first-nested'],
40
- ignore: ['stylelint-commands']
41
- }
42
- ],
43
- 'comment-whitespace-inside': 'always',
44
- 'declaration-bang-space-after': 'never',
45
- 'declaration-bang-space-before': 'always',
46
- 'declaration-block-no-duplicate-properties': [
47
- true,
48
- {
49
- ignore: ['consecutive-duplicates']
50
- }
51
- ],
31
+ 'comment-no-empty': null,
32
+ 'custom-property-pattern': null,
33
+ 'declaration-block-no-duplicate-properties': [true, {ignore: ['consecutive-duplicates']}],
34
+ 'declaration-block-no-redundant-longhand-properties': null,
52
35
  'declaration-block-no-shorthand-property-overrides': true,
53
- 'order/properties-order': propertyOrder,
54
36
  'declaration-block-semicolon-newline-after': 'always',
55
- 'declaration-block-semicolon-space-before': 'never',
56
- 'declaration-block-single-line-max-declarations': 1,
57
- 'declaration-block-trailing-semicolon': 'always',
58
- 'declaration-colon-newline-after': 'always-multi-line',
59
- 'declaration-colon-space-after': 'always-single-line',
60
- 'declaration-colon-space-before': 'never',
61
37
  'declaration-property-value-disallowed-list': {
62
38
  '/^transition/': ['/all/'],
63
39
  '/^background/': ['http:', 'https:'],
64
40
  '/^border/': ['none'],
65
41
  '/.+/': ['initial']
66
42
  },
67
- 'font-family-name-quotes': 'always-where-recommended',
68
43
  'function-calc-no-unspaced-operator': true,
69
- 'function-comma-newline-after': 'always-multi-line',
70
- 'function-comma-space-after': 'always-single-line',
71
- 'function-comma-space-before': 'never',
72
44
  'function-linear-gradient-no-nonstandard-direction': true,
73
- 'function-max-empty-lines': 0,
74
- 'function-name-case': 'lower',
75
- 'function-parentheses-newline-inside': 'always-multi-line',
76
- 'function-parentheses-space-inside': 'never-single-line',
77
- 'function-url-quotes': 'always',
78
- 'function-whitespace-after': 'always',
79
- 'length-zero-no-unit': true,
80
- 'max-empty-lines': 1,
45
+ 'keyframes-name-pattern': null,
46
+ 'max-line-length': null,
81
47
  'max-nesting-depth': 3,
82
- 'media-feature-colon-space-after': 'always',
83
- 'media-feature-colon-space-before': 'never',
84
- 'media-feature-parentheses-space-inside': 'never',
85
- 'media-feature-range-operator-space-after': 'always',
86
- 'media-feature-range-operator-space-before': 'always',
87
- 'media-query-list-comma-newline-after': 'always-multi-line',
88
- 'media-query-list-comma-space-after': 'always-single-line',
89
- 'media-query-list-comma-space-before': 'never',
48
+ 'media-feature-name-no-unknown': null,
49
+ 'media-feature-name-no-vendor-prefix': null,
50
+ 'no-descending-specificity': null,
90
51
  'no-duplicate-selectors': true,
91
- 'no-eol-whitespace': true,
92
52
  'no-extra-semicolons': true,
93
- 'no-missing-end-of-source-newline': true,
94
- 'number-leading-zero': 'always',
95
- 'number-no-trailing-zeros': true,
96
- 'plugin/no-unsupported-browser-features': [
53
+ 'no-invalid-position-at-import-rule': [true, {ignoreAtRules: ['use']}],
54
+ 'number-max-precision': null,
55
+ 'order/properties-order': propertyOrder,
56
+ 'plugin/no-unsupported-browser-features': [true, {severity: 'warning', browsers}],
57
+ 'primer/borders': true,
58
+ 'primer/box-shadow': true,
59
+ 'primer/colors': true,
60
+ 'primer/no-deprecated-colors': true,
61
+ 'primer/no-override': true,
62
+ 'primer/no-undefined-vars': [
97
63
  true,
98
- {
99
- severity: 'warning',
100
- browsers
101
- }
64
+ {severity: 'warning', files: 'node_modules/@primer/primitives/dist/scss/colors*/*.scss'}
102
65
  ],
103
- 'primer/no-override': true,
104
- 'primer/no-deprecated-colors': true,
105
- // unused vars are not necessarily an error, since they may be referenced
106
- // in other projects
107
66
  'primer/no-unused-vars': [true, {severity: 'warning'}],
108
- 'property-case': 'lower',
109
- 'property-no-vendor-prefix': true,
110
- 'rule-empty-line-before': [
111
- 'always-multi-line',
112
- {
113
- except: ['first-nested'],
114
- ignore: ['after-comment']
115
- }
116
- ],
67
+ 'primer/spacing': true,
68
+ 'primer/typography': true,
69
+ 'scss/at-extend-no-missing-placeholder': true,
70
+ 'scss/at-rule-no-unknown': true,
71
+ 'scss/declaration-nested-properties-no-divided-groups': true,
72
+ 'scss/dollar-variable-default': [true, {ignore: 'local'}],
73
+ 'scss/dollar-variable-no-missing-interpolation': true,
74
+ 'scss/function-quote-no-quoted-strings-inside': true,
75
+ 'scss/function-unquote-no-unquoted-strings-inside': true,
76
+ 'scss/no-duplicate-mixins': true,
117
77
  'scss/selector-no-redundant-nesting-selector': true,
118
- 'selector-attribute-brackets-space-inside': 'never',
119
- 'selector-attribute-operator-space-after': 'never',
120
- 'selector-attribute-operator-space-before': 'never',
121
- 'selector-combinator-space-after': 'always',
122
- 'selector-combinator-space-before': 'always',
123
- 'selector-list-comma-newline-after': 'always',
124
- 'selector-list-comma-space-before': 'never',
78
+ 'selector-class-pattern': null,
125
79
  'selector-max-compound-selectors': 3,
126
- 'selector-max-empty-lines': 0,
127
80
  'selector-max-id': 0,
128
81
  'selector-max-specificity': '0,4,0',
129
82
  'selector-max-type': 0,
130
83
  'selector-no-qualifying-type': true,
131
- 'selector-pseudo-class-case': 'lower',
132
- 'selector-pseudo-class-parentheses-space-inside': 'never',
133
- 'selector-pseudo-element-case': 'lower',
134
- 'selector-pseudo-element-colon-notation': 'double',
135
84
  'selector-pseudo-element-no-unknown': true,
136
- 'selector-type-case': 'lower',
137
- 'shorthand-property-no-redundant-values': true,
138
85
  'string-no-newline': true,
139
86
  'string-quotes': 'single',
140
- 'unit-case': 'lower',
141
87
  'unit-no-unknown': true,
142
- 'value-list-comma-space-after': 'always-single-line',
143
- 'value-list-comma-space-before': 'never',
144
- 'value-no-vendor-prefix': true
88
+ 'value-keyword-case': null
145
89
  }
146
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/stylelint-config",
3
- "version": "12.1.0",
3
+ "version": "12.2.0-rc.0c2130c",
4
4
  "description": "Sharable stylelint config used by GitHub's CSS",
5
5
  "homepage": "http://primer.style/css/tools/linting",
6
6
  "author": "GitHub, Inc.",
@@ -28,52 +28,35 @@
28
28
  "anymatch": "^3.1.1",
29
29
  "globby": "^11.0.1",
30
30
  "lodash.kebabcase": "^4.1.1",
31
+ "postcss-scss": "^4.0.2",
31
32
  "postcss-value-parser": "^4.0.2",
32
33
  "string.prototype.matchall": "^4.0.2",
34
+ "stylelint-config-standard": "24.0.0",
33
35
  "stylelint-no-unsupported-browser-features": "^5.0.1",
34
36
  "stylelint-order": "^5.0.0",
35
37
  "stylelint-scss": "^4.0.0",
36
38
  "tap-map": "^1.0.0"
37
39
  },
38
40
  "peerDependencies": {
39
- "@primer/css": "*",
40
- "@primer/primitives": "^6.0.0"
41
+ "@primer/css": ">= 18.0.0",
42
+ "@primer/primitives": ">= 6.0.0",
43
+ "stylelint": ">= 14.0.0"
41
44
  },
42
45
  "devDependencies": {
43
- "@changesets/changelog-github": "0.4.1",
44
- "@changesets/cli": "2.17.0",
46
+ "@changesets/changelog-github": "0.4.2",
47
+ "@changesets/cli": "2.18.1",
45
48
  "@github/prettier-config": "0.0.4",
46
- "@primer/css": "^16.3.0",
47
- "@primer/primitives": "^6.0.0",
49
+ "@primer/css": "^19.0.0",
50
+ "@primer/primitives": "^7.0.1",
48
51
  "dedent": "0.7.0",
49
- "eslint": "7.32.0",
50
- "eslint-plugin-github": "4.3.2",
51
- "eslint-plugin-jest": "25.2.2",
52
+ "eslint": "8.4.0",
53
+ "eslint-plugin-github": "4.3.5",
54
+ "eslint-plugin-jest": "25.3.0",
52
55
  "eslint-plugin-prettier": "4.0.0",
53
- "jest": "27.3.1",
54
- "jest-preset-stylelint": "4.1.1",
55
- "postcss-scss": "4.0.1",
56
- "prettier": "2.4.1",
57
- "stylelint": "14.0.0"
58
- },
59
- "eslintConfig": {
60
- "extends": [
61
- "plugin:github/internal",
62
- "plugin:github/recommended"
63
- ],
64
- "env": {
65
- "es6": true,
66
- "node": true
67
- },
68
- "parserOptions": {
69
- "ecmaVersion": 2017,
70
- "requireConfigFile": false
71
- },
72
- "rules": {
73
- "import/no-commonjs": "off",
74
- "github/no-then": "off",
75
- "i18n-text/no-en": "off"
76
- }
56
+ "jest": "27.4.3",
57
+ "jest-preset-stylelint": "4.2.0",
58
+ "prettier": "2.5.1",
59
+ "stylelint": "14.1.0"
77
60
  },
78
61
  "jest": {
79
62
  "preset": "jest-preset-stylelint",