trailsjs/eslint-config-trails

allow different rules to be used for files inside of test/ vs. elsewhere

Closed this issue · 3 comments

I want to be able to console.log inside of test files, for example.

ESlint should already allow the developer to override the global .eslintrc per directory. The behavior is described in their docs. Are you running into an edge case?

Yea it should work, it'd be nice if this were just done by default. e.g. in the generator. So this repo should have some separate rules for testing, and then the generator updated to put the eslintrc file in test/

Cool. We're doing something pretty similar with React-specific rules already. In the generator's test folder, make an .eslintrc containing

{
  "extends": "trails/test"
}

and I'll do the honors on this side.