Skip to content

Commit 4d00d51

Browse files
authored
Changing to @primer/stylelint-config and upgrading @primer/primitives to 5.0 rc (#1626)
* Changing to @primer/styleint-config * Put back these configs * Create early-insects-share.md
1 parent a530961 commit 4d00d51

File tree

6 files changed

+34
-31
lines changed

6 files changed

+34
-31
lines changed

.changeset/early-insects-share.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/css": minor
3+
---
4+
5+
Changing to @primer/stylelint-config and upgrading @primer/primitives to 5.0 rc

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@
15271527

15281528
- Storybook. We've added a storybook prototyping environment for testing components in seclusion. To start the server run `npm start`
15291529
- Adding yeoman generator for creating a primer module. `generator-primer-module`
1530-
- Importing `stylelint-config-primer` from https://github.com/primer/stylelint-config-primer/ into monorepo.
1530+
- Importing `stylelint-config-primer` from https://github.com/primer/stylelint-config/ into monorepo.
15311531
- Importing `stylelint-selector-no-utility` from https://github.com/primer/stylelint-selector-no-utility into monorepo.
15321532

15331533
### Changes
@@ -1617,7 +1617,7 @@ This release updates primer modules to use variables for spacing units instead o
16171617

16181618
# 9.1.0
16191619

1620-
This release updates our [stylelint config](/primer/stylelint-config-primer) to [v2.0.0](https://github.com/primer/stylelint-config-primer/releases/tag/v2.0.0), and to stylelint v7.13.0. Each module also now has a `lint` npm script, and there are top-level `test` and `lint` scripts that you can use to lint and test all modules in one go.
1620+
This release updates our [stylelint config](/primer/stylelint-config-primer) to [v2.0.0](https://github.com/primer/stylelint-config/releases/tag/v2.0.0), and to stylelint v7.13.0. Each module also now has a `lint` npm script, and there are top-level `test` and `lint` scripts that you can use to lint and test all modules in one go.
16211621

16221622
This release also includes major improvements to our Travis build scripts to automatically publish PR builds, release candidates, and the "final" versions to npm.
16231623

docs/content/tools/linting.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ Whether you work on `github/github` or not, it's useful to see lint errors local
2323
bin/stylelint "app/assets/stylesheets/**/*.scss" --syntax scss
2424
```
2525

26-
For more advanced usage, we recommend reading the [stylelint user guide](http://stylelint.io/user-guide/) and checking out our [primer stylelint configuration](https://github.com/primer/stylelint-config-primer).
26+
For more advanced usage, we recommend reading the [stylelint user guide](http://stylelint.io/user-guide/) and checking out our [primer stylelint configuration](https://github.com/primer/stylelint-config).
2727

2828
### Configuration
2929

3030
Stylelint is [configured by a JSON file](http://stylelint.io/user-guide/configuration/) that specifies which linter rules we enforce. If you are working on `github/github`, you don't need to do any setup because the configuration is included within the repository bundle.
3131

32-
We have extracted out our configuration file into a separate repository [primer/stylelint-config-primer](https://github.com/primer/stylelint-config-primer). This gives us a central source where we can keep the configuration up-to-date and distribute easily across all our projects.
32+
We have extracted out our configuration file into a separate repository [primer/stylelint-config](https://github.com/primer/stylelint-config). This gives us a central source where we can keep the configuration up-to-date and distribute easily across all our projects.
3333

34-
To [use the configuration](https://github.com/primer/stylelint-config-primer#usage) in your project, install the config `npm install --save stylelint-config-primer` via npm, and extend the config in your `.stylelintrc` file. Put the file in the root directory of your project.
34+
To [use the configuration](https://github.com/primer/stylelint-config#usage) in your project, install the config `npm install --save @primer/stylelint-config` via npm, and extend the config in your `.stylelintrc` file. Put the file in the root directory of your project.
3535

3636
```json
3737
{
38-
"extends": "stylelint-config-primer"
38+
"extends": "@primer/stylelint-config"
3939
}
4040
```
4141

42-
A list of all the specific rules we have enabled are documented in [the package README](https://github.com/primer/stylelint-config-primer#documentation).
42+
A list of all the specific rules we have enabled are documented in [the package README](https://github.com/primer/stylelint-config#documentation).
4343

4444
### Disabling
4545

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@
3434
"release": "changeset publish"
3535
},
3636
"dependencies": {
37-
"@primer/primitives": "^4.8.0"
37+
"@primer/primitives": "^5.0.0-rc.8de08c0"
3838
},
3939
"devDependencies": {
4040
"@changesets/changelog-github": "0.4.1",
4141
"@changesets/cli": "2.17.0",
4242
"@github/prettier-config": "0.0.4",
4343
"@koddsson/postcss-sass": "5.0.0",
44+
"@primer/stylelint-config": "12.0.0",
4445
"autoprefixer": "10.3.6",
4546
"cssstats": "4.0.2",
4647
"eslint": "7.32.0",
@@ -62,7 +63,6 @@
6263
"prettier": "2.4.1",
6364
"semver": "7.3.5",
6465
"stylelint": "13.13.1",
65-
"stylelint-config-primer": "11.1.1",
6666
"stylelint-scss": "3.21.0",
6767
"table": "6.7.1"
6868
},

stylelint.config.cjs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
const currentVersion = process.env.PRIMER_VERSION || require('./package.json').version
2-
31
module.exports = {
4-
extends: ['stylelint-config-primer'],
2+
extends: ['@primer/stylelint-config'],
53
plugins: ['stylelint-scss'],
64
syntax: 'scss',
75
ignoreFiles: ['src/fonts/**/*'],

yarn.lock

+19-19
Original file line numberDiff line numberDiff line change
@@ -968,10 +968,25 @@
968968
"@nodelib/fs.scandir" "2.1.5"
969969
fastq "^1.6.0"
970970

971-
"@primer/primitives@^4.8.0":
972-
version "4.8.1"
973-
resolved "https://registry.yarnpkg.com/@primer/primitives/-/primitives-4.8.1.tgz#05f76e47f67018514fd54b35ca615b9d27ef2a46"
974-
integrity sha512-mgr6+EKpn4DixuhLt3drk7QmNQO8M7RYONWovg1nkV7p56jklhDLfZmp1luLUee37eQGAxx3ToStL6gqINFjnQ==
971+
"@primer/primitives@^5.0.0-rc.8de08c0":
972+
version "5.0.0-rc.8de08c0"
973+
resolved "https://registry.yarnpkg.com/@primer/primitives/-/primitives-5.0.0-rc.8de08c0.tgz#b85825eb55d8b364ca31cb573e66e2caae63137a"
974+
integrity sha512-4qjGx4ec3FuAU/7sKjsVzDXMM8ZbFW/VstxmCwaraN6hXfgruZrGY0HlEuhzor0xenhdbxMZllsPoz6FxFIxNQ==
975+
976+
977+
version "12.0.0"
978+
resolved "https://registry.yarnpkg.com/@primer/stylelint-config/-/stylelint-config-12.0.0.tgz#33648ca2d630e9f93744fb3a311e245cd4d5b666"
979+
integrity sha512-BnuyuE3kkJYQhCUUFF3iotODB6l2/79zdTjLhkypYN2ctbTCnpdZs2JJiyLo2WGt/VPj6tQy+n8db+wcvq+w8w==
980+
dependencies:
981+
anymatch "^3.1.1"
982+
globby "^11.0.1"
983+
lodash.kebabcase "^4.1.1"
984+
postcss-value-parser "^4.0.2"
985+
string.prototype.matchall "^4.0.2"
986+
stylelint-no-unsupported-browser-features "^5.0.1"
987+
stylelint-order "^4.1.0"
988+
stylelint-scss "^3.19.0"
989+
tap-map "^1.0.0"
975990

976991
"@sinonjs/commons@^1.7.0":
977992
version "1.8.2"
@@ -5512,21 +5527,6 @@ style-search@^0.1.0:
55125527
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
55135528
integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=
55145529

5515-
5516-
version "11.1.1"
5517-
resolved "https://registry.yarnpkg.com/stylelint-config-primer/-/stylelint-config-primer-11.1.1.tgz#5a5bdafb679547b0089eac9c5c9a11b520707d0e"
5518-
integrity sha512-tmwi1DVuXg0G52v9vDiN7Vhyz3wVQ86FjARuozhO8lXJd8aIfyA5hLRLxxuelZMEqGyMGGKaMLU6OZSVoVwEIw==
5519-
dependencies:
5520-
anymatch "^3.1.1"
5521-
globby "^11.0.1"
5522-
lodash.kebabcase "^4.1.1"
5523-
postcss-value-parser "^4.0.2"
5524-
string.prototype.matchall "^4.0.2"
5525-
stylelint-no-unsupported-browser-features "^5.0.1"
5526-
stylelint-order "^4.1.0"
5527-
stylelint-scss "^3.19.0"
5528-
tap-map "^1.0.0"
5529-
55305530
stylelint-no-unsupported-browser-features@^5.0.1:
55315531
version "5.0.1"
55325532
resolved "https://registry.yarnpkg.com/stylelint-no-unsupported-browser-features/-/stylelint-no-unsupported-browser-features-5.0.1.tgz#a72460f3e537a4eb88ee4232924d5a17e4ee15bd"

0 commit comments

Comments
 (0)