浏览代码

Code style: fix code issues.

Maciej Gołaszewski 5 年之前
父节点
当前提交
1ac798f55f

+ 2 - 2
packages/ckeditor5-table/docs/_snippets/features/table-styling-colors.js

@@ -87,14 +87,14 @@ const customColorPalette = [
 	{
 	{
 		color: 'hsl(200, 18%, 100%)',
 		color: 'hsl(200, 18%, 100%)',
 		label: 'White'
 		label: 'White'
-	},
+	}
 ];
 ];
 
 
 ClassicEditor
 ClassicEditor
 	.create( document.querySelector( '#snippet-table-styling-colors' ), {
 	.create( document.querySelector( '#snippet-table-styling-colors' ), {
 		extraPlugins: [
 		extraPlugins: [
 			CKEditorPlugins.TableProperties,
 			CKEditorPlugins.TableProperties,
-			CKEditorPlugins.TableCellProperties,
+			CKEditorPlugins.TableCellProperties
 		],
 		],
 		cloudServices: CS_CONFIG,
 		cloudServices: CS_CONFIG,
 		toolbar: {
 		toolbar: {

+ 2 - 2
packages/ckeditor5-table/docs/_snippets/features/table-styling.js

@@ -71,7 +71,7 @@ const COLOR_PALETTE = [
 	},
 	},
 	{
 	{
 		color: 'hsl(180, 52%, 58%)',
 		color: 'hsl(180, 52%, 58%)',
-		label: 'Light Aqua',
+		label: 'Light Aqua'
 	},
 	},
 	{
 	{
 		color: 'hsl(180, 97%, 31%)',
 		color: 'hsl(180, 97%, 31%)',
@@ -95,7 +95,7 @@ ClassicEditor
 	.create( document.querySelector( '#snippet-table-styling' ), {
 	.create( document.querySelector( '#snippet-table-styling' ), {
 		extraPlugins: [
 		extraPlugins: [
 			CKEditorPlugins.TableProperties,
 			CKEditorPlugins.TableProperties,
-			CKEditorPlugins.TableCellProperties,
+			CKEditorPlugins.TableCellProperties
 		],
 		],
 		cloudServices: CS_CONFIG,
 		cloudServices: CS_CONFIG,
 		toolbar: {
 		toolbar: {

+ 12 - 12
packages/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.js

@@ -25,7 +25,7 @@ import {
 	fillToolbar,
 	fillToolbar,
 	getBorderStyleDefinitions,
 	getBorderStyleDefinitions,
 	getBorderStyleLabels,
 	getBorderStyleLabels,
-	getLabeledColorInputCreator,
+	getLabeledColorInputCreator
 } from '../../ui/utils';
 } from '../../ui/utils';
 import FormRowView from '../../ui/formrowview';
 import FormRowView from '../../ui/formrowview';
 import FormHeaderView from '../../ui/formheaderview';
 import FormHeaderView from '../../ui/formheaderview';
@@ -366,7 +366,7 @@ export default class TableCellPropertiesView extends View {
 			children: [
 			children: [
 				alignmentLabel,
 				alignmentLabel,
 				horizontalAlignmentToolbar,
 				horizontalAlignmentToolbar,
-				verticalAlignmentToolbar,
+				verticalAlignmentToolbar
 			],
 			],
 			class: 'ck-table-cell-properties-form__alignment-row'
 			class: 'ck-table-cell-properties-form__alignment-row'
 		} ) );
 		} ) );
@@ -375,7 +375,7 @@ export default class TableCellPropertiesView extends View {
 		this.children.add( new FormRowView( locale, {
 		this.children.add( new FormRowView( locale, {
 			children: [
 			children: [
 				this.saveButtonView,
 				this.saveButtonView,
-				this.cancelButtonView,
+				this.cancelButtonView
 			],
 			],
 			class: 'ck-table-form__action-row'
 			class: 'ck-table-form__action-row'
 		} ) );
 		} ) );
@@ -508,7 +508,7 @@ export default class TableCellPropertiesView extends View {
 
 
 		borderColorInput.set( {
 		borderColorInput.set( {
 			label: t( 'Color' ),
 			label: t( 'Color' ),
-			class: 'ck-table-form__border-color',
+			class: 'ck-table-form__border-color'
 		} );
 		} );
 
 
 		borderColorInput.view.bind( 'value' ).to( this, 'borderColor' );
 		borderColorInput.view.bind( 'value' ).to( this, 'borderColor' );
@@ -531,7 +531,7 @@ export default class TableCellPropertiesView extends View {
 			borderRowLabel,
 			borderRowLabel,
 			borderStyleDropdown,
 			borderStyleDropdown,
 			borderColorInput,
 			borderColorInput,
-			borderWidthInput,
+			borderWidthInput
 		};
 		};
 	}
 	}
 
 
@@ -555,7 +555,7 @@ export default class TableCellPropertiesView extends View {
 
 
 		backgroundInput.set( {
 		backgroundInput.set( {
 			label: t( 'Background' ),
 			label: t( 'Background' ),
-			class: 'ck-table-cell-properties-form__background',
+			class: 'ck-table-cell-properties-form__background'
 		} );
 		} );
 
 
 		backgroundInput.view.bind( 'value' ).to( this, 'backgroundColor' );
 		backgroundInput.view.bind( 'value' ).to( this, 'backgroundColor' );
@@ -590,7 +590,7 @@ export default class TableCellPropertiesView extends View {
 
 
 		widthInput.set( {
 		widthInput.set( {
 			label: t( 'Width' ),
 			label: t( 'Width' ),
-			class: 'ck-table-form__dimensions-row__width',
+			class: 'ck-table-form__dimensions-row__width'
 		} );
 		} );
 
 
 		widthInput.view.bind( 'value' ).to( this, 'width' );
 		widthInput.view.bind( 'value' ).to( this, 'width' );
@@ -619,7 +619,7 @@ export default class TableCellPropertiesView extends View {
 
 
 		heightInput.set( {
 		heightInput.set( {
 			label: t( 'Height' ),
 			label: t( 'Height' ),
-			class: 'ck-table-form__dimensions-row__height',
+			class: 'ck-table-form__dimensions-row__height'
 		} );
 		} );
 
 
 		heightInput.view.bind( 'value' ).to( this, 'height' );
 		heightInput.view.bind( 'value' ).to( this, 'height' );
@@ -651,7 +651,7 @@ export default class TableCellPropertiesView extends View {
 
 
 		paddingInput.set( {
 		paddingInput.set( {
 			label: t( 'Padding' ),
 			label: t( 'Padding' ),
-			class: 'ck-table-cell-properties-form__padding',
+			class: 'ck-table-cell-properties-form__padding'
 		} );
 		} );
 
 
 		paddingInput.view.bind( 'value' ).to( this, 'padding' );
 		paddingInput.view.bind( 'value' ).to( this, 'padding' );
@@ -752,7 +752,7 @@ export default class TableCellPropertiesView extends View {
 			icon: checkIcon,
 			icon: checkIcon,
 			class: 'ck-button-save',
 			class: 'ck-button-save',
 			type: 'submit',
 			type: 'submit',
-			withText: true,
+			withText: true
 		} );
 		} );
 
 
 		saveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {
 		saveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {
@@ -764,7 +764,7 @@ export default class TableCellPropertiesView extends View {
 			icon: cancelIcon,
 			icon: cancelIcon,
 			class: 'ck-button-cancel',
 			class: 'ck-button-cancel',
 			type: 'cancel',
 			type: 'cancel',
-			withText: true,
+			withText: true
 		} );
 		} );
 
 
 		cancelButtonView.delegate( 'execute' ).to( this, 'cancel' );
 		cancelButtonView.delegate( 'execute' ).to( this, 'cancel' );
@@ -787,7 +787,7 @@ export default class TableCellPropertiesView extends View {
 			left: t( 'Align cell text to the left' ),
 			left: t( 'Align cell text to the left' ),
 			center: t( 'Align cell text to the center' ),
 			center: t( 'Align cell text to the center' ),
 			right: t( 'Align cell text to the right' ),
 			right: t( 'Align cell text to the right' ),
-			justify: t( 'Justify cell text' ),
+			justify: t( 'Justify cell text' )
 		};
 		};
 	}
 	}
 
 

+ 2 - 2
packages/ckeditor5-table/src/tableproperties/tablepropertiesui.js

@@ -22,7 +22,7 @@ import {
 	lengthFieldValidator,
 	lengthFieldValidator,
 	lineWidthFieldValidator,
 	lineWidthFieldValidator,
 	repositionContextualBalloon,
 	repositionContextualBalloon,
-	defaultColors,
+	defaultColors
 } from '../ui/utils';
 } from '../ui/utils';
 import {
 import {
 	getLocalizedColorOptions,
 	getLocalizedColorOptions,
@@ -255,7 +255,7 @@ export default class TablePropertiesUI extends Plugin {
 			backgroundColor: commands.get( 'tableBackgroundColor' ).value || '',
 			backgroundColor: commands.get( 'tableBackgroundColor' ).value || '',
 			width: commands.get( 'tableWidth' ).value || '',
 			width: commands.get( 'tableWidth' ).value || '',
 			height: commands.get( 'tableHeight' ).value || '',
 			height: commands.get( 'tableHeight' ).value || '',
-			alignment: commands.get( 'tableAlignment' ).value || '',
+			alignment: commands.get( 'tableAlignment' ).value || ''
 		} );
 		} );
 	}
 	}
 
 

