-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
ESLint and cleanup #3256
ESLint and cleanup #3256
Conversation
Change the linter in gulp tasks to be consistent with Code Climate results which are based on ESLint using .eslintrc options. However, defaults Code Climate rules are too strict, so turn as warnings the 'complexity' and 'max-statements' rules (other errors has been fixed). Note that the Gulp task name has been changed for `gulp lint`.
indent: [error, tab] (http://eslint.org/docs/rules/indent)
curly: [error, all] (http://eslint.org/docs/rules/curly)
054904f
to
7c93255
Compare
Looks good to me. I think that we should add even more style standards going forward to make sure everything has the same styling. |
Agree, I enforced the recurring ones in submitted PR but if you think about some others? |
]; | ||
|
||
gulp.task('bower', bowerTask); | ||
gulp.task('build', buildTask); | ||
gulp.task('package', packageTask); | ||
gulp.task('coverage', coverageTask); | ||
gulp.task('watch', watchTask); | ||
gulp.task('jshint', jshintTask); | ||
gulp.task('test', ['jshint', 'validHTML', 'unittest']); | ||
gulp.task('lint', lintTask); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we were also changing the test tasks and gulp unittestWatch
was going way in favour of gulp test -watch
. Or will that be a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still unsure how to implemented it the best way, so will be another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, sounds good
Added a few comments. Looks great @simonbrunel |
Coverage data are now generated by running `gulp unittest` with the `--coverage` argument: unit tests are now executed a single time on Travis. The gulp `coverage` task has been removed and `karma.coverage.conf.ci.js` merged into `karma.conf.ci.js`. Update documentation with gulp commands (and remove them from `README.md`) and remove unused `config.jshintrc` (oversight from chartjs#3256). Delete `thankyou.md` which has been merged into `README.md`.
Coverage data are now generated by running `gulp unittest` with the `--coverage` argument: unit tests are then executed a single time on Travis. The gulp `coverage` task has been removed and `karma.coverage.conf.ci.js` merged into `karma.conf.ci.js`. Update documentation with gulp commands (and remove them from `README.md`) and remove unused `config.jshintrc` (oversight from #3256). Delete `thankyou.md` which has been merged into `README.md`.
Coverage data are now generated by running `gulp unittest` with the `--coverage` argument: unit tests are then executed a single time on Travis. The gulp `coverage` task has been removed and `karma.coverage.conf.ci.js` merged into `karma.conf.ci.js`. Update documentation with gulp commands (and remove them from `README.md`) and remove unused `config.jshintrc` (oversight from chartjs#3256). Delete `thankyou.md` which has been merged into `README.md`.
Coverage data are now generated by running `gulp unittest` with the `--coverage` argument: unit tests are then executed a single time on Travis. The gulp `coverage` task has been removed and `karma.coverage.conf.ci.js` merged into `karma.conf.ci.js`. Update documentation with gulp commands (and remove them from `README.md`) and remove unused `config.jshintrc` (oversight from chartjs#3256). Delete `thankyou.md` which has been merged into `README.md`.
ESLint and cleanup
Coverage data are now generated by running `gulp unittest` with the `--coverage` argument: unit tests are then executed a single time on Travis. The gulp `coverage` task has been removed and `karma.coverage.conf.ci.js` merged into `karma.conf.ci.js`. Update documentation with gulp commands (and remove them from `README.md`) and remove unused `config.jshintrc` (oversight from chartjs#3256). Delete `thankyou.md` which has been merged into `README.md`.
Remove unused npm packages, use ESLint instead of JSHint in Gulp to be consistent with Code Climate results and enforce indent and curly rules.
Many methods are too complex, it would require an important effort to rewrite them but I'm sure it will be only benefits since we will be able to refactor a lot. For now, I simply make these rules more permissive for the gulp lint task (not for Code Climate).