Skip to content

Commit 122eb0e

Browse files
authored
Removing the stylelint-todo custom plugin (#1618)
* Removing the stylelint-todo custom plugin * Revert change
1 parent 612841f commit 122eb0e

File tree

3 files changed

+1
-86
lines changed

3 files changed

+1
-86
lines changed

docs/content/getting-started/contributing.md

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -71,52 +71,6 @@ If you get to this step you've helped contribute to a style guide that many of y
7171
[Please open an issue](#step-1-open-an-issue) if we can improve these guidelines and make following this process any easier.
7272

7373

74-
## Removing styles and variables
75-
76-
Removing styles and SCSS variables can be scary. How do you know if the thing you're deleting (or just planning to delete) isn't used in other projects? [Semantic versioning] provides us with an answer: We **don't** know, but we can use "major" version increments (from, say, `13.4.0` to `14.0.0`) to signal that the release includes potentially breaking changes. The rule is simple:
77-
78-
**Whenever we delete a CSS selector or SCSS variable, we will increment to the next major version.**
79-
80-
When planning to delete a CSS selector or SCSS variable, you should:
81-
82-
1. Add a [TODO@version comment](#primer-csstodo) above the line in question:
83-
84-
```scss
85-
// [email protected]: delete $some-unused-var
86-
$some-unused-var: 15px !default;
87-
```
88-
89-
1. Add it to [deprecations.js]:
90-
91-
```js
92-
const versionDeprecations = {
93-
'15.0.0': [
94-
{
95-
variables: ['$some-unused-var'],
96-
message: '$some-unused-var is unused, and has been deprecated.'
97-
}
98-
]
99-
}
100-
```
101-
102-
We have several checks and tools in place to help us plan, track, and catch both expected and unexpected removals of both CSS selectors and SCSS variables:
103-
104-
### `deprecations.js`
105-
[This file][deprecations.js] is where we document all of our current and _planned_ CSS selector and SCSS variable deprecations (removals), and is used to generate [deprecation data](../tools/deprecations) for other tools.
106-
107-
### `primer-css/TODO`
108-
[This stylelint rule][script/stylelint-todo.js] looks for comments in the form:
109-
110-
```scss
111-
// TODO@<version>: <message>
112-
```
113-
114-
and generates an error for each one whose `<version>` is less than or equal to the current version (in `package.json`).
115-
116-
Where `<version>` is the future version you'd like to compare against. Assuming that the correctly formatted comments exist already, violations of this stylelint rule can be used to generate a checklist of lines to remove in a future release.
117-
118-
See [the deprecation data docs](../tools/deprecations) for more information.
119-
12074
## Documentation structure
12175

12276
- Our documentation site for Primer CSS is built using [Doctocat](https://primer.style/doctocat) and deployed with [Now](https://zeit.co/now). Our site is built from the `docs` folder and uses [MDX](https://mdxjs.com) to render markdown.
@@ -154,4 +108,3 @@ To understand what choice to make, you'll need to understand semver and know if
154108
[semantic versioning]: https://semver.org
155109
[script/test-deprecations.js]: https://github.com/primer/css/tree/main/script/test-deprecations.js
156110
[deprecations.js]: https://github.com/primer/css/tree/main/deprecations.js
157-
[script/stylelint-todo.js]: https://github.com/primer/css/tree/main/script/stylelint-todo.js

script/stylelint-todo.cjs

Lines changed: 0 additions & 37 deletions
This file was deleted.

stylelint.config.cjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const currentVersion = process.env.PRIMER_VERSION || require('./package.json').v
22

33
module.exports = {
44
extends: ['stylelint-config-primer'],
5-
plugins: ['stylelint-scss', './script/stylelint-todo.cjs'],
5+
plugins: ['stylelint-scss'],
66
syntax: 'scss',
77
ignoreFiles: ['src/fonts/**/*'],
88
rules: {
@@ -13,7 +13,6 @@ module.exports = {
1313
'primer/spacing': true,
1414
'primer/typography': true,
1515
'primer/box-shadow': true,
16-
'primer-css/TODO': [true, {currentVersion, severity: 'error'}],
1716
'primer/no-undefined-vars': [true, {files: 'node_modules/@primer/primitives/dist/scss/colors*/*.scss'}]
1817
}
1918
}

0 commit comments

Comments
 (0)