+ 8 - 8
packages/ckeditor5-table/src/tableproperties/ui/tablepropertiesview.js

@@ -324,7 +324,7 @@ export default class TablePropertiesView extends View {
 		this.children.add( new FormRowView( locale, {
 		this.children.add( new FormRowView( locale, {
 			children: [
 			children: [
 				this.saveButtonView,
 				this.saveButtonView,
-				this.cancelButtonView,
+				this.cancelButtonView
 			],
 			],
 			class: 'ck-table-form__action-row'
 			class: 'ck-table-form__action-row'
 		} ) );
 		} ) );
@@ -366,7 +366,7 @@ export default class TablePropertiesView extends View {
 			this.heightInput,
 			this.heightInput,
 			this.alignmentToolbar,
 			this.alignmentToolbar,
 			this.saveButtonView,
 			this.saveButtonView,
-			this.cancelButtonView,
+			this.cancelButtonView
 		].forEach( view => {
 		].forEach( view => {
 			// Register the view as focusable.
 			// Register the view as focusable.
 			this._focusables.add( view );
 			this._focusables.add( view );
@@ -455,7 +455,7 @@ export default class TablePropertiesView extends View {
 
 
 		borderColorInput.set( {
 		borderColorInput.set( {
 			label: t( 'Color' ),
 			label: t( 'Color' ),
-			class: 'ck-table-form__border-color',
+			class: 'ck-table-form__border-color'
 		} );
 		} );
 
 
 		borderColorInput.view.bind( 'value' ).to( this, 'borderColor' );
 		borderColorInput.view.bind( 'value' ).to( this, 'borderColor' );
@@ -502,7 +502,7 @@ export default class TablePropertiesView extends View {
 
 
 		backgroundInput.set( {
 		backgroundInput.set( {
 			label: t( 'Background' ),
 			label: t( 'Background' ),
-			class: 'ck-table-properties-form__background',
+			class: 'ck-table-properties-form__background'
 		} );
 		} );
 
 
 		backgroundInput.view.bind( 'value' ).to( this, 'backgroundColor' );
 		backgroundInput.view.bind( 'value' ).to( this, 'backgroundColor' );
@@ -537,7 +537,7 @@ export default class TablePropertiesView extends View {
 
 
 		widthInput.set( {
 		widthInput.set( {
 			label: t( 'Width' ),
 			label: t( 'Width' ),
-			class: 'ck-table-form__dimensions-row__width',
+			class: 'ck-table-form__dimensions-row__width'
 		} );
 		} );
 
 
 		widthInput.view.bind( 'value' ).to( this, 'width' );
 		widthInput.view.bind( 'value' ).to( this, 'width' );
@@ -566,7 +566,7 @@ export default class TablePropertiesView extends View {
 
 
 		heightInput.set( {
 		heightInput.set( {
 			label: t( 'Height' ),
 			label: t( 'Height' ),
-			class: 'ck-table-form__dimensions-row__height',
+			class: 'ck-table-form__dimensions-row__height'
 		} );
 		} );
 
 
 		heightInput.view.bind( 'value' ).to( this, 'height' );
 		heightInput.view.bind( 'value' ).to( this, 'height' );
@@ -652,7 +652,7 @@ export default class TablePropertiesView extends View {
 			icon: checkIcon,
 			icon: checkIcon,
 			class: 'ck-button-save',
 			class: 'ck-button-save',
 			type: 'submit',
 			type: 'submit',
-			withText: true,
+			withText: true
 		} );
 		} );
 
 
 		saveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {
 		saveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {
@@ -664,7 +664,7 @@ export default class TablePropertiesView extends View {
 			icon: cancelIcon,
 			icon: cancelIcon,
 			class: 'ck-button-cancel',
 			class: 'ck-button-cancel',
 			type: 'cancel',
 			type: 'cancel',
-			withText: true,
+			withText: true
 		} );
 		} );
 
 
 		cancelButtonView.delegate( 'execute' ).to( this, 'cancel' );
 		cancelButtonView.delegate( 'execute' ).to( this, 'cancel' );

+ 2 - 2
packages/ckeditor5-table/src/ui/colorinputview.js

@@ -120,7 +120,7 @@ export default class ColorInputView extends View {
 			children: [
 			children: [
 				this._inputView,
 				this._inputView,
 				this._dropdownView
 				this._dropdownView
-			],
+			]
 		} );
 		} );
 	}
 	}
 
 
