Open tony19 opened 5 years ago
Workaround: Move the literal field to be first in the object, which somehow allows the linter to format the object correctly (in addition to ignoring nested arrays/objects):
const x = {
b: 1, 👈
a: [],
c: {},
d: 2
}
A similar issue exists in https://github.com/eslint/eslint/issues/11445 with two differences:
Thank you for the report.
Our indent rule aligns other properties to the same column of the first property. In your case, the first property is ignored by your configuration, so other properties are aligned to the first property, then those are ignored as well.
Tell us about your environment
Please show your full configuration:
What did you do?
default
project withvue-cli
.package.json
.src/App.vue
, add variable of object containing nested arrays/objects and literals.yarn lint
.See reproduction repo
src/App.vue:
What did you expect to happen?
What actually happened?