-
Notifications
You must be signed in to change notification settings - Fork 78
Apply Stylint to the codebase #681
Conversation
stylelintAuthor: Unknown Description: A mighty, modern CSS linter. Homepage: https://stylelint.io
# stylelint
|
Created | over 1 year ago |
Last Updated | 1 day ago |
License | MIT |
Maintainers | 3 |
Releases | 23 |
Direct Dependencies | stylelint-config-recommended |
Keywords | stylelint, stylelint-config and standard |
yarn why stylelint-config-standard
output
Has been hoisted to "stylelint-config-standard"
This module exists because it's specified in "devDependencies".
Disk size without dependencies: "48kB"
Disk size with unique dependencies: "48kB"
Disk size with transitive dependencies: "48kB"
Number of shared dependencies: 0
Generated by 🚫 dangerJS
Nice! I had stylelint setup in a branch as well but I couldn't figure out the auto-fix part. But yours is more useful because we get error highlighting in the editor. Let's merge once it's green |
Great - these fails are legit |
Noice 🌟 |
"extends": "stylelint-config-standard", | ||
"syntax": "scss", | ||
"rules": { | ||
"property-no-unknown": [true, { "ignoreProperties": ["resize-mode"] }], |
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.
I can't add comments in this file, so these are RN specific keys
"rules": { | ||
"property-no-unknown": [true, { "ignoreProperties": ["resize-mode"] }], | ||
"block-opening-brace-space-after": null, | ||
"block-closing-brace-space-before": null, |
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.
These are because prettier will truncate single lined CSS elements into a single LOC
"property-no-unknown": [true, { "ignoreProperties": ["resize-mode"] }], | ||
"block-opening-brace-space-after": null, | ||
"block-closing-brace-space-before": null, | ||
"declaration-block-no-redundant-longhand-properties": null |
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.
RN supports different rules for CSS occasionally, following this linter will get unexpected fails
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.
The rules are about things like margin: 20px 10px 30px
which corresponds to 20px 10px 30px 10px
in browsers, but not in RN
OK, this is good to go |
Currently just gives us inline warnings. All auto-fixing tools aren't quite there yet, so I've not added them, apart from recommending the extension.
WIP because it still fails, due to prettier cropping template strings into a single line occasionally and stylinbt doesn't like that.
Skip new tests