Auto-fix support for object-property-newline
See original GitHub issueWhat rule do you want to change?
object-property-newline
Does this change cause the rule to produce more or fewer warnings?
It will produce the same number of warnings.
How will the change be implemented? (New option, new default behavior, etc.)?
When the --fix flag is applied, code will be changed
Please provide some example code that this change will affect:
const w = {x,
y, z
}
As well as code without object shorthand.
const w = {x: x,
y: y, z: z
}
What does the rule currently do for this code?
Warns or fails depending on severity set.
What will the rule do after it’s changed?
Take the above
const w = {x,
y, z
}
and transform it into
const w = {
x,
y,
z
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Eslint-plugin-autofix - npm.io
Name 🛠 Description
array‑bracket‑spacing 🛠 enforce consistent spacing inside array brackets
array‑element‑newline 🛠 enforce line breaks after each array element
arrow‑body‑style 🛠 require braces around arrow...
Read more >object-property-newline - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint object-curly-newline conflicts prettier multi-line rationale
It allows configuring line breaks if there are line breaks inside properties, between properties and even least number of properties or even to ......
Read more >ESLint v2.11.0 released - ESLint中文文档
... b4cff9d Fix: Incorrect object-property-newline behavior (fixes #6207) ... c10c07f Fix: lost code in autofixing (refs #6233) (#6234) (Toru Nagashima) ...
Read more >eslint/eslint - Gitter
And in terms of prettier capabilities, ESLint doesn't accept autofixes that have potential of ... I expected something like: let is not supported...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it would be better if we just didn’t perform a fix in cases where there are comments between two properties.
@not-an-aardvark we got 3 thumbs up now, so marking this as accepted!