eslint-config-standard icon indicating copy to clipboard operation
eslint-config-standard copied to clipboard

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

Open voxpelli opened this issue 4 years ago • 2 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: https://github.com/standard/standard-engine/pull/270#discussion_r720843538

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.

voxpelli avatar Oct 14 '21 20:10 voxpelli

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.

99linesofcode avatar Jul 07 '22 16:07 99linesofcode

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.

99linesofcode avatar Jul 08 '22 00:07 99linesofcode