From 445087e5fe19f8f42b759c9381ab07fe9e49f36e Mon Sep 17 00:00:00 2001 From: Alangi Derick Date: Thu, 6 Sep 2018 12:29:32 +0100 Subject: [PATCH] Add recent pattern for ESLinting to repo Use of all: '.' in Gruntfile.js for eslint config and eslintIgnore in package.json to ignore linting the "vendor/" etc directory. Bug: T203648 Change-Id: I65756ab3b6f413021cedeb22c7933c6cffa2cb78 --- Gruntfile.js | 8 +------- package.json | 7 ++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3aa3dad9..4d11aeb9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,13 +10,7 @@ module.exports = function ( grunt ) { grunt.initConfig( { eslint: { - all: [ - '**/*.js', - '!lib/**', - '!node_modules/**', - '!vendor/**', - '!resources/js/ext.uls.webfonts.repository.js' - ] + all: '.' }, stylelint: { options: { diff --git a/package.json b/package.json index 276964aa..627811fe 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,10 @@ "grunt-svgmin": "5.0.0", "stylelint": "8.2.0", "stylelint-config-wikimedia": "0.4.2" - } + }, + "eslintIgnore": [ + "lib/**", + "resources/js/ext.uls.webfonts.repository.js", + "vendor/**" + ] }