Skip to content

Commit 2ae6d12

Browse files
committed
Remove all pattern rules set by stylelint-standard
1 parent 5c10e16 commit 2ae6d12

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 5.0.1 - 2021-11-17
2+
3+
- Unset all `pattern` rules that `stylelint-standard` set to kebab.
4+
This conflicts with SUIT naming rules.
5+
16
# 5.0.0 - 2021-11-17
27

38
- Major version bump due to dependencies

__tests__/standard-scss/invalid.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
$FOO: 1;
1+
a {
2+
@include something();
3+
}

__tests__/standard-scss/standard-scss.test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ describe('flags warnings with invalid scss', () => {
4646

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

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

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

6365
it('correct line number', () => {
64-
return result.then((data) => expect(data.results[0].warnings[0].line).toBe(1));
66+
return result.then((data) => expect(data.results[0].warnings[0].line).toBe(2));
6567
});
6668

6769
it('correct column number', () => {
68-
return result.then((data) => expect(data.results[0].warnings[0].column).toBe(1));
70+
return result.then((data) => expect(data.results[0].warnings[0].column).toBe(3));
6971
});
7072
});

index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,19 @@ module.exports = {
1111
ignoreAtRules: ['if', 'else'],
1212
},
1313
],
14-
// this is being set in stylelint-standard, but we don't want it
15-
'declaration-empty-line-before': null,
16-
// our rules from here on
14+
// these are being set in stylelint-standard, but we don't want them
1715
'alpha-value-notation': null, // not ready for this syntax yet
16+
'custom-media-pattern': null,
17+
'custom-property-pattern': null,
18+
'declaration-empty-line-before': null, // false errors after SCSS comments
19+
'keyframes-name-pattern': null,
20+
'scss/at-function-pattern': null,
21+
'scss/at-mixin-pattern': null,
22+
'scss/dollar-variable-pattern': null,
23+
'scss/percent-placeholder-pattern': null,
24+
'selector-class-pattern': null,
25+
'selector-id-pattern': null,
26+
// our rules from here on
1827
'at-rule-disallowed-list': [
1928
['extend', 'import'],
2029
{

0 commit comments

Comments
 (0)