diff --git a/.gitignore b/.gitignore index f4a48da7..f4e28032 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules/ vendor/ ace-git/ composer.lock +.eslintcache # Editors *.kate-swp diff --git a/Gruntfile.js b/Gruntfile.js index eee7bc58..921ee1e9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,6 +18,10 @@ module.exports = function ( grunt ) { grunt.initConfig( { eslint: { + options: { + reportUnusedDisableDirectives: true, + cache: true + }, all: [ '**/*.js', '!node_modules/**', diff --git a/modules/ext.codeEditor.js b/modules/ext.codeEditor.js index 7f77ff31..f9db4270 100644 --- a/modules/ext.codeEditor.js +++ b/modules/ext.codeEditor.js @@ -22,6 +22,7 @@ */ $( function () { + // eslint-disable-next-line no-jquery/no-global-selector var $wpTextbox1 = $( '#wpTextbox1' ); // Code is supposed to be always LTR. See bug 39364. diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js index 60bc834e..bdfdef41 100644 --- a/modules/jquery.codeEditor.js +++ b/modules/jquery.codeEditor.js @@ -1,5 +1,6 @@ /* Ace syntax-highlighting code editor extension for wikiEditor */ /* global ace */ +/* eslint-disable no-jquery/no-global-selector */ ( function () { $.wikiEditor.modules.codeEditor = { /** @@ -358,6 +359,7 @@ // Ace doesn't like replacing a textarea directly. // We'll stub this out to sit on top of it... // line-height is needed to compensate for oddity in WikiEditor extension, which zeroes the line-height on a parent container + // eslint-disable-next-line no-jquery/no-parse-html-literal container = context.$codeEditorContainer = $( '