Make Ace config pass eslint

Just a tiny change to be safer.

Change-Id: Id0e188ab6e5d0e14ef5f0fdcce74be5ec7f24470
This commit is contained in:
Daimona Eaytoy 2018-08-22 11:11:44 +02:00
parent 47acf13b4d
commit 83ccb376f0
2 changed files with 7 additions and 9 deletions

View file

@ -20,7 +20,6 @@ module.exports = function ( grunt ) {
all: [
'**/*.js',
'!node_modules/**',
'!modules/mode-abusefilter.js',
'!vendor/**'
]
},
@ -28,7 +27,6 @@ module.exports = function ( grunt ) {
all: [
'**/*.css',
'!node_modules/**',
'!modules/mode-abusefilter.js',
'!vendor/**'
]
}

View file

@ -1,5 +1,5 @@
/* global ace, mw */
ace.define( 'ace/mode/abusefilter_highlight_rules', [ 'require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text_highlight_rules' ], function ( require, exports, module ) {
ace.define( 'ace/mode/abusefilter_highlight_rules', [ 'require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text_highlight_rules' ], function ( require, exports ) {
'use strict';
var oop = require( 'ace/lib/oop' ),
@ -13,7 +13,7 @@ ace.define( 'ace/mode/abusefilter_highlight_rules', [ 'require', 'exports', 'mod
deprecated = ( '' ), // Template for deprecated vars, already registered within ace settings.
keywordMapper = this.createKeywordMapper(
{
'keyword': keywords,
keyword: keywords,
'support.function': functions,
'constant.language': constants,
'variable.language': variables,
@ -30,7 +30,7 @@ ace.define( 'ace/mode/abusefilter_highlight_rules', [ 'require', 'exports', 'mod
floatNumber = '(?:' + pointFloat + ')';
this.$rules = {
'start': [ {
start: [ {
token: 'comment',
regex: '\\/\\*',
next: 'comment'
@ -39,7 +39,7 @@ ace.define( 'ace/mode/abusefilter_highlight_rules', [ 'require', 'exports', 'mod
regex: '"(?:[^\\\\]|\\\\.)*?"'
}, {
token: 'string', // ' string
regex: "'(?:[^\\\\]|\\\\.)*?'"
regex: '\'(?:[^\\\\]|\\\\.)*?\''
}, {
token: 'constant.numeric', // float
regex: floatNumber
@ -62,7 +62,7 @@ ace.define( 'ace/mode/abusefilter_highlight_rules', [ 'require', 'exports', 'mod
token: 'text',
regex: '\\s+|\\w+'
} ],
'comment': [ {
comment: [ {
token: 'comment',
regex: '\\*\\/',
next: 'start'
@ -79,7 +79,7 @@ ace.define( 'ace/mode/abusefilter_highlight_rules', [ 'require', 'exports', 'mod
exports.AFHighlightRules = AFHighlightRules;
} );
ace.define( 'ace/mode/abusefilter', [ 'require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/abusefilter_highlight_rules' ], function ( require, exports, module ) {
ace.define( 'ace/mode/abusefilter', [ 'require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/abusefilter_highlight_rules' ], function ( require, exports ) {
'use strict';
var oop = require( 'ace/lib/oop' ),
@ -98,7 +98,7 @@ ace.define( 'ace/mode/abusefilter', [ 'require', 'exports', 'module', 'ace/lib/o
start: '/*',
end: '*/'
};
this.getNextLineIndent = function ( state, line, tab ) {
this.getNextLineIndent = function ( state, line ) {
var indent = this.$getIndent( line );
return indent;
};