mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-12-18 02:50:58 +00:00
build: Update eslint-config-wikimedia 0.10.1
Change-Id: I71b5c0a1b499865b56ef6957427cae7c97609d73
This commit is contained in:
parent
5202afd410
commit
f9f01cf6b7
|
@ -8,6 +8,9 @@ module.exports = function ( grunt ) {
|
||||||
|
|
||||||
grunt.initConfig( {
|
grunt.initConfig( {
|
||||||
eslint: {
|
eslint: {
|
||||||
|
options: {
|
||||||
|
reportUnusedDisableDirectives: true
|
||||||
|
},
|
||||||
all: [
|
all: [
|
||||||
'**/*.js',
|
'**/*.js',
|
||||||
'!node_modules/**',
|
'!node_modules/**',
|
||||||
|
|
|
@ -973,7 +973,6 @@
|
||||||
end: end } );
|
end: end } );
|
||||||
$textarea.textSelection( 'scrollToCaretPosition' );
|
$textarea.textSelection( 'scrollToCaretPosition' );
|
||||||
$( this ).data( 'offset', end );
|
$( this ).data( 'offset', end );
|
||||||
// eslint-disable-next-line jquery/no-event-shorthand
|
|
||||||
$textarea[ 0 ].focus();
|
$textarea[ 0 ].focus();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -426,7 +426,7 @@
|
||||||
* Save text selection
|
* Save text selection
|
||||||
*/
|
*/
|
||||||
saveSelection: function () {
|
saveSelection: function () {
|
||||||
context.$textarea.focus();
|
context.$textarea.trigger( 'focus' );
|
||||||
context.savedSelection = {
|
context.savedSelection = {
|
||||||
selectionStart: context.$textarea[ 0 ].selectionStart,
|
selectionStart: context.$textarea[ 0 ].selectionStart,
|
||||||
selectionEnd: context.$textarea[ 0 ].selectionEnd
|
selectionEnd: context.$textarea[ 0 ].selectionEnd
|
||||||
|
@ -438,7 +438,7 @@
|
||||||
*/
|
*/
|
||||||
restoreSelection: function () {
|
restoreSelection: function () {
|
||||||
if ( context.savedSelection ) {
|
if ( context.savedSelection ) {
|
||||||
context.$textarea.focus();
|
context.$textarea.trigger( 'focus' );
|
||||||
context.$textarea[ 0 ].setSelectionRange( context.savedSelection.selectionStart, context.savedSelection.selectionEnd );
|
context.$textarea[ 0 ].setSelectionRange( context.savedSelection.selectionStart, context.savedSelection.selectionEnd );
|
||||||
context.savedSelection = null;
|
context.savedSelection = null;
|
||||||
}
|
}
|
||||||
|
@ -478,7 +478,7 @@
|
||||||
context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
|
context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
|
||||||
// Restore focus and cursor if needed
|
// Restore focus and cursor if needed
|
||||||
if ( hasFocus ) {
|
if ( hasFocus ) {
|
||||||
context.$textarea.focus();
|
context.$textarea.trigger( 'focus' );
|
||||||
context.$textarea.textSelection( 'setSelection', { start: cursorPos[ 0 ], end: cursorPos[ 1 ] } );
|
context.$textarea.textSelection( 'setSelection', { start: cursorPos[ 0 ], end: cursorPos[ 1 ] } );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,8 @@
|
||||||
action: {
|
action: {
|
||||||
type: 'encapsulate',
|
type: 'encapsulate',
|
||||||
options: {
|
options: {
|
||||||
// eslint-disable-next-line quotes
|
|
||||||
pre: "'''",
|
pre: "'''",
|
||||||
periMsg: 'wikieditor-toolbar-tool-bold-example',
|
periMsg: 'wikieditor-toolbar-tool-bold-example',
|
||||||
// eslint-disable-next-line quotes
|
|
||||||
post: "'''"
|
post: "'''"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,10 +39,8 @@
|
||||||
action: {
|
action: {
|
||||||
type: 'encapsulate',
|
type: 'encapsulate',
|
||||||
options: {
|
options: {
|
||||||
// eslint-disable-next-line quotes
|
|
||||||
pre: "''",
|
pre: "''",
|
||||||
periMsg: 'wikieditor-toolbar-tool-italic-example',
|
periMsg: 'wikieditor-toolbar-tool-italic-example',
|
||||||
// eslint-disable-next-line quotes
|
|
||||||
post: "''"
|
post: "''"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
"test": "grunt test"
|
"test": "grunt test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-wikimedia": "0.10.0",
|
"eslint-config-wikimedia": "0.10.1",
|
||||||
"grunt": "1.0.3",
|
"grunt": "1.0.3",
|
||||||
"grunt-banana-checker": "0.6.0",
|
"grunt-banana-checker": "0.7.0",
|
||||||
"grunt-eslint": "21.0.0",
|
"grunt-eslint": "21.0.0",
|
||||||
"grunt-jsonlint": "1.1.0",
|
"grunt-jsonlint": "1.1.0",
|
||||||
"grunt-stylelint": "0.10.1",
|
"grunt-stylelint": "0.10.1",
|
||||||
|
|
Loading…
Reference in a new issue