Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration support #1

Open
zimme opened this issue Dec 7, 2017 · 4 comments
Open

Configuration support #1

zimme opened this issue Dec 7, 2017 · 4 comments

Comments

@zimme
Copy link
Member

zimme commented Dec 7, 2017

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.

npm i -D @linterjs/cli @linterjs/prettier @linterjs/eslint

In this case I would be required to have a .eslintrc file in my project, otherwise linter would fail because eslint actually expects a config file to be present, prettier would still run as it has defaults. However if you wanted to configure prettier you would do so with it's configuration files.

@zimme
Copy link
Member Author

zimme commented Dec 7, 2017

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.

@zimme
Copy link
Member Author

zimme commented Dec 7, 2017

Link to related issue: linterjs/core#1

@azz
Copy link
Member

azz commented Dec 7, 2017

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?

@zimme
Copy link
Member Author

zimme commented Dec 7, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants