Sfoglia il codice sorgente

Code style: fix code issues.

Maciej Gołaszewski 5 anni fa
parent
commit
1ac798f55f

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

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

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

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

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

@@ -25,7 +25,7 @@ import {
 	fillToolbar,
 	getBorderStyleDefinitions,
 	getBorderStyleLabels,
-	getLabeledColorInputCreator,
+	getLabeledColorInputCreator
 } from '../../ui/utils';
 import FormRowView from '../../ui/formrowview';
 import FormHeaderView from '../../ui/formheaderview';
@@ -366,7 +366,7 @@ export default class TableCellPropertiesView extends View {
 			children: [
 				alignmentLabel,
 				horizontalAlignmentToolbar,
-				verticalAlignmentToolbar,
+				verticalAlignmentToolbar
 			],
 			class: 'ck-table-cell-properties-form__alignment-row'
 		} ) );
@@ -375,7 +375,7 @@ export default class TableCellPropertiesView extends View {
 		this.children.add( new FormRowView( locale, {
 			children: [
 				this.saveButtonView,
-				this.cancelButtonView,
+				this.cancelButtonView
 			],
 			class: 'ck-table-form__action-row'
 		} ) );
@@ -508,7 +508,7 @@ export default class TableCellPropertiesView extends View {
 
 		borderColorInput.set( {
 			label: t( 'Color' ),
-			class: 'ck-table-form__border-color',
+			class: 'ck-table-form__border-color'
 		} );
 
 		borderColorInput.view.bind( 'value' ).to( this, 'borderColor' );
@@ -531,7 +531,7 @@ export default class TableCellPropertiesView extends View {
 			borderRowLabel,
 			borderStyleDropdown,
 			borderColorInput,
-			borderWidthInput,
+			borderWidthInput
 		};
 	}
 
@@ -555,7 +555,7 @@ export default class TableCellPropertiesView extends View {
 
 		backgroundInput.set( {
 			label: t( 'Background' ),
-			class: 'ck-table-cell-properties-form__background',
+			class: 'ck-table-cell-properties-form__background'
 		} );
 
 		backgroundInput.view.bind( 'value' ).to( this, 'backgroundColor' );
@@ -590,7 +590,7 @@ export default class TableCellPropertiesView extends View {
 
 		widthInput.set( {
 			label: t( 'Width' ),
-			class: 'ck-table-form__dimensions-row__width',
+			class: 'ck-table-form__dimensions-row__width'
 		} );
 
 		widthInput.view.bind( 'value' ).to( this, 'width' );
@@ -619,7 +619,7 @@ export default class TableCellPropertiesView extends View {
 
 		heightInput.set( {
 			label: t( 'Height' ),
-			class: 'ck-table-form__dimensions-row__height',
+			class: 'ck-table-form__dimensions-row__height'
 		} );
 
 		heightInput.view.bind( 'value' ).to( this, 'height' );
@@ -651,7 +651,7 @@ export default class TableCellPropertiesView extends View {
 
 		paddingInput.set( {
 			label: t( 'Padding' ),
-			class: 'ck-table-cell-properties-form__padding',
+			class: 'ck-table-cell-properties-form__padding'
 		} );
 
 		paddingInput.view.bind( 'value' ).to( this, 'padding' );
@@ -752,7 +752,7 @@ export default class TableCellPropertiesView extends View {
 			icon: checkIcon,
 			class: 'ck-button-save',
 			type: 'submit',
-			withText: true,
+			withText: true
 		} );
 
 		saveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {
@@ -764,7 +764,7 @@ export default class TableCellPropertiesView extends View {
 			icon: cancelIcon,
 			class: 'ck-button-cancel',
 			type: 'cancel',
-			withText: true,
+			withText: true
 		} );
 
 		cancelButtonView.delegate( 'execute' ).to( this, 'cancel' );
@@ -787,7 +787,7 @@ export default class TableCellPropertiesView extends View {
 			left: t( 'Align cell text to the left' ),
 			center: t( 'Align cell text to the center' ),
 			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,
 	lineWidthFieldValidator,
 	repositionContextualBalloon,
-	defaultColors,
+	defaultColors
 } from '../ui/utils';
 import {
 	getLocalizedColorOptions,
@@ -255,7 +255,7 @@ export default class TablePropertiesUI extends Plugin {
 			backgroundColor: commands.get( 'tableBackgroundColor' ).value || '',
 			width: commands.get( 'tableWidth' ).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, {
 			children: [
 				this.saveButtonView,
-				this.cancelButtonView,
+				this.cancelButtonView
 			],
 			class: 'ck-table-form__action-row'
 		} ) );
@@ -366,7 +366,7 @@ export default class TablePropertiesView extends View {
 			this.heightInput,
 			this.alignmentToolbar,
 			this.saveButtonView,
-			this.cancelButtonView,
+			this.cancelButtonView
 		].forEach( view => {
 			// Register the view as focusable.
 			this._focusables.add( view );
@@ -455,7 +455,7 @@ export default class TablePropertiesView extends View {
 
 		borderColorInput.set( {
 			label: t( 'Color' ),
-			class: 'ck-table-form__border-color',
+			class: 'ck-table-form__border-color'
 		} );
 
 		borderColorInput.view.bind( 'value' ).to( this, 'borderColor' );
@@ -502,7 +502,7 @@ export default class TablePropertiesView extends View {
 
 		backgroundInput.set( {
 			label: t( 'Background' ),
-			class: 'ck-table-properties-form__background',
+			class: 'ck-table-properties-form__background'
 		} );
 
 		backgroundInput.view.bind( 'value' ).to( this, 'backgroundColor' );
@@ -537,7 +537,7 @@ export default class TablePropertiesView extends View {
 
 		widthInput.set( {
 			label: t( 'Width' ),
-			class: 'ck-table-form__dimensions-row__width',
+			class: 'ck-table-form__dimensions-row__width'
 		} );
 
 		widthInput.view.bind( 'value' ).to( this, 'width' );
@@ -566,7 +566,7 @@ export default class TablePropertiesView extends View {
 
 		heightInput.set( {
 			label: t( 'Height' ),
-			class: 'ck-table-form__dimensions-row__height',
+			class: 'ck-table-form__dimensions-row__height'
 		} );
 
 		heightInput.view.bind( 'value' ).to( this, 'height' );
@@ -652,7 +652,7 @@ export default class TablePropertiesView extends View {
 			icon: checkIcon,
 			class: 'ck-button-save',
 			type: 'submit',
-			withText: true,
+			withText: true
 		} );
 
 		saveButtonView.bind( 'isEnabled' ).toMany( fieldsThatShouldValidateToSave, 'errorText', ( ...errorTexts ) => {
@@ -664,7 +664,7 @@ export default class TablePropertiesView extends View {
 			icon: cancelIcon,
 			class: 'ck-button-cancel',
 			type: 'cancel',
-			withText: true,
+			withText: true
 		} );
 
 		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: [
 				this._inputView,
 				this._dropdownView
-			],
+			]
 		} );
 	}
 
@@ -170,7 +170,7 @@ export default class ColorInputView extends View {
 		dropdown.buttonView.extendTemplate( {
 			attributes: {
 				class: 'ck-input-color__button'
-			},
+			}
 		} );
 
 		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: [
 					'ck',
 					'ck-form__header__label'
-				],
+				]
 			},
 			children: [
 				{ text: bind.to( 'label' ) }

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

@@ -110,7 +110,7 @@ export function getBorderStyleLabels( t ) {
 		groove: t( 'Groove' ),
 		ridge: t( 'Ridge' ),
 		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', () => {
 				setData( model, modelTable( [
-					[ '00', '01[]' ],
+					[ '00', '01[]' ]
 				], { headingColumns: 1 } ) );
 
 				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)',
 			label: 'Green',
 			hasBorder: false
-		},
+		}
 	]
 };
 
@@ -479,7 +479,7 @@ describe( 'table cell properties', () => {
 								'Align cell text to the left',
 								'Align cell text to the center',
 								'Align cell text to the right',
-								'Justify cell text',
+								'Justify cell text'
 							] );
 
 							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( [
 								'Align cell text to the top',
 								'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( [

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

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

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

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