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

Some way to specify rules per file path pattern #2565

Closed
mprokopowicz opened this issue May 19, 2015 · 1 comment
Closed

Some way to specify rules per file path pattern #2565

mprokopowicz opened this issue May 19, 2015 · 1 comment
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion triage An ESLint team member will look at this issue soon

Comments

@mprokopowicz
Copy link

I've following project structure:

- root/
--- component/
------ component.js
------ component.test.js

component.js is some front-end script, component.test.js is a mocha test.
I need different globals in component and component.test and a few different rules (Like disabling no-unused-expressions in test, because of mochas expect(rejectedSpy).to.have.not.been.called;

For now, I end up with putting all this exceptions in comments at the beginning of test file:

/*eslint-env mocha */
/* eslint strict: [2, "global"], no-unused-expressions: [0]*/

but it would be great to have one place for this.

@lo1tuma
Copy link
Member

lo1tuma commented May 19, 2015

This is not supported yet, but was already mentioned in the ESLint 2.0 wishlist.

@lo1tuma lo1tuma added the triage An ESLint team member will look at this issue soon label May 19, 2015
@nzakas nzakas closed this as completed May 19, 2015
@CrabDude CrabDude mentioned this issue Aug 23, 2016
11 tasks
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 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 7, 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 triage An ESLint team member will look at this issue soon
Projects
None yet
Development

No branches or pull requests

3 participants