-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix at-rule-no-unknown
end positions
#655
Fix at-rule-no-unknown
end positions
#655
Conversation
This change also adds a test helper function to make testing multiline strings easier.
line: 1, | ||
column: 1, | ||
endLine: 1, | ||
endColumn: 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[note] It seems to me that one case change is enough to test end positions.
line: warning.line, | ||
column: warning.column | ||
start: { line: warning.line, column: warning.column }, | ||
end: { line: warning.endLine, column: warning.endColumn }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ybiquitous is this a backwards compatible change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I tried testing the minimum version of peerDependencies.stylelint
locally:
Lines 40 to 42 in efd565d
"peerDependencies": { | |
"stylelint": "^14.5.1" | |
}, |
$ npm i stylelint@14.5.1
...
$ npx jest at-rule-no-unknown --no-verbose
FAIL src/rules/at-rule-no-unknown/__tests__/index.js
● scss/at-rule-no-unknown › reject › [ true ] › '@funciton floo ($n) {}\n' › no description
expect(received).toMatchObject(expected)
- Expected - 2
+ Received + 0
Object {
"column": 1,
- "endColumn": 10,
- "endLine": 1,
"line": 1,
"text": "Unexpected unknown at-rule \"@funciton\" (scss/at-rule-no-unknown)",
}
at Object.<anonymous> (node_modules/jest-preset-stylelint/getTestRule.js:88:33)
It seems that the backward compatibility keeps. 👍🏼
If possible, I think it's better to update peerDependencies.stylelint
to ^14.7.0
, but not required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay.
Looks good 👍
Don't mind. Thanks for the merge! |
Part of #652
This change also adds a test helper function to make testing multiline strings easier.