1.0.5 • Published 7 years ago
stylus-linter-pro v1.0.5
Stylus Linter by Edadeal
Install
npm i stylus-linter -DUse
npx stylus-linter ./src/file.stylOptions
Default
{
semicolons: ['never'],
colons: ['never'],
color: ['uppercase'],
leadingZero: ['always'],
useBasis: ['always']
}color
Use color in lowercase/uppercase and allow/deny use raw color not only in variable
"color": {
"conf": "uppercase",
"enabled": true,
"allowOnlyInVar": true
}colons
Allow/Deny use colons between rule: value
Deny colons
"colons": ["never"] Use colons always
"colons": ["always"] Switch off rule
"colons": false Show only warning
"colons": ["always", "warning"] semicolons
Allow/Deny use semicolons after rule: value
Deny semicolons
"semicolons": ["never"] Use semicolons always
"semicolons": ["always"] Switch off rule
"semicolons": false Show only warning
"semicolons": ["always", "warning"] sortOrder
Check order properties
In alphabetical order
"sortOrder": ["alphabetical"] In custom order
"sortOrder": {
"conf": "grouped",
"order": [
"absolute",
"position",
"width",
...
]
}Group order - every group should be separated with new line
"sortOrder": {
"conf": "grouped",
"startGroupChecking": 5,
"order": [
[
"absolute",
"position",
"top",
"right",
"bottom",
"left",
],
[
"width",
"height",
"max-height",
"min-height"
]
...
]
}prefixVarsWithDollar
Variables should/should't starting with dollar(another prefix)
Should starting
"prefixVarsWithDollar": ["always"]Should not starting
"prefixVarsWithDollar": ["never"]Another prefix
"prefixVarsWithDollar": {
"conf: "always",
"prefix": "@"
}Disclaimer
Some rules based on https://github.com/SimenB/stylint
License
MIT