Skip to content

Commit

Permalink
Remove all pattern rules set by stylelint-standard
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceninja committed Nov 18, 2021
1 parent 5c10e16 commit 2ae6d12
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 5.0.1 - 2021-11-17

- Unset all `pattern` rules that `stylelint-standard` set to kebab.
This conflicts with SUIT naming rules.

# 5.0.0 - 2021-11-17

- Major version bump due to dependencies
Expand Down
4 changes: 3 additions & 1 deletion __tests__/standard-scss/invalid.scss
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
$FOO: 1;
a {
@include something();
}
10 changes: 6 additions & 4 deletions __tests__/standard-scss/standard-scss.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ describe('flags warnings with invalid scss', () => {

it('correct warning text', () => {
return result.then((data) =>
expect(data.results[0].warnings[0].text).toBe('Expected variable to be kebab-case'),
expect(data.results[0].warnings[0].text).toBe(
'Unexpected parentheses in argumentless mixin "something" call (scss/at-mixin-argumentless-call-parentheses)',
),
);
});

it('correct rule flagged', () => {
return result.then((data) =>
expect(data.results[0].warnings[0].rule).toBe('scss/dollar-variable-pattern'),
expect(data.results[0].warnings[0].rule).toBe('scss/at-mixin-argumentless-call-parentheses'),
);
});

Expand All @@ -61,10 +63,10 @@ describe('flags warnings with invalid scss', () => {
});

it('correct line number', () => {
return result.then((data) => expect(data.results[0].warnings[0].line).toBe(1));
return result.then((data) => expect(data.results[0].warnings[0].line).toBe(2));
});

it('correct column number', () => {
return result.then((data) => expect(data.results[0].warnings[0].column).toBe(1));
return result.then((data) => expect(data.results[0].warnings[0].column).toBe(3));
});
});
15 changes: 12 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,19 @@ module.exports = {
ignoreAtRules: ['if', 'else'],
},
],
// this is being set in stylelint-standard, but we don't want it
'declaration-empty-line-before': null,
// our rules from here on
// these are being set in stylelint-standard, but we don't want them
'alpha-value-notation': null, // not ready for this syntax yet
'custom-media-pattern': null,
'custom-property-pattern': null,
'declaration-empty-line-before': null, // false errors after SCSS comments
'keyframes-name-pattern': null,
'scss/at-function-pattern': null,
'scss/at-mixin-pattern': null,
'scss/dollar-variable-pattern': null,
'scss/percent-placeholder-pattern': null,
'selector-class-pattern': null,
'selector-id-pattern': null,
// our rules from here on
'at-rule-disallowed-list': [
['extend', 'import'],
{
Expand Down

0 comments on commit 2ae6d12

Please sign in to comment.