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

Separate dev / production linting #73

Closed
glebec opened this issue Sep 13, 2016 · 0 comments
Closed

Separate dev / production linting #73

glebec opened this issue Sep 13, 2016 · 0 comments

Comments

@glebec
Copy link
Member

glebec commented Sep 13, 2016

Pursuant to a conversation between @joedotjs and myself, the no-debugger rule — currently set to level 2 (error) to prevent committing a debugger statement — causes the lint task to fail, in turn stopping the build.

A solution would be to separate dev linting from production linting. The former could have no-debugger set to level 1 (warning), letting students know it should be removed prior to commit; the latter could have no-debugger set to 2 (error), providing an early out for build.

To accomplish this, gulp-eslint can take an options object using the same CLI options as specified here. The configFile option will let us programmatically select which eslintrc to apply. Alternatively — and perhaps preferably? — the rules option can let us add production-specific rules to override the base config.

There may also be other alternatives; research accordingly.

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

1 participant