Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove plugins that are not useful anymore #401

Merged
merged 10 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/thick-lions-call.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.

Loading
Loading