8
0
Просмотр исходного кода

Code style: Switched to ESLint.

Kamil Piechaczek 8 лет назад
Родитель
Сommit
92d07b477a

+ 1 - 1
packages/ckeditor5-editor-classic/src/classic.js

@@ -80,7 +80,7 @@ export default class ClassicEditor extends StandardEditor {
 	 * @returns {module:core/editor/standardeditor~StandardEditor} return.editor The editor instance.
 	 */
 	static create( element, config ) {
-		return new Promise( ( resolve ) => {
+		return new Promise( resolve => {
 			const editor = new this( element, config );
 
 			resolve(

+ 31 - 31
packages/ckeditor5-editor-classic/tests/classic.js

@@ -61,11 +61,11 @@ describe( 'ClassicEditor', () => {
 	describe( 'create()', () => {
 		beforeEach( function() {
 			return ClassicEditor.create( editorElement, {
-					plugins: [ Paragraph, Bold ]
-				} )
-				.then( newEditor => {
-					editor = newEditor;
-				} );
+				plugins: [ Paragraph, Bold ]
+			} )
+			.then( newEditor => {
+				editor = newEditor;
+			} );
 		} );
 
 		afterEach( () => {
@@ -92,16 +92,16 @@ describe( 'ClassicEditor', () => {
 			class CustomClassicEditor extends ClassicEditor {}
 
 			return CustomClassicEditor.create( editorElement, {
-					plugins: [ Paragraph, Bold ]
-				} )
-				.then( newEditor => {
-					editor = newEditor;
+				plugins: [ Paragraph, Bold ]
+			} )
+			.then( newEditor => {
+				editor = newEditor;
 
-					expect( newEditor ).to.be.instanceof( CustomClassicEditor );
-					expect( newEditor ).to.be.instanceof( ClassicEditor );
+				expect( newEditor ).to.be.instanceof( CustomClassicEditor );
+				expect( newEditor ).to.be.instanceof( ClassicEditor );
 
-					expect( newEditor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
-				} );
+				expect( newEditor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
+			} );
 		} );
 	} );
 
@@ -127,13 +127,13 @@ describe( 'ClassicEditor', () => {
 			}
 
 			return ClassicEditor.create( editorElement, {
-					plugins: [ EventWatcher ]
-				} )
-				.then( ( newEditor ) => {
-					expect( fired ).to.deep.equal( [ 'pluginsReady', 'uiReady', 'dataReady', 'ready' ] );
+				plugins: [ EventWatcher ]
+			} )
+			.then( newEditor => {
+				expect( fired ).to.deep.equal( [ 'pluginsReady', 'uiReady', 'dataReady', 'ready' ] );
 
-					editor = newEditor;
-				} );
+				editor = newEditor;
+			} );
 		} );
 
 		it( 'fires dataReady once data is loaded', () => {
@@ -148,13 +148,13 @@ describe( 'ClassicEditor', () => {
 			}
 
 			return ClassicEditor.create( editorElement, {
-					plugins: [ EventWatcher, Paragraph, Bold ]
-				} )
-				.then( ( newEditor ) => {
-					expect( data ).to.equal( '<p><strong>foo</strong> bar</p>' );
+				plugins: [ EventWatcher, Paragraph, Bold ]
+			} )
+			.then( newEditor => {
+				expect( data ).to.equal( '<p><strong>foo</strong> bar</p>' );
 
-					editor = newEditor;
-				} );
+				editor = newEditor;
+			} );
 		} );
 
 		it( 'fires uiReady once UI is ready', () => {
@@ -169,13 +169,13 @@ describe( 'ClassicEditor', () => {
 			}
 
 			return ClassicEditor.create( editorElement, {
-					plugins: [ EventWatcher ]
-				} )
-				.then( ( newEditor ) => {
-					expect( isReady ).to.be.true;
+				plugins: [ EventWatcher ]
+			} )
+			.then( newEditor => {
+				expect( isReady ).to.be.true;
 
-					editor = newEditor;
-				} );
+				editor = newEditor;
+			} );
 		} );
 	} );
 

+ 1 - 1
packages/ckeditor5-editor-classic/tests/classiceditorui.js

@@ -193,7 +193,7 @@ describe( 'ClassicEditorUI', () => {
 } );
 
 function viewCreator( name ) {
-	return ( locale ) => {
+	return locale => {
 		const view = new View( locale );
 
 		view.name = name;