Skip to content

Commit

Permalink
Update to Stylelint 15
Browse files Browse the repository at this point in the history
  • Loading branch information
sholladay committed Oct 10, 2023
1 parent 6a7908f commit 583602c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fixture/good.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

div {
/* skippity to do da */
color : hsl(240, 100%, 50%);
color : hsl(240deg, 100%, 50%);
font-weight : 700;
top : 0;
}
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
'block-closing-brace-space-before' : 'always-single-line',
'block-no-empty' : true,
'block-opening-brace-space-after' : 'always-single-line',
'color-function-notation' : 'legacy',
'color-hex-case' : 'upper',
'comment-word-disallowed-list' : ['/^TODO:/i'],
'custom-property-empty-line-before' : 'never',
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
"index.js"
],
"peerDependencies": {
"stylelint": ">=12"
"stylelint": ">=15"
},
"dependencies": {
"stylelint-config-recommended": "^3.0.0",
"stylelint-config-xo": "^0.16.0",
"stylelint-order": "^3.1.1"
"stylelint-config-recommended": "^13.0.0",
"stylelint-config-xo": "^0.22.0",
"stylelint-order": "^6.0.3"
},
"devDependencies": {
"ava": "^2.4.0",
"eslint-config-tidy": "^0.10.0",
"stylelint": "^12.0.0",
"eslint-config-tidy": "^0.13.0",
"stylelint": "^15.0.0",
"xo": "^0.56.0"
},
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ test('bad stylesheet', async (t) => {
]);
});

test('word blacklist is case insensitive', async (t) => {
test('disallows todos regardless of case', async (t) => {
const lowerCase = await lintText('/* todo: */\n');
const upperCase = await lintText('/* TODO: */\n');
t.true(lowerCase.errored);
t.true(upperCase.errored);
t.deepEqual(getRules(lowerCase.results), ['comment-word-blacklist']);
t.deepEqual(getRules(upperCase.results), ['comment-word-blacklist']);
t.deepEqual(getRules(lowerCase.results), ['comment-word-disallowed-list']);
t.deepEqual(getRules(upperCase.results), ['comment-word-disallowed-list']);
});

test('allows multi-line comma separated selector list', async (t) => {
Expand Down

0 comments on commit 583602c

Please sign in to comment.