-
Notifications
You must be signed in to change notification settings - Fork 326
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
chore: improve documentation for lint rules #961
Conversation
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
packages/eslint-plugin/README.md
Outdated
```js | ||
{ | ||
allowImportant: false, // Whether `!important` is allowed | ||
preferInline: false // Whether inline variants are preferred over directional |
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.
What does this mean?
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.
preferInline
expands shorthands to standard logical equivalents when set to true, otherwise uses directional expansion (default).
ie.
//prefer-inline: true
margin: 10 15 20 25,
marginTop: 10px;
marginRight: 15px;
marginBottom: 20px;
marginLeft: 25px;
//prefer-inline: false
margin: 10 15 20 25,
marginTop: 10px;
marginInlineEnd: 15px;
marginBottom: 20px;
marginInlineStart 25px;
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 see. Not the best name. The comment should probably say something like "Whether the expansion uses logical direction properties instead of physical"
Context
From discussions with ESLint oncall StyleX lint rules often provide lots of confusion, particularly around logical -> standard properties. We've previously added autofixes, but updating rules documentation here and internally to reduce confusion
Pre-flight checklist
Contribution Guidelines