Przeglądaj źródła

Code style: Switched to ESLint.

Kamil Piechaczek 8 lat temu
rodzic
commit
b304bb3976

+ 1 - 1
packages/ckeditor5-block-quote/src/blockquote.js

@@ -47,7 +47,7 @@ export default class BlockQuote extends Plugin {
 		const t = editor.t;
 		const command = editor.commands.get( 'blockQuote' );
 
-		editor.ui.componentFactory.add( 'blockQuote', ( locale ) => {
+		editor.ui.componentFactory.add( 'blockQuote', locale => {
 			const buttonView = new ButtonView( locale );
 
 			buttonView.set( {

+ 2 - 2
packages/ckeditor5-block-quote/src/blockquotecommand.js

@@ -115,7 +115,7 @@ export default class BlockQuoteCommand extends Command {
 	 */
 	_removeQuote( batch, blocks ) {
 		// Unquote all groups of block. Iterate in the reverse order to not break following ranges.
-		getRangesOfBlockGroups( blocks ).reverse().forEach( ( groupRange ) => {
+		getRangesOfBlockGroups( blocks ).reverse().forEach( groupRange => {
 			if ( groupRange.start.isAtStart && groupRange.end.isAtEnd ) {
 				batch.unwrap( groupRange.start.parent );
 
@@ -155,7 +155,7 @@ export default class BlockQuoteCommand extends Command {
 		const quotesToMerge = [];
 
 		// Quote all groups of block. Iterate in the reverse order to not break following ranges.
-		getRangesOfBlockGroups( blocks ).reverse().forEach( ( groupRange ) => {
+		getRangesOfBlockGroups( blocks ).reverse().forEach( groupRange => {
 			let quote = findQuote( groupRange.start );
 
 			if ( !quote ) {

+ 1 - 2
packages/ckeditor5-block-quote/tests/blockquote.js

@@ -11,7 +11,7 @@ import BlockQuoteEngine from '../src/blockquoteengine';
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 
 describe( 'BlockQuote', () => {
-	let editor, doc, command, element;
+	let editor, command, element;
 
 	beforeEach( () => {
 		element = document.createElement( 'div' );
@@ -22,7 +22,6 @@ describe( 'BlockQuote', () => {
 		} )
 		.then( newEditor => {
 			editor = newEditor;
-			doc = editor.document;
 			command = editor.commands.get( 'blockQuote' );
 		} );
 	} );

+ 3 - 3
packages/ckeditor5-block-quote/tests/integration.js

@@ -299,9 +299,9 @@ describe( 'BlockQuote', () => {
 
 			// We can't load ImageCaption in this test because it adds <caption> to all images automatically.
 			return ClassicTestEditor.create( element, {
-					plugins: [ BlockQuote, Paragraph, Image ]
-				} )
-				.then( ( editor ) => {
+				plugins: [ BlockQuote, Paragraph, Image ]
+			} )
+				.then( editor => {
 					setModelData( editor.document,
 						'<paragraph>fo[o</paragraph>' +
 						'<image src="foo.png"></image>' +