Skip to content

Commit

Permalink
Remove plugins that are not useful anymore (#401)
Browse files Browse the repository at this point in the history
* Remove new-color-vars-have-fallbacks

* Remove no-deprecated-colors

* Remove primer/no-override

* Remove primer/no-scale-colors

* Remove primer/no-unused-vars

* Remove primer/no-undefined-vars and replace with stylelint-value-no-unknown-custom-properties

* Remove unused dependencies

* Create thick-lions-call.md

* Fix the file urls

* Update thick-lions-call.md
  • Loading branch information
jonrohan committed Apr 18, 2024
1 parent 75f8ab0 commit 0a7bc7e
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 1,243 deletions.
12 changes: 12 additions & 0 deletions .changeset/thick-lions-call.md
@@ -0,0 +1,12 @@
---
"@primer/stylelint-config": major
---

**BREAKING CHANGE:** Removing plugins from the config.

* primer/new-color-vars-have-fallback
* primer/no-deprecated-colors
* primer/no-override
* primer/no-scale-colors
* primer/no-undefined-vars
* primer/no-unused-vars
4 changes: 0 additions & 4 deletions README.md
Expand Up @@ -30,10 +30,6 @@ Primer Stylelint Config extends the [stylelint-config-standard](https://github.c
- [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).
- [stylelint-scss](https://github.com/kristerkari/stylelint-scss): A collection of SCSS specific linting rules for stylelint
- [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 (`&`).
- [primer/no-override](./plugins/#primerno-override): Prohibits custom styles that target Primer CSS selectors.
- [primer/no-unused-vars](./plugins/#primerno-unused-vars): Warns about SCSS variables that are declared by not used in your local files.
- [primer/no-undefined-vars](./plugins/#primerno-undefined-vars): Prohibits usage of undefined CSS variables.
- [primer/no-scale-colors](./plugins/#primerno-scale-colors): Prohibits the use of [non-functional scale CSS variables](https://primer.style/css/support/color-system#color-palette)
- [primer/colors](./plugins/#primercolors): Enforces the use of certain color variables.
- [primer/spacing](./plugins/#primerspacing): Enforces the use of spacing variables for margin and padding.
- [primer/typography](./plugins/#primertypography): Enforces the use of typography variables for certain CSS properties.
Expand Down
13 changes: 7 additions & 6 deletions __tests__/__fixtures__/good/example.module.css
Expand Up @@ -3,9 +3,11 @@
overflow: hidden;
}

.gradient {
:root {
--offset: -500px;
}

.gradient {
position: absolute;
top: 0;
/* stylelint-disable-next-line primer/responsive-widths */
Expand All @@ -18,7 +20,6 @@
}

.gradient-left {
/* stylelint-disable primer/no-undefined-vars */
top: var(--offset);
left: var(--offset);
/* stylelint-disable-next-line primer/colors */
Expand Down Expand Up @@ -79,20 +80,20 @@
}

.marketplace-item {
box-shadow: var(--shadow-resting-small, var(--color-shadow-small));
box-shadow: var(--shadow-resting-small);
}

.marketplace-item:hover,
.marketplace-item:focus-within {
background-color: var(--bgColor-muted, var(--color-canvas-subtle));
background-color: var(--bgColor-muted);
}

.marketplace-item:focus-within {
outline: 2px solid var(--fgColor-accent, var(--color-accent-fg));
outline: 2px solid var(--fgColor-accent);
}

.marketplace-item-link {
color: var(--fgColor-default, var(--color-fg-default));
color: var(--fgColor-default);
}

.marketplace-item-link:hover {
Expand Down
24 changes: 0 additions & 24 deletions __tests__/new-color-vars-have-fallback.js

This file was deleted.

180 changes: 0 additions & 180 deletions __tests__/no-deprecated-colors.js

This file was deleted.

114 changes: 0 additions & 114 deletions __tests__/no-override.js

This file was deleted.

0 comments on commit 0a7bc7e

Please sign in to comment.