Selaa lähdekoodia

Code style: Aligned code style to new ESLint version.

Piotrek Koszuliński 8 vuotta sitten
vanhempi
sitoutus
a82d56793f

+ 33 - 31
packages/ckeditor5-heading/tests/heading.js

@@ -30,17 +30,18 @@ describe( 'Heading', () => {
 		editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );
 
-		return ClassicTestEditor.create( editorElement, {
-			plugins: [ Heading ],
-			toolbar: [ 'heading' ]
-		} )
-		.then( newEditor => {
-			editor = newEditor;
-			dropdown = editor.ui.componentFactory.create( 'headings' );
-
-			// Set data so the commands will be enabled.
-			setData( editor.document, '<paragraph>f{}oo</paragraph>' );
-		} );
+		return ClassicTestEditor
+			.create( editorElement, {
+				plugins: [ Heading ],
+				toolbar: [ 'heading' ]
+			} )
+			.then( newEditor => {
+				editor = newEditor;
+				dropdown = editor.ui.componentFactory.create( 'headings' );
+
+				// Set data so the commands will be enabled.
+				setData( editor.document, '<paragraph>f{}oo</paragraph>' );
+			} );
 	} );
 
 	afterEach( () => {
@@ -204,27 +205,28 @@ describe( 'Heading', () => {
 				const editorElement = document.createElement( 'div' );
 				document.body.appendChild( editorElement );
 
-				return ClassicTestEditor.create( editorElement, {
-					plugins: [ Heading ],
-					toolbar: [ 'heading' ],
-					lang: 'pl',
-					heading: {
-						options
-					}
-				} )
-				.then( newEditor => {
-					editor = newEditor;
-					dropdown = editor.ui.componentFactory.create( 'headings' );
-					commands = {};
-
-					editor.config.get( 'heading.options' ).forEach( ( { modelElement } ) => {
-						commands[ modelElement ] = editor.commands.get( modelElement );
+				return ClassicTestEditor
+					.create( editorElement, {
+						plugins: [ Heading ],
+						toolbar: [ 'heading' ],
+						lang: 'pl',
+						heading: {
+							options
+						}
+					} )
+					.then( newEditor => {
+						editor = newEditor;
+						dropdown = editor.ui.componentFactory.create( 'headings' );
+						commands = {};
+
+						editor.config.get( 'heading.options' ).forEach( ( { modelElement } ) => {
+							commands[ modelElement ] = editor.commands.get( modelElement );
+						} );
+
+						editorElement.remove();
+
+						return editor.destroy();
 					} );
-
-					editorElement.remove();
-
-					return editor.destroy();
-				} );
 			}
 		} );
 

+ 8 - 7
packages/ckeditor5-heading/tests/integration.js

@@ -23,13 +23,14 @@ describe( 'Heading integration', () => {
 		element = document.createElement( 'div' );
 		document.body.appendChild( element );
 
-		return ClassicTestEditor.create( element, {
-			plugins: [ Paragraph, Heading, Enter, Image, ImageCaption, Undo ]
-		} )
-		.then( newEditor => {
-			editor = newEditor;
-			doc = editor.document;
-		} );
+		return ClassicTestEditor
+			.create( element, {
+				plugins: [ Paragraph, Heading, Enter, Image, ImageCaption, Undo ]
+			} )
+			.then( newEditor => {
+				editor = newEditor;
+				doc = editor.document;
+			} );
 	} );
 
 	afterEach( () => {

+ 11 - 10
packages/ckeditor5-heading/tests/manual/heading.js

@@ -12,13 +12,14 @@ import Heading from '../../src/heading';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import Undo from '@ckeditor/ckeditor5-undo/src/undo';
 
-ClassicEditor.create( document.querySelector( '#editor' ), {
-	plugins: [ Enter, Typing, Undo, Heading, Paragraph ],
-	toolbar: [ 'headings', 'undo', 'redo' ]
-} )
-.then( editor => {
-	window.editor = editor;
-} )
-.catch( err => {
-	console.error( err.stack );
-} );
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ Enter, Typing, Undo, Heading, Paragraph ],
+		toolbar: [ 'headings', 'undo', 'redo' ]
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );