-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`stylelint` put out [`16.0.0`](https://github.com/stylelint/stylelint/releases/tag/16.0.0) with some pretty significant changes this morning, including migrating to `ESM` like the rest of node world. This doesn't present a problem, but several other breaking changes do: - json and any diagnostic output now goes to stderr - Simplified output that changes the base diagnostic set - Our existing tests were actually broken. Rather than a eslint-like SYSTEM-wide install, this should use `extra_packages`. The dependency network is a bit broken, so I manually specify the config package version in these tests. As soon as this lands I will put out a release.
- Loading branch information
1 parent
d884127
commit 6c4239b
Showing
4 changed files
with
163 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
linters/stylelint/test_data/stylelint_v16.0.1_basic.check.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Testing linter stylelint test basic 1`] = ` | ||
{ | ||
"issues": [ | ||
{ | ||
"code": "rule-empty-line-before", | ||
"column": "1", | ||
"file": "test_data/basic.in.css", | ||
"level": "LEVEL_HIGH", | ||
"line": "10", | ||
"linter": "stylelint", | ||
"message": "Expected empty line before rule", | ||
"targetType": "css", | ||
}, | ||
{ | ||
"code": "rule-empty-line-before", | ||
"column": "1", | ||
"file": "test_data/basic.in.css", | ||
"level": "LEVEL_HIGH", | ||
"line": "13", | ||
"linter": "stylelint", | ||
"message": "Expected empty line before rule", | ||
"targetType": "css", | ||
}, | ||
{ | ||
"code": "rule-empty-line-before", | ||
"column": "1", | ||
"file": "test_data/basic.in.css", | ||
"level": "LEVEL_HIGH", | ||
"line": "20", | ||
"linter": "stylelint", | ||
"message": "Expected empty line before rule", | ||
"targetType": "css", | ||
}, | ||
{ | ||
"code": "rule-empty-line-before", | ||
"column": "1", | ||
"file": "test_data/basic.in.css", | ||
"level": "LEVEL_HIGH", | ||
"line": "23", | ||
"linter": "stylelint", | ||
"message": "Expected empty line before rule", | ||
"targetType": "css", | ||
}, | ||
{ | ||
"code": "rule-empty-line-before", | ||
"column": "1", | ||
"file": "test_data/basic.in.css", | ||
"level": "LEVEL_HIGH", | ||
"line": "27", | ||
"linter": "stylelint", | ||
"message": "Expected empty line before rule", | ||
"targetType": "css", | ||
}, | ||
{ | ||
"code": "rule-empty-line-before", | ||
"column": "1", | ||
"file": "test_data/basic.in.css", | ||
"level": "LEVEL_HIGH", | ||
"line": "7", | ||
"linter": "stylelint", | ||
"message": "Expected empty line before rule", | ||
"targetType": "css", | ||
}, | ||
], | ||
"lintActions": [ | ||
{ | ||
"command": "fix", | ||
"fileGroupName": "css", | ||
"linter": "stylelint", | ||
"paths": [ | ||
"test_data/basic.in.css", | ||
], | ||
"verb": "TRUNK_VERB_FMT", | ||
}, | ||
{ | ||
"command": "lint", | ||
"fileGroupName": "css", | ||
"linter": "stylelint", | ||
"paths": [ | ||
"test_data/basic.in.css", | ||
], | ||
"verb": "TRUNK_VERB_CHECK", | ||
}, | ||
], | ||
"taskFailures": [], | ||
"unformattedFiles": [ | ||
{ | ||
"column": "1", | ||
"file": "test_data/basic.in.css", | ||
"issueClass": "ISSUE_CLASS_UNFORMATTED", | ||
"level": "LEVEL_HIGH", | ||
"line": "1", | ||
"linter": "stylelint", | ||
"message": "Incorrect formatting, autoformat by running 'trunk fmt'", | ||
}, | ||
], | ||
} | ||
`; |
40 changes: 40 additions & 0 deletions
40
linters/stylelint/test_data/stylelint_v16.0.1_basic.fmt.shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Testing formatter stylelint test basic 1`] = ` | ||
"body { | ||
margin: 5ex 10ex; | ||
max-width: 80ex; | ||
line-height: 1.5; | ||
font-family: sans-serif; | ||
} | ||
|
||
h1, h2, h3 { | ||
font-weight: normal; | ||
} | ||
|
||
pre, code { | ||
font-family: x, monospace; | ||
} | ||
|
||
pre { | ||
padding: 1ex; | ||
background: #eee; | ||
border: solid 1px #ddd; | ||
min-width: 0; | ||
font-size: 90%; | ||
} | ||
|
||
code { | ||
color: #007; | ||
} | ||
|
||
div.chapter { | ||
margin-top: 4em; | ||
border-top: solid 2px black; | ||
} | ||
|
||
p { | ||
margin-top: 0; | ||
} | ||
" | ||
`; |