@@ -170,7 +170,7 @@ export default class ColorInputView extends View {
 		dropdown.buttonView.extendTemplate( {
 		dropdown.buttonView.extendTemplate( {
 			attributes: {
 			attributes: {
 				class: 'ck-input-color__button'
 				class: 'ck-input-color__button'
-			},
+			}
 		} );
 		} );
 
 
 		dropdown.buttonView.children.add( colorPreview );
 		dropdown.buttonView.children.add( colorPreview );

+ 1 - 1
packages/ckeditor5-table/src/ui/formheaderview.js

@@ -66,7 +66,7 @@ export default class FormHeaderView extends View {
 				class: [
 				class: [
 					'ck',
 					'ck',
 					'ck-form__header__label'
 					'ck-form__header__label'
-				],
+				]
 			},
 			},
 			children: [
 			children: [
 				{ text: bind.to( 'label' ) }
 				{ text: bind.to( 'label' ) }

+ 1 - 1
packages/ckeditor5-table/src/ui/utils.js

@@ -110,7 +110,7 @@ export function getBorderStyleLabels( t ) {
 		groove: t( 'Groove' ),
 		groove: t( 'Groove' ),
 		ridge: t( 'Ridge' ),
 		ridge: t( 'Ridge' ),
 		inset: t( 'Inset' ),
 		inset: t( 'Inset' ),
-		outset: t( 'Outset' ),
+		outset: t( 'Outset' )
 	};
 	};
 }
 }
 
 

