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

ESLint and cleanup #3256

Merged
merged 4 commits into from
Sep 6, 2016
Merged

ESLint and cleanup #3256

merged 4 commits into from
Sep 6, 2016

Conversation

simonbrunel
Copy link
Member

@simonbrunel simonbrunel commented Sep 3, 2016

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).

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`.
@simonbrunel
Copy link
Member Author

@etimberg @zachpanz88 :)

@panzarino
Copy link
Contributor

Looks good to me. I think that we should add even more style standards going forward to make sure everything has the same styling.

@simonbrunel
Copy link
Member Author

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);
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, sounds good

@etimberg
Copy link
Member

etimberg commented Sep 3, 2016

Added a few comments. Looks great @simonbrunel

@etimberg etimberg merged commit 7dcbde4 into chartjs:master Sep 6, 2016
@simonbrunel simonbrunel deleted the code-cleanup branch September 6, 2016 19:34
simonbrunel added a commit to simonbrunel/Chart.js that referenced this pull request Mar 25, 2017
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`.
simonbrunel added a commit that referenced this pull request Mar 25, 2017
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`.
ericnkatz pushed a commit to ericnkatz/Chart.js that referenced this pull request May 24, 2017
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`.
roicos pushed a commit to roicos/Chart.js that referenced this pull request Aug 21, 2017
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`.
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
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`.
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

Successfully merging this pull request may close these issues.

3 participants