Skip to content

Commit 653d596

Browse files
authored
Renaming the package to use org scope (#129)
* Renaming the package to use org scope * Rename all the references * Add release canary workflow * Create nervous-geckos-remain.md
1 parent 955a1fd commit 653d596

File tree

11 files changed

+94
-28
lines changed

11 files changed

+94
-28
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": ["@changesets/changelog-github", {"repo": "primer/stylelint-config-primer"}],
3+
"changelog": ["@changesets/changelog-github", {"repo": "primer/stylelint-config"}],
44
"commit": false,
55
"linked": [],
66
"access": "public",

.changeset/nervous-geckos-remain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/stylelint-config": major
3+
---
4+
5+
Renaming the package to use org scope. This is a breaking change, you'll need to uninstall `stylelint-config-primer` and reinstall `@primer/stylelint-config`.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
release:
88
name: Final
9-
if: ${{ github.repository == 'primer/stylelint-config-primer' }}
9+
if: ${{ github.repository == 'primer/stylelint-config' }}
1010

1111
runs-on: ubuntu-latest
1212
steps:

.github/workflows/release_canary.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'main'
6+
- 'changeset-release/**'
7+
- 'dependabot/**'
8+
9+
jobs:
10+
release-canary:
11+
name: Canary
12+
if: ${{ github.repository == 'primer/stylelint-config' }}
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
with:
19+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
20+
fetch-depth: 0
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: 14.x
26+
27+
- name: Install dependencies
28+
run: yarn
29+
30+
- name: Create .npmrc
31+
run: |
32+
cat << EOF > "$HOME/.npmrc"
33+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
34+
EOF
35+
env:
36+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
37+
38+
- name: Publish canary version
39+
run: |
40+
echo "$( jq '.version = "0.0.0"' package.json )" > package.json
41+
echo -e "---\n'@primer/stylelint-config': patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
42+
rm -f .changeset/pre.json
43+
yarn changeset version --snapshot
44+
yarn changeset publish --tag canary
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Output canary version number
49+
uses: actions/github-script@v5
50+
with:
51+
script: |
52+
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
53+
github.rest.repos.createCommitStatus({
54+
owner: context.repo.owner,
55+
repo: context.repo.repo,
56+
sha: context.sha,
57+
state: 'success',
58+
context: `Published ${package.name}`,
59+
description: package.version,
60+
target_url: `https://unpkg.com/${package.name}@${package.version}/`
61+
})

.github/workflows/release_candidate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
release-candidate:
99
name: Candidate
10-
if: ${{ github.repository == 'primer/stylelint-config-primer' }}
10+
if: ${{ github.repository == 'primer/stylelint-config' }}
1111

1212
runs-on: ubuntu-latest
1313
steps:

CHANGELOG.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,57 @@
44

55
### Patch Changes
66

7-
- [`3a4654b`](https://github.com/primer/stylelint-config-primer/commit/3a4654b1b7920d71e1284ff78a3bedff932e66a3) [#111](https://github.com/primer/stylelint-config-primer/pull/111) Thanks [@jonrohan](https://github.com/jonrohan)! - Fixing the primer/colors and primer/borders rules
7+
- [`3a4654b`](https://github.com/primer/stylelint-config/commit/3a4654b1b7920d71e1284ff78a3bedff932e66a3) [#111](https://github.com/primer/stylelint-config/pull/111) Thanks [@jonrohan](https://github.com/jonrohan)! - Fixing the primer/colors and primer/borders rules
88

99
## 11.1.0
1010

1111
### Minor Changes
1212

13-
- [`e83f61c`](https://github.com/primer/stylelint-config-primer/commit/e83f61cef3bf1df1d9420662594040efdcb86c89) [#99](https://github.com/primer/stylelint-config-primer/pull/99) Thanks [@jonrohan](https://github.com/jonrohan)! - Create a `no-deprecated-colors` rule that looks for deprecated css color variables from primer/primitives.
13+
- [`e83f61c`](https://github.com/primer/stylelint-config/commit/e83f61cef3bf1df1d9420662594040efdcb86c89) [#99](https://github.com/primer/stylelint-config/pull/99) Thanks [@jonrohan](https://github.com/jonrohan)! - Create a `no-deprecated-colors` rule that looks for deprecated css color variables from primer/primitives.
1414

1515
### Patch Changes
1616

17-
- [`581f40a`](https://github.com/primer/stylelint-config-primer/commit/581f40a4aacb45db5426b82d4a2434e81eb032e2) [#105](https://github.com/primer/stylelint-config-primer/pull/105) Thanks [@jonrohan](https://github.com/jonrohan)! - Adding reporting to the linter to know how many variables are replaced
17+
- [`581f40a`](https://github.com/primer/stylelint-config/commit/581f40a4aacb45db5426b82d4a2434e81eb032e2) [#105](https://github.com/primer/stylelint-config/pull/105) Thanks [@jonrohan](https://github.com/jonrohan)! - Adding reporting to the linter to know how many variables are replaced
1818

1919
## 10.0.1
2020

2121
### Patch Changes
2222

23-
- [`aa76171`](https://github.com/primer/stylelint-config-primer/commit/aa76171fc5c9c308fcd9d7f7285c8fbdb2c18a7b) [#90](https://github.com/primer/stylelint-config-primer/pull/90) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating the no-undefined-variables lint for the new color-variables mixin.
23+
- [`aa76171`](https://github.com/primer/stylelint-config/commit/aa76171fc5c9c308fcd9d7f7285c8fbdb2c18a7b) [#90](https://github.com/primer/stylelint-config/pull/90) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating the no-undefined-variables lint for the new color-variables mixin.
2424

2525
## 10.0.0
2626

2727
### Major Changes
2828

29-
- [`23a1f15`](https://github.com/primer/stylelint-config-primer/commit/23a1f1599673f2a4f9f28c39da61f42871c05697) [#85](https://github.com/primer/stylelint-config-primer/pull/85) Thanks [@koddsson](https://github.com/koddsson)! - Replace deprecated "blacklist" rules for "dissallow list" rules.
29+
- [`23a1f15`](https://github.com/primer/stylelint-config/commit/23a1f1599673f2a4f9f28c39da61f42871c05697) [#85](https://github.com/primer/stylelint-config/pull/85) Thanks [@koddsson](https://github.com/koddsson)! - Replace deprecated "blacklist" rules for "dissallow list" rules.
3030

3131
See https://stylelint.io/user-guide/rules/at-rule-blacklist and http://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list/
3232

3333
### Patch Changes
3434

35-
- [`40d9bb8`](https://github.com/primer/stylelint-config-primer/commit/40d9bb867194ae4335846953b5d8706dc7dc7d79) [#86](https://github.com/primer/stylelint-config-primer/pull/86) Thanks [@koddsson](https://github.com/koddsson)! - Allow rules to optionally display a URL with their message.
35+
- [`40d9bb8`](https://github.com/primer/stylelint-config/commit/40d9bb867194ae4335846953b5d8706dc7dc7d79) [#86](https://github.com/primer/stylelint-config/pull/86) Thanks [@koddsson](https://github.com/koddsson)! - Allow rules to optionally display a URL with their message.
3636

3737
## 9.3.3
3838

3939
### Patch Changes
4040

41-
- [`a339c69`](https://github.com/primer/stylelint-config-primer/commit/a339c698b9ba7ccd01b8cb773dad7a3a14dd13a1) [#81](https://github.com/primer/stylelint-config-primer/pull/81) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Update globby to v11
41+
- [`a339c69`](https://github.com/primer/stylelint-config/commit/a339c698b9ba7ccd01b8cb773dad7a3a14dd13a1) [#81](https://github.com/primer/stylelint-config/pull/81) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Update globby to v11
4242

4343
## 9.3.2
4444

4545
### Patch Changes
4646

47-
- [`d18cfbf`](https://github.com/primer/stylelint-config-primer/commit/d18cfbfefc25be6ae38f73132552d2f3c62c4d02) [#79](https://github.com/primer/stylelint-config-primer/pull/79) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Add additinal verbose logging to `no-undefined-vars`
47+
- [`d18cfbf`](https://github.com/primer/stylelint-config/commit/d18cfbfefc25be6ae38f73132552d2f3c62c4d02) [#79](https://github.com/primer/stylelint-config/pull/79) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Add additinal verbose logging to `no-undefined-vars`
4848

49-
* [`d18cfbf`](https://github.com/primer/stylelint-config-primer/commit/d18cfbfefc25be6ae38f73132552d2f3c62c4d02) [#79](https://github.com/primer/stylelint-config-primer/pull/79) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Fix handling of edge-cases in `no-undefined-vars`
49+
* [`d18cfbf`](https://github.com/primer/stylelint-config/commit/d18cfbfefc25be6ae38f73132552d2f3c62c4d02) [#79](https://github.com/primer/stylelint-config/pull/79) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Fix handling of edge-cases in `no-undefined-vars`
5050

51-
- [`bb07673`](https://github.com/primer/stylelint-config-primer/commit/bb076732aa216fcb56e411b8dd7477efc89f7f8a) [#76](https://github.com/primer/stylelint-config-primer/pull/76) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Set the default verbose option for `no-scale-colors` to false
51+
- [`bb07673`](https://github.com/primer/stylelint-config/commit/bb076732aa216fcb56e411b8dd7477efc89f7f8a) [#76](https://github.com/primer/stylelint-config/pull/76) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Set the default verbose option for `no-scale-colors` to false
5252

5353
## 9.3.1
5454

5555
### Patch Changes
5656

57-
- [`df11e2d`](https://github.com/primer/stylelint-config-primer/commit/df11e2d912913346e0499f7eac901cdfcb83f38c) [#74](https://github.com/primer/stylelint-config-primer/pull/74) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Add primer/no-scale-colors to the list of exported plugins
57+
- [`df11e2d`](https://github.com/primer/stylelint-config/commit/df11e2d912913346e0499f7eac901cdfcb83f38c) [#74](https://github.com/primer/stylelint-config/pull/74) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Add primer/no-scale-colors to the list of exported plugins
5858

5959
## 9.2.1
6060

@@ -98,7 +98,7 @@
9898
- It's also now possible to provide rule _overrides_ in local stylelint configs as functions:
9999
```js
100100
module.exports = {
101-
extends: 'stylelint-config-primer',
101+
extends: '@primer/stylelint-config',
102102
rules: {
103103
'primer/colors': [true, {
104104
rules: ({variables, rules}) => {
@@ -140,7 +140,7 @@ The rest of the changes should not introduce new linting errors:
140140
## 1.4.0
141141

142142
- Updated: Development dependencies are any version `*`
143-
- Removed: `selector-class-pattern` from config. https://github.com/primer/stylelint-config-primer/pull/11
143+
- Removed: `selector-class-pattern` from config. https://github.com/primer/stylelint-config/pull/11
144144

145145
## 1.3.0
146146

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Primer Stylelint Config
22

3-
[![npm version](https://img.shields.io/npm/v/stylelint-config-primer.svg)](https://www.npmjs.org/package/stylelint-config-primer)
3+
[![npm version](https://img.shields.io/npm/v/@primer/stylelint-config.svg)](https://www.npmjs.org/package/@primer/stylelint-config)
44

55
> A sharable stylelint config object that enforces GitHub's CSS rules
66
77
## Install
88

99
```
10-
$ npm install --save --dev stylelint-config-primer
10+
$ npm install --save --dev @primer/stylelint-config
1111
```
1212

1313
## Usage
@@ -16,15 +16,15 @@ Within your [stylelint config object](http://stylelint.io/user-guide/configurati
1616

1717
```json
1818
{
19-
"extends": "stylelint-config-primer"
19+
"extends": "@primer/stylelint-config"
2020
}
2121
```
2222

2323
## Documentation
2424

2525
### Plugins
2626

27-
- [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-primer/blob/main/property-order.js).
27+
- [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).
2828
- [stylelint-scss](https://github.com/kristerkari/stylelint-scss): A collection of SCSS specific linting rules for stylelint
2929
- [scss/selector-no-redundant-nesting-selector](https://github.com/kristerkari/stylelint-scss/blob/master/src/rules/selector-no-redundant-nesting-selector/README.md): Disallow redundant nesting selectors (`&`).
3030
- [primer/no-override](./plugins/#primerno-override): Prohibits custom styles that target Primer CSS selectors.

__tests__/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const SAFE_SCSS_EXAMPLE = `
44
.Component { color: $gray-500; }
55
`
66

7-
describe('stylelint-config-primer', () => {
7+
describe('stylelint-config', () => {
88
it('stylelint runs with our config', () => {
99
return lint('.bold { font-weight: bold; }').then(data => {
1010
expect(data).not.toHaveErrored()

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "stylelint-config-primer",
2+
"name": "@primer/stylelint-config",
33
"version": "11.1.1",
44
"description": "Sharable stylelint config used by GitHub's CSS",
55
"homepage": "http://primer.style/css/tools/linting",
66
"author": "GitHub, Inc.",
77
"license": "MIT",
88
"main": "index.js",
9-
"repository": "primer/stylelint-config-primer",
9+
"repository": "primer/stylelint-config",
1010
"keywords": [
1111
"github",
1212
"primer",

plugins/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ These were intended for use with [Primer CSS] and GitHub projects, but you may f
2424

2525
## Usage
2626

27-
If you're using or extending `stylelint-config-primer` already, then you're using all of these plugins by default. See [`index.js`](../index.js) for the config defaults.
27+
If you're using or extending `@primer/stylelint-config` already, then you're using all of these plugins by default. See [`index.js`](../index.js) for the config defaults.
2828

29-
If you're _not_ using or extending `stylelint-config-primer`, you can still reference the plugins by referencing their module paths like so:
29+
If you're _not_ using or extending `@primer/stylelint-config`, you can still reference the plugins by referencing their module paths like so:
3030

3131
```js
3232
// stylelint.config.js
3333
module.exports = {
34-
plugins: ['stylelint-config-primer/plugins/no-override', 'stylelint-config-primer/plugins/no-unused-vars']
34+
plugins: ['@primer/stylelint-config/plugins/no-override', '@primer/stylelint-config/plugins/no-unused-vars']
3535
}
3636
```
3737

@@ -318,7 +318,7 @@ All variable rules respect the following rule options, as in:
318318
```js
319319
// stylelint.config.js
320320
module.exports = {
321-
extends: 'stylelint-config-primer',
321+
extends: '@primer/stylelint-config',
322322
rules: {
323323
'primer/colors': [true /* options here */]
324324
/*

0 commit comments

Comments
 (0)