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
Support end positions for warnings #652
Comments
For example, we can fix diff --git a/src/rules/at-rule-no-unknown/index.js b/src/rules/at-rule-no-unknown/index.js
index ef0634c..58801ac 100644
--- a/src/rules/at-rule-no-unknown/index.js
+++ b/src/rules/at-rule-no-unknown/index.js
@@ -83,8 +83,8 @@ export default function rule(primaryOption, secondaryOptions) {
ruleName,
result,
node: warning.node,
- line: warning.line,
- column: warning.column
+ start: { line: warning.line, column: warning.column },
+ end: { line: warning.endLine, column: warning.endColumn },
});
}
} Then, the output is improved: |
Thanks! This would definitely be a good improvement! :) |
I've made one PR #655 to make subsequent PRs easier. |
@ybiquitous Thanks a ton for the PRs. It really is a lot of work for you to migrate the rules :) |
Yeah, I've done more than half of the rules for now. I'll complete this issue within a few weeks. 👌🏼 |
I've created Pull Requests for all the rules! See the updated tasklist in #652 (comment). |
Thanks again! All merged now. :) |
Thanks for merging all! I'm closing this issue. |
Stylelint 14.7.0 has supported end positions for warnings, and the official VSCode extension prepares the end position support.
So, I suggest
stylelint-scss
also supports end positions.Currently,
stylelint-scss
warns for the whole node, but it seems not good DX:Reproduction Details
package.json
:.stylelintrc.js
:a.scss
:This will change many files (maybe all rules), but I can help from my experience in the stylelint/stylelint repo.
The text was updated successfully, but these errors were encountered: