mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-27 16:40:07 +00:00
build: Update eslint-config-wikimedia to 0.11.0
Change-Id: I99fd10fbcce5d5e6b87b6e3faeb7b18c4e573ef7
This commit is contained in:
parent
60f5dd35d6
commit
5cac43ddd3
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@ node_modules/
|
||||||
vendor/
|
vendor/
|
||||||
ace-git/
|
ace-git/
|
||||||
composer.lock
|
composer.lock
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
# Editors
|
# Editors
|
||||||
*.kate-swp
|
*.kate-swp
|
||||||
|
|
|
@ -18,6 +18,10 @@ module.exports = function ( grunt ) {
|
||||||
|
|
||||||
grunt.initConfig( {
|
grunt.initConfig( {
|
||||||
eslint: {
|
eslint: {
|
||||||
|
options: {
|
||||||
|
reportUnusedDisableDirectives: true,
|
||||||
|
cache: true
|
||||||
|
},
|
||||||
all: [
|
all: [
|
||||||
'**/*.js',
|
'**/*.js',
|
||||||
'!node_modules/**',
|
'!node_modules/**',
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$( function () {
|
$( function () {
|
||||||
|
// eslint-disable-next-line no-jquery/no-global-selector
|
||||||
var $wpTextbox1 = $( '#wpTextbox1' );
|
var $wpTextbox1 = $( '#wpTextbox1' );
|
||||||
|
|
||||||
// Code is supposed to be always LTR. See bug 39364.
|
// Code is supposed to be always LTR. See bug 39364.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Ace syntax-highlighting code editor extension for wikiEditor */
|
/* Ace syntax-highlighting code editor extension for wikiEditor */
|
||||||
/* global ace */
|
/* global ace */
|
||||||
|
/* eslint-disable no-jquery/no-global-selector */
|
||||||
( function () {
|
( function () {
|
||||||
$.wikiEditor.modules.codeEditor = {
|
$.wikiEditor.modules.codeEditor = {
|
||||||
/**
|
/**
|
||||||
|
@ -358,6 +359,7 @@
|
||||||
// Ace doesn't like replacing a textarea directly.
|
// Ace doesn't like replacing a textarea directly.
|
||||||
// We'll stub this out to sit on top of it...
|
// 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
|
// 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 = $( '<div style="position: relative"><div class="editor" style="line-height: 1.5em; top: 0; left: 0; right: 0; bottom: 0; position: absolute;"></div></div>' ).insertAfter( box );
|
container = context.$codeEditorContainer = $( '<div style="position: relative"><div class="editor" style="line-height: 1.5em; top: 0; left: 0; right: 0; bottom: 0; position: absolute;"></div></div>' ).insertAfter( box );
|
||||||
editdiv = container.find( '.editor' );
|
editdiv = container.find( '.editor' );
|
||||||
|
|
||||||
|
@ -506,9 +508,9 @@
|
||||||
delayedUpdate,
|
delayedUpdate,
|
||||||
editor = context.codeEditor,
|
editor = context.codeEditor,
|
||||||
lang = ace.require( 'ace/lib/lang' ),
|
lang = ace.require( 'ace/lib/lang' ),
|
||||||
$errors = $( '<span class="codeEditor-status-worker-cell ace_gutter-cell ace_error">0</span>' ),
|
$errors = $( '<span>' ).addClass( 'codeEditor-status-worker-cell ace_gutter-cell ace_error' ).text( '0' ),
|
||||||
$warnings = $( '<span class="codeEditor-status-worker-cell ace_gutter-cell ace_warning">0</span>' ),
|
$warnings = $( '<span>' ).addClass( 'codeEditor-status-worker-cell ace_gutter-cell ace_warning' ).text( '0' ),
|
||||||
$infos = $( '<span class="codeEditor-status-worker-cell ace_gutter-cell ace_info">0</span>' ),
|
$infos = $( '<span>' ).addClass( 'codeEditor-status-worker-cell ace_gutter-cell ace_info' ).text( '0' ),
|
||||||
$message = $( '<div>' ).addClass( 'codeEditor-status-message' ),
|
$message = $( '<div>' ).addClass( 'codeEditor-status-message' ),
|
||||||
$lineAndMode = $( '<div>' ).addClass( 'codeEditor-status-line' ),
|
$lineAndMode = $( '<div>' ).addClass( 'codeEditor-status-line' ),
|
||||||
$workerStatus = $( '<div>' )
|
$workerStatus = $( '<div>' )
|
||||||
|
@ -683,7 +685,7 @@
|
||||||
* @param {Object} extended
|
* @param {Object} extended
|
||||||
*/
|
*/
|
||||||
saveAndExtend = function ( base, extended ) {
|
saveAndExtend = function ( base, extended ) {
|
||||||
// eslint-disable-next-line jquery/no-map-util
|
// eslint-disable-next-line no-jquery/no-map-util
|
||||||
$.map( extended, function ( func, name ) {
|
$.map( extended, function ( func, name ) {
|
||||||
var orig;
|
var orig;
|
||||||
if ( name in base ) {
|
if ( name in base ) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ace-builds": "1.2.9",
|
"ace-builds": "1.2.9",
|
||||||
"eslint-config-wikimedia": "0.9.0",
|
"eslint-config-wikimedia": "0.11.0",
|
||||||
"grunt": "1.0.3",
|
"grunt": "1.0.3",
|
||||||
"grunt-banana-checker": "0.6.0",
|
"grunt-banana-checker": "0.6.0",
|
||||||
"grunt-contrib-clean": "2.0.0",
|
"grunt-contrib-clean": "2.0.0",
|
||||||
|
|
Loading…
Reference in a new issue