Open zimme opened 6 years ago
I hope this will make the implementation of the adapters easier and once the concept is proven and we kill it on twitter and trending on GitHub, we can start discussing configuration options.
Link to related issue: linterjs/core#1
For the linting part of this, the order in which the linters run is not important.
It is very important which order the linters are ran. If prettier
is run before eslint
then the ESLint rules will take precedence. If Prettier is ran last the ESLint rules will be overwritten. The latter is currently achieved with eslint-config-prettier
and eslint-plugin-prettier
.
For formatting the code I'm thinking we should always run prettier first, if it's registered.
How do you make that determination?
It is very important which order the linters are ran. If prettier is run before eslint then the ESLint rules will take precedence. If Prettier is ran last the ESLint rules will be overwritten. The latter is currently achieved with eslint-config-prettier and eslint-plugin-prettier.
When it comes to showing linting errors, I'm thinking we just give the same filePath
and text
to all linters and give back and array of output to the cli which it displays grouped by file. This way we should be able to show all errors for all linters for each file, right?
How do you make that determination?
prettier
> all other linters 😄
No but on a serious note, how about we start there and add support for specific ordering later if there's a reason to do so?
My initial thinking on this is that we won't have any configuration for the cli, but fully depend on the respective linter's config files.
In this case I would be required to have a
.eslintrc
file in my project, otherwiselinter
would fail becauseeslint
actually expects a config file to be present,prettier
would still run as it has defaults. However if you wanted to configureprettier
you would do so with it's configuration files.