Merge "build: Update eslint-config-wikimedia 0.10.1"

This commit is contained in:
jenkins-bot 2019-02-06 01:49:13 +00:00 committed by Gerrit Code Review
commit 80aa0b2f31
5 changed files with 8 additions and 10 deletions

View file

@ -8,6 +8,9 @@ module.exports = function ( grunt ) {
grunt.initConfig( {
eslint: {
options: {
reportUnusedDisableDirectives: true
},
all: [
'**/*.js',
'!node_modules/**',

View file

@ -973,7 +973,6 @@
end: end } );
$textarea.textSelection( 'scrollToCaretPosition' );
$( this ).data( 'offset', end );
// eslint-disable-next-line jquery/no-event-shorthand
$textarea[ 0 ].focus();
}
} );

View file

@ -426,7 +426,7 @@
* Save text selection
*/
saveSelection: function () {
context.$textarea.focus();
context.$textarea.trigger( 'focus' );
context.savedSelection = {
selectionStart: context.$textarea[ 0 ].selectionStart,
selectionEnd: context.$textarea[ 0 ].selectionEnd
@ -438,7 +438,7 @@
*/
restoreSelection: function () {
if ( context.savedSelection ) {
context.$textarea.focus();
context.$textarea.trigger( 'focus' );
context.$textarea[ 0 ].setSelectionRange( context.savedSelection.selectionStart, context.savedSelection.selectionEnd );
context.savedSelection = null;
}
@ -478,7 +478,7 @@
context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
// Restore focus and cursor if needed
if ( hasFocus ) {
context.$textarea.focus();
context.$textarea.trigger( 'focus' );
context.$textarea.textSelection( 'setSelection', { start: cursorPos[ 0 ], end: cursorPos[ 1 ] } );
}

View file

@ -23,10 +23,8 @@
action: {
type: 'encapsulate',
options: {
// eslint-disable-next-line quotes
pre: "'''",
periMsg: 'wikieditor-toolbar-tool-bold-example',
// eslint-disable-next-line quotes
post: "'''"
}
}
@ -41,10 +39,8 @@
action: {
type: 'encapsulate',
options: {
// eslint-disable-next-line quotes
pre: "''",
periMsg: 'wikieditor-toolbar-tool-italic-example',
// eslint-disable-next-line quotes
post: "''"
}
}

View file

@ -4,9 +4,9 @@
"test": "grunt test"
},
"devDependencies": {
"eslint-config-wikimedia": "0.10.0",
"eslint-config-wikimedia": "0.10.1",
"grunt": "1.0.3",
"grunt-banana-checker": "0.6.0",
"grunt-banana-checker": "0.7.0",
"grunt-eslint": "21.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.10.1",