standard / eslint-config-standard

ESLint Config for JavaScript Standard Style

Home Page:https://standardjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate if `eslint-plugin-editorconfig` can be added somehow

voxpelli opened this issue · comments

What version of this package are you using?

16.0.x

What problem do you want to solve?

.editorconfig is a popular cross-editor way of specifying the preferred basic formatting of an editor. It could be nice to support that one if such a one exists in the project, to ensure it doesn't contradict standard and to get some possibly leaner editor support for those basic things.

It would have to fall back to current setup though when no .editorconfig is found.

Idea came from here: standard/standard-engine#270 (comment)

What do you think is the correct solution to this problem?

Looks like https://github.com/phanect/eslint-plugin-editorconfig could possibly do that.

Are you willing to submit a pull request to implement this change?

Yes!


Could help solving eg. #182 as well, if a projects .editorconfig already bans such lines.

Seems like a no brainer to me but perhaps there are some downstream consequences to consider.

I'd like to see this get added in. Makes a lot of sense to configure ESLint in such a way that it stays out of people's way when combined with tooling like this.

I've been playing with this for a bit and found that, at least for vscode, editorconfig does not really conflict with eslint or typescript-eslint. I found that omitting any of the rules that might conflict with editorconfig and leaving those to editorconfig itself seems to work just fine.

In fact, in the case of typescript-eslint configuring indent inside your eslint config is problematic due to the way they have implemented the rule. As can be read in this Github issue.

Maybe there isn't really any point to adding this in if editorconfig takes precedence over eslint in other* integrated development environments.