[MediaWiki-commits] [Gerrit] mediawiki...PronunciationRecording[master]: build: Replace jshint/jscs with eslint and csslint with styl...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/370118 ) Change subject: build: Replace jshint/jscs with eslint and csslint with stylelint .. build: Replace jshint/jscs with eslint and csslint with stylelint Also upgrade banana and jsonlint to latest. Change-Id: Ief51508b119300abc64a42260ccb72505e4b52dd --- D .csslintrc A .eslintrc.json D .jscsrc D .jshintignore D .jshintrc A .stylelintrc M Gruntfile.js M package.json M resources/ext.pronunciationRecording.pronunciationRecorder.js M resources/ext.pronunciationRecording.specialPage.js 10 files changed, 63 insertions(+), 90 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.csslintrc b/.csslintrc deleted file mode 100644 index e777c7f..000 --- a/.csslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "adjoining-classes": false, - "box-model": false, - "box-sizing": false, - "fallback-colors": false, - "important": false, - "outline-none": false, - "qualified-headings": false, - "universal-selector": false, - "unqualified-attributes": false -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..b8371ee --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,13 @@ +{ + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true, + "qunit": true + }, + "globals": { + "mediaWiki": false, + "Recorder": false + }, + "rules": {} +} diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 9d22e3f..000 --- a/.jscsrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "preset": "wikimedia" -} diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index a1581ce..000 --- a/.jshintignore +++ /dev/null @@ -1,2 +0,0 @@ -resources/mediawiki.libs.recorderjs -node_modules diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index b44b4e7..000 --- a/.jshintrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - // Enforcing - "bitwise": true, - "eqeqeq": true, - "freeze": true, - "latedef": true, - "noarg": true, - "nonew": true, - "undef": true, - "unused": true, - "strict": false, - - // Relaxing - "es5": false, - - // Environment - "browser": true, - "jquery": true, - - "globals": { - "mediaWiki": false, - "Recorder": false, - "AudioContext": false - } -} diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000..0fc57dc --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,3 @@ +{ +"extends": "stylelint-config-wikimedia" +} diff --git a/Gruntfile.js b/Gruntfile.js index 362c2f7..1246162 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,49 +4,45 @@ * @package PronunciationRecording */ -/*jshint node:true */ +/* eslint-env node, es6 */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); - grunt.loadNpmTasks( 'grunt-contrib-csslint' ); - 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', 'resources/**/*.js', '!resources/mediawiki.libs.recorderjs/*' ] }, - jscs: { - src: '<%= jshint.all %>' - }, - csslint: { + stylelint: { src: 'resources/**/*.css' - }, - jsonlint: { - all: 'i18n/*.json' }, banana: { all: 'i18n/' }, + jsonlint: { + all: [ + '*.json', + '.stylelintrc', + 'i18n/*.json' + ] + }, watch: { files: [ - '.{jshintignore,jshintrc,jscsrc,csslintrc}', - '<%= jshint.all %>', - '<%= csslint.all %>', - '<%= jsonlint.all %>' + '.{stylelintrc,eslintrc.json}', + '<%= eslint.all %>', + '<%=
[MediaWiki-commits] [Gerrit] mediawiki...PronunciationRecording[master]: build: Replace jshint/jscs with eslint and csslint with styl...
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370118 ) Change subject: build: Replace jshint/jscs with eslint and csslint with stylelint .. build: Replace jshint/jscs with eslint and csslint with stylelint Also upgrade banana and jsonlint to latest. Change-Id: Ief51508b119300abc64a42260ccb72505e4b52dd --- A .eslintrc.json A .stylelintrc M Gruntfile.js M package.json M resources/ext.pronunciationRecording.pronunciationRecorder.js M resources/ext.pronunciationRecording.specialPage.js 6 files changed, 63 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PronunciationRecording refs/changes/18/370118/1 diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000..b8371ee --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,13 @@ +{ + "extends": "wikimedia", + "env": { + "browser": true, + "jquery": true, + "qunit": true + }, + "globals": { + "mediaWiki": false, + "Recorder": false + }, + "rules": {} +} diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000..0fc57dc --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,3 @@ +{ +"extends": "stylelint-config-wikimedia" +} diff --git a/Gruntfile.js b/Gruntfile.js index 362c2f7..1246162 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,49 +4,45 @@ * @package PronunciationRecording */ -/*jshint node:true */ +/* eslint-env node, es6 */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-banana-checker' ); - grunt.loadNpmTasks( 'grunt-contrib-csslint' ); - 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', 'resources/**/*.js', '!resources/mediawiki.libs.recorderjs/*' ] }, - jscs: { - src: '<%= jshint.all %>' - }, - csslint: { + stylelint: { src: 'resources/**/*.css' - }, - jsonlint: { - all: 'i18n/*.json' }, banana: { all: 'i18n/' }, + jsonlint: { + all: [ + '*.json', + '.stylelintrc', + 'i18n/*.json' + ] + }, watch: { files: [ - '.{jshintignore,jshintrc,jscsrc,csslintrc}', - '<%= jshint.all %>', - '<%= csslint.all %>', - '<%= jsonlint.all %>' + '.{stylelintrc,eslintrc.json}', + '<%= eslint.all %>', + '<%= stylelint.all %>' ], tasks: 'test' } } ); - grunt.registerTask( 'test', [ 'jshint', 'jscs', 'csslint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/package.json b/package.json index e77148c..c7757c7 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,24 @@ { - "name": "PronunciationRecording", - "version": "0.0.0", - "private": true, - "description": "Build tools for PronunciationRecording.", - "scripts": { -"test": "grunt test" - }, - "repository": { -"type": "git", -"url": "https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PronunciationRecording.git; - }, - "devDependencies": { -"grunt": "1.0.1", -"grunt-banana-checker": "0.4.0", -"grunt-contrib-csslint": "0.5.0", -"grunt-contrib-jshint": "0.11.3", -"grunt-contrib-watch": "1.0.0", -"grunt-jscs": "2.1.0", -"grunt-jsonlint": "1.0.7" - } + "name": "PronunciationRecording", + "version": "0.0.0", + "private": true, + "description": "Build tools for the PronunciationRecording extension.", + "scripts": { + "test": "grunt test" + }, + "repository": { + "type": "git", + "url":