43081j / eslint-plugin-lit

lit-html support for ESLint
116 stars 21 forks source link

New rule: no-multiline-expressions #138

Closed 43081j closed 1 year ago

43081j commented 1 year ago

Not sure of the best name for this but some of us prefer that complex expressions are moved out into a variable rather than being inlined.

In that case, this would be incorrect:

html`
  ${xyz
    .foo()
    .bar()}
`;

of course this shouldn't be added to the recommended config since it is very opinionated.

cc @stramel for opinions maybe

43081j commented 1 year ago

this doesn't really belong in a lit-specific plugin im suspecting.

i have no clue where it does belong though 🙈

43081j commented 1 year ago

i'm gonna close this as i don't believe it belongs in a lit specific plugin after having spent some time thinking about it.