+ 1 - 1
packages/ckeditor5-table/tests/commands/mergecellcommand.js

@@ -317,7 +317,7 @@ describe( 'MergeCellCommand', () => {
 
 
 			it( 'should be false if mergeable cell is in other table section then current cell', () => {
 			it( 'should be false if mergeable cell is in other table section then current cell', () => {
 				setData( model, modelTable( [
 				setData( model, modelTable( [
-					[ '00', '01[]' ],
+					[ '00', '01[]' ]
 				], { headingColumns: 1 } ) );
 				], { headingColumns: 1 } ) );
 
 
 				expect( command.isEnabled ).to.be.false;
 				expect( command.isEnabled ).to.be.false;

+ 3 - 3
packages/ckeditor5-table/tests/tablecellproperties/ui/tablecellpropertiesview.js

@@ -36,7 +36,7 @@ const VIEW_OPTIONS = {
 			model: 'rgb(0,255,0)',
 			model: 'rgb(0,255,0)',
 			label: 'Green',
 			label: 'Green',
 			hasBorder: false
 			hasBorder: false
-		},
+		}
 	]
 	]
 };
 };
 
 
@@ -479,7 +479,7 @@ describe( 'table cell properties', () => {
 								'Align cell text to the left',
 								'Align cell text to the left',
 								'Align cell text to the center',
 								'Align cell text to the center',
 								'Align cell text to the right',
 								'Align cell text to the right',
-								'Justify cell text',
+								'Justify cell text'
 							] );
 							] );
 
 
 							expect( toolbar.items.map( ( { isOn } ) => isOn ) ).to.have.ordered.members( [
 							expect( toolbar.items.map( ( { isOn } ) => isOn ) ).to.have.ordered.members( [
@@ -518,7 +518,7 @@ describe( 'table cell properties', () => {
 							expect( toolbar.items.map( ( { label } ) => label ) ).to.have.ordered.members( [
 							expect( toolbar.items.map( ( { label } ) => label ) ).to.have.ordered.members( [
 								'Align cell text to the top',
 								'Align cell text to the top',
 								'Align cell text to the middle',
 								'Align cell text to the middle',
-								'Align cell text to the bottom',
+								'Align cell text to the bottom'
 							] );
 							] );
 
 
 							expect( toolbar.items.map( ( { isOn } ) => isOn ) ).to.have.ordered.members( [
 							expect( toolbar.items.map( ( { isOn } ) => isOn ) ).to.have.ordered.members( [

+ 2 - 2
packages/ckeditor5-table/tests/tableproperties/ui/tablepropertiesview.js

@@ -36,7 +36,7 @@ const VIEW_OPTIONS = {
 			model: 'rgb(0,255,0)',
 			model: 'rgb(0,255,0)',
 			label: 'Green',
 			label: 'Green',
 			hasBorder: false
 			hasBorder: false
-		},
+		}
 	]
 	]
 };
 };
 
 
@@ -575,7 +575,7 @@ describe( 'table properties', () => {
 					view.heightInput,
 					view.heightInput,
 					view.alignmentToolbar,
 					view.alignmentToolbar,
 					view.saveButtonView,
 					view.saveButtonView,
-					view.cancelButtonView,
+					view.cancelButtonView
 				] );
 				] );
 			} );
 			} );
 
 

+ 3 - 3
packages/ckeditor5-table/tests/ui/utils.js

@@ -190,7 +190,7 @@ describe( 'UI Utils', () => {
 				groove: 'Groove',
 				groove: 'Groove',
 				ridge: 'Ridge',
 				ridge: 'Ridge',
 				inset: 'Inset',
 				inset: 'Inset',
-				outset: 'Outset',
+				outset: 'Outset'
 			} );
 			} );
 		} );
 		} );
 	} );
 	} );
@@ -330,7 +330,7 @@ describe( 'UI Utils', () => {
 				'Groove',
 				'Groove',
 				'Ridge',
 				'Ridge',
 				'Inset',
 				'Inset',
-				'Outset',
+				'Outset'
 			] );
 			] );
 		} );
 		} );
 
 
@@ -350,7 +350,7 @@ describe( 'UI Utils', () => {
 				false,
 				false,
 				false,
 				false,
 				false,
 				false,
-				false,
+				false
 			] );
 			] );
 
 
 			view.borderStyle = 'inset';
 			view.borderStyle = 'inset';