Replies: 4 comments
-
it seems the rule
u can remove |
Beta Was this translation helpful? Give feedback.
-
here is the doc |
Beta Was this translation helpful? Give feedback.
-
Thanks @ziveen , I was wondering if there's a way to always break object properties onto new lines rather than having to do it manually to enforce a particular convention. |
Beta Was this translation helpful? Give feedback.
-
Thank you for submitting the issue! However, please also note that this is only a shared config where we can only make sure the default and recommended configs are working fine. We don't have the bandwidth to deal with custom configuration or rules conflicts. If you believe it's a bug in the rules, please create an issue to upstream plugins instead. Thus, I am converting this to a discussion for now. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Object properties should break onto new lines and should be indented correctly.
When setting
'style/object-property-newline': ['error', { allowAllPropertiesOnSameLine: false }]
, indentation breaks and code is re-formatted differently every time you hit save.Stackblitz enforces their own linting so the reproduction isn't much use but it does contain the config I'm using. I have tried removing all the rules I've set up, but the default config seems to have set object properties to multiline.
What is the correct way to enforce object properties with this config?
Having huge run-on object declarations like this:
tween.value = gsap.timeline({ paused: true, onComplete: () => { isComplete.value = true } }).from(split.value.lines, { duration: 1, y: '100%', x: 10, autoAlpha: 0, scale: 0.99, stagger: 0.07, ease: 'power2.inOut' })
is not readable. I would like to be able break down lines like that automatically using something like the object-property-newline rule.Reproduction
https://stackblitz.com/edit/github-lzpjei?file=.vscode%2Fsettings.json,app.vue,eslint.config.js
System Info
Used Package Manager
npm
Validations
Beta Was this translation helpful? Give feedback.
All reactions