Rule for semicolon style

265 views
Skip to first unread message

Andrew Pennebaker

unread,
Apr 25, 2020, 5:29:42 PM4/25/20
to EditorConfig
Some languages like JavaScript have optional semicolons, which presents the opportunity for flame wars and merge conflict hell. Can we get a rule for specifying one's preferred semicolon style?

Values:

* none / <unconfigured> / don't care / ignore
* require trailing semicolons from statements
* require stripping trailing semicolons from statements

Of course, this rule may be more difficult to implement than some other rules, and only makes sense for certain kinds of ASTs. But we could get a head start declaring the rule, and let plugins do their thing over time.

Caleb Maclennan

unread,
Apr 26, 2020, 3:59:54 AM4/26/20
to editor...@googlegroups.com
I would support this. Even if not all editors could support it some
could and it's worth defining on a project level basis. EditorConfig
is the natural place to do that.

Note many linters already support this rule, and some editors surface
warnings from such linters, but I think it still makes sense to have
an editor agnostic spec for this.
> --
> You received this message because you are subscribed to the Google Groups "EditorConfig" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to editorconfig...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/editorconfig/0eaaeac6-ae95-4e96-b19a-56c2415f4991%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages