Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371623 )

Change subject: build: Switch from JSHint to ESLint
......................................................................

build: Switch from JSHint to ESLint

Change-Id: Ie090d1ba345b5e59c06c5aaa30cacfb14a41dc2d
---
A .eslintignore
A .eslintrc.json
D .jshintignore
M Gruntfile.js
M package.json
5 files changed, 21 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/23/371623/1

diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..1380bd8
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,2 @@
+/vendor
+/resources/libraries
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..a7d2ee6
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,12 @@
+{
+       "extends": "wikimedia",
+       "env": {
+               "browser": true,
+               "jquery": true
+       },
+       "rules": {
+               "no-unused-vars": 0,
+               "quotes": 0,
+               "space-before-function-paren": 0
+       }
+}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 1395b35..0000000
--- a/.jshintignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules/**
-vendor/**
-resources/libraries/**
diff --git a/Gruntfile.js b/Gruntfile.js
index d812e55..551d34f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,17 +1,13 @@
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
-       grunt.loadNpmTasks( 'grunt-contrib-jshint' );
        grunt.loadNpmTasks( 'grunt-jsonlint' );
        grunt.loadNpmTasks( 'grunt-banana-checker' );
+       grunt.loadNpmTasks( 'grunt-eslint' );
        grunt.loadNpmTasks( 'grunt-stylelint' );
 
        grunt.initConfig( {
-               jshint: {
-                       all: [
-                               '**/*.js',
-                               '!node_modules/**',
-                               '!vendor/**'
-                       ]
+               eslint: {
+                       all: '.'
                },
                banana: {
                        all: 'i18n/'
@@ -35,6 +31,6 @@
                }
        } );
 
-       grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana', 
'stylelint' ] );
+       grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 
'stylelint' ] );
        grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index 45ba1cd..90408a6 100644
--- a/package.json
+++ b/package.json
@@ -4,9 +4,10 @@
     "test": "grunt test"
   },
   "devDependencies": {
+    "eslint-config-wikimedia": "0.4.0",
     "grunt": "1.0.1",
     "grunt-banana-checker": "0.6.0",
-    "grunt-contrib-jshint": "1.1.0",
+    "grunt-eslint": "20.0.0",
     "grunt-jsonlint": "1.1.0",
     "grunt-stylelint": "0.7.0",
     "stylelint": "7.8.0",

-- 
To view, visit https://gerrit.wikimedia.org/r/371623
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie090d1ba345b5e59c06c5aaa30cacfb14a41dc2d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to