[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: build: Replace jshint and jscs with eslint
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/349355 ) Change subject: build: Replace jshint and jscs with eslint .. build: Replace jshint and jscs with eslint Bug: T118941 Change-Id: I4b73fb13f8f95f73714a6fc580e07ac320f937fc --- A .eslintrc.json D .jscsrc D .jshintignore D .jshintrc M Gruntfile.js D modules/ve-wikihiero/.jshintrc M modules/ve-wikihiero/ve.ce.MWHieroNode.js M modules/ve-wikihiero/ve.dm.MWHieroNode.js M modules/ve-wikihiero/ve.ui.MWHieroInspector.js M modules/ve-wikihiero/ve.ui.MWHieroInspectorTool.js M package.json 11 files changed, 24 insertions(+), 92 deletions(-) Approvals: jenkins-bot: Verified VolkerE: Looks good to me, approved diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..56fb9cb --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true, + "qunit": true + }, + "globals": { + "mw": false, + "OO": false, + "ve": false + }, + "rules": { + "dot-notation": [ "error", { "allowKeywords": true } ] + } +} diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 1959eea..000 --- a/.jscsrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "preset": "wikimedia", - - "jsDoc": { - "checkAnnotations": { - "preset": "jsduck5", - "extra": { - "this": true, - "source": true, - "see": true - } - }, - "checkTypes": "strictNativeCase", - "checkParamNames": true, - "checkRedundantAccess": true, - "checkRedundantReturns": true, - "requireNewlineAfterDescription": true, - "requireParamTypes": true, - "requireReturnTypes": true - } -} diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index ea26ebd..000 --- a/.jshintignore +++ /dev/null @@ -1,2 +0,0 @@ -# Tooling -node_modules/ diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 032d01b..000 --- a/.jshintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - // Enforcing - "bitwise": true, - "eqeqeq": true, - "freeze": true, - "latedef": true, - "noarg": true, - "nonew": true, - "undef": true, - "unused": true, - "strict": false, - "es3": true, - - // Environment - "browser": true, - "jquery": true, - - "globals": { - "mw": false - } -} diff --git a/Gruntfile.js b/Gruntfile.js index c9c273f..c6b7934 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,35 +1,28 @@ -/*jshint node:true */ +/* eslint-env node */ module.exports = function ( grunt ) { var conf = grunt.file.readJSON( 'extension.json' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); - grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-watch' ); - grunt.loadNpmTasks( 'grunt-jscs' ); + grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.initConfig( { - jshint: { - options: { - jshintrc: true - }, + eslint: { all: [ '*.js', 'modules/*.js', 'modules/ve-wikihiero/**/*.js' ] }, - jscs: { - src: '<%= jshint.all %>' - }, stylelint: { all: 'modules/**/*.css' }, watch: { files: [ - '.{jscsrc,jshintignore,jshintrc,csslintrc}', - '<%= jshint.all %>', + '.eslintrc.json', + '<%= eslint.all %>', '<%= stylelint.all %>' ], tasks: 'lint' @@ -43,7 +36,7 @@ } } ); - grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'stylelint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'test', 'lint' ); grunt.registerTask( 'default', 'test' ); }; diff --git a/modules/ve-wikihiero/.jshintrc b/modules/ve-wikihiero/.jshintrc deleted file mode 100644 index 0c2332e..000 --- a/modules/ve-wikihiero/.jshintrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - //
[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: build: Replace jshint and jscs with eslint
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/349355 ) Change subject: build: Replace jshint and jscs with eslint .. build: Replace jshint and jscs with eslint Bug: T118941 Change-Id: I4b73fb13f8f95f73714a6fc580e07ac320f937fc --- A .eslintrc.json D .jscsrc D .jshintignore D .jshintrc M Gruntfile.js D modules/ve-wikihiero/.jshintrc M modules/ve-wikihiero/ve.ce.MWHieroNode.js M modules/ve-wikihiero/ve.dm.MWHieroNode.js M modules/ve-wikihiero/ve.ui.MWHieroInspector.js M modules/ve-wikihiero/ve.ui.MWHieroInspectorTool.js M package.json 11 files changed, 24 insertions(+), 92 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero refs/changes/55/349355/1 diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..56fb9cb --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true, + "qunit": true + }, + "globals": { + "mw": false, + "OO": false, + "ve": false + }, + "rules": { + "dot-notation": [ "error", { "allowKeywords": true } ] + } +} diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 1959eea..000 --- a/.jscsrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "preset": "wikimedia", - - "jsDoc": { - "checkAnnotations": { - "preset": "jsduck5", - "extra": { - "this": true, - "source": true, - "see": true - } - }, - "checkTypes": "strictNativeCase", - "checkParamNames": true, - "checkRedundantAccess": true, - "checkRedundantReturns": true, - "requireNewlineAfterDescription": true, - "requireParamTypes": true, - "requireReturnTypes": true - } -} diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index ea26ebd..000 --- a/.jshintignore +++ /dev/null @@ -1,2 +0,0 @@ -# Tooling -node_modules/ diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 032d01b..000 --- a/.jshintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - // Enforcing - "bitwise": true, - "eqeqeq": true, - "freeze": true, - "latedef": true, - "noarg": true, - "nonew": true, - "undef": true, - "unused": true, - "strict": false, - "es3": true, - - // Environment - "browser": true, - "jquery": true, - - "globals": { - "mw": false - } -} diff --git a/Gruntfile.js b/Gruntfile.js index c9c273f..c6b7934 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,35 +1,28 @@ -/*jshint node:true */ +/* eslint-env node */ module.exports = function ( grunt ) { var conf = grunt.file.readJSON( 'extension.json' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); - grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-watch' ); - grunt.loadNpmTasks( 'grunt-jscs' ); + grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.initConfig( { - jshint: { - options: { - jshintrc: true - }, + eslint: { all: [ '*.js', 'modules/*.js', 'modules/ve-wikihiero/**/*.js' ] }, - jscs: { - src: '<%= jshint.all %>' - }, stylelint: { all: 'modules/**/*.css' }, watch: { files: [ - '.{jscsrc,jshintignore,jshintrc,csslintrc}', - '<%= jshint.all %>', + '.eslintrc.json', + '<%= eslint.all %>', '<%= stylelint.all %>' ], tasks: 'lint' @@ -43,7 +36,7 @@ } } ); - grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'stylelint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'test', 'lint' ); grunt.registerTask( 'default', 'test' ); }; diff --git a/modules/ve-wikihiero/.jshintrc b/modules/ve-wikihiero/.jshintrc deleted file mode 100644 index 0c2332e..000 --- a/modules/ve-wikihiero/.jshintrc +++ /dev/null @@ -1,25 +0,0