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

Delete stylelint-selector-no-utility #41

Merged
merged 4 commits into from
Sep 9, 2019
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Within your [stylelint config object](http://stylelint.io/user-guide/configurati

* [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 (`&`).
* [stylelint-selector-no-utility](https://github.com/primer/stylelint-selector-no-utility): Stylelint rule that doesn't allow the styling of utility classes in CSS
* [primer/no-override](plugins/no-override.js): Prohibits custom styles that target Primer CSS selectors.

### Configured lints

Expand Down
23 changes: 1 addition & 22 deletions __tests__/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {lint, extendDefaultConfig} = require('./utils')
const {lint} = require('./utils')

const SAFE_SCSS_EXAMPLE = `
.Component { color: $gray-500; }
Expand Down Expand Up @@ -47,25 +47,4 @@ describe('stylelint-config-primer', () => {
expect(data).toHaveDeprecationsLength(0)
})
})

it('warns about the planned deprecation of primer/selector-no-utility', () => {
return lint(
SAFE_SCSS_EXAMPLE,
extendDefaultConfig({
rules: {
'primer/selector-no-utility': true
}
})
).then(data => {
expect(data).not.toHaveErrored()
expect(data).not.toHaveResultsLength(0)
expect(data).toHaveDeprecationsLength(1)
expect(data.results[0].deprecations).toEqual([
{
text: `'primer/selector-no-utility' has been deprecated and will be removed in [email protected]. Please update your rules to use 'primer/no-override'.`,
reference: 'https://github.com/primer/stylelint-config-primer#deprecations'
}
])
})
})
})
8 changes: 1 addition & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ const browsers = require('./browsers')
const propertyOrder = require('./property-order')

module.exports = {
plugins: [
'stylelint-no-unsupported-browser-features',
'stylelint-order',
'stylelint-scss',
'./plugins/no-override',
'./plugins/selector-no-utility'
],
plugins: ['stylelint-no-unsupported-browser-features', 'stylelint-order', 'stylelint-scss', './plugins/no-override'],
rules: {
'at-rule-blacklist': ['extend'],
'at-rule-name-case': 'lower',
Expand Down
Loading