NullVoxPopuli / eslint-plugin-decorator-position

ESLint plugin for enforcing decorator position

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename onDifferentLines and onSameLine to above and beside

Exelord opened this issue · comments

What do you think about renaming it to onNewLines?

onDifferentLines: ['@dependentKeyCompat', '@computed', '@action'],

Any particular reason? What are the semantic differences?

Its about the point of view.
If you look from a decorator perspective the code block is on the same line or on a new line.
From a code block perspective, it is on same line or as it is currently a different line.

So, its whether the positioning of code that relates to decorator or decorator to code :)

Personally I prefer to position code that relates to a decorator which is the decorator perspective.

Hmm. To counter, decorators are augmentations of a property or method or whatever are not the main event. Only an annotation, yeah? so the perspective then falls to the thing being decorated. Maybe the following options?: 'inline' and 'above'?

Boom! Yeah, that describes it best! differentLine is not so specific about the location. inline and above are explicit. This format also is followed in other official eslint rules, eg: https://eslint.org/docs/rules/line-comment-position#position

Nice. :)

Cool. I'm on board with this. Will cause a very fast v2. Lol

Actually when looking at other eslint rules it looks like the standard is beside and above

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