Skip to content

Commit

Permalink
Merge pull request #41 from primer/delete-selector-no-utility
Browse files Browse the repository at this point in the history
Delete stylelint-selector-no-utility
  • Loading branch information
shawnbot committed Sep 9, 2019
2 parents 82df601 + 0bd9bb9 commit f7302ae
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 1,289 deletions.
2 changes: 1 addition & 1 deletion README.md
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
@@ -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 stylelint-config-primer@7.0.0. 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
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

0 comments on commit f7302ae

Please sign in to comment.