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

[question] apply different configs to different files. #8356

Closed
aladdin-add opened this issue Mar 29, 2017 · 2 comments
Closed

[question] apply different configs to different files. #8356

aladdin-add opened this issue Mar 29, 2017 · 2 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion question This issue asks a question about ESLint

Comments

@aladdin-add
Copy link
Member

aladdin-add commented Mar 29, 2017

Sometimes we need apply different configs to different files. eg. in*.vue, *.jsx, we need some rules to check, while in *.md, we don't need, since it is just an example.

System.import('./app.js');

if in *.md, eslint may report some error(s) like System is not defined. But I expect not.

As far as I know, if all the markdown files are in one directory, I can create a .eslintrc to override. But if not,what should I do?

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Mar 29, 2017
@vitorbal
Copy link
Member

vitorbal commented Mar 29, 2017

@aladdin-add one option would be to run ESLint multiple times, with different configs for each filetype.

In the future, you will be able to configure ESLint to override configs based on glob patterns, but unfortunately that feature is not ready yet (#8298 #8081)

@vitorbal vitorbal added question This issue asks a question about ESLint and removed triage An ESLint team member will look at this issue soon labels Mar 29, 2017
@aladdin-add aladdin-add changed the title [question] apply different config to different files. [question] apply different configs to different files. Mar 29, 2017
@vitorbal
Copy link
Member

vitorbal commented Apr 1, 2017

Closing, as the issue seems to be resolved. Please reopen if there is more to discuss. Thanks!

@vitorbal vitorbal closed this as completed Apr 1, 2017
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion question This issue asks a question about ESLint
Projects
None yet
Development

No branches or pull requests

3 participants