Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Code style: fix code issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
jodator committed Feb 24, 2020
2 parents 27d15e4 + a8040cb commit 334270b
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions src/button/buttonview.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default class ButtonView extends View {
bind.if( 'isVisible', 'ck-hidden', value => !value ),
bind.to( 'isOn', value => value ? 'ck-on' : 'ck-off' ),
bind.if( 'withText', 'ck-button_with-text' ),
bind.if( 'withKeystroke', 'ck-button_with-keystroke' ),
bind.if( 'withKeystroke', 'ck-button_with-keystroke' )
],
type: bind.to( 'type', value => value ? value : 'button' ),
tabindex: bind.to( 'tabindex' ),
Expand Down Expand Up @@ -232,7 +232,7 @@ export default class ButtonView extends View {
'ck-button__label'
],
style: bind.to( 'labelStyle' ),
id: `ck-editor__aria-label_${ ariaLabelUid }`,
id: `ck-editor__aria-label_${ ariaLabelUid }`
},

children: [
Expand Down
4 changes: 2 additions & 2 deletions src/button/switchbuttonview.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class SwitchButtonView extends ButtonView {
class: [
'ck',
'ck-button__toggle'
],
]
},

children: [
Expand All @@ -88,7 +88,7 @@ export default class SwitchButtonView extends ButtonView {
class: [
'ck',
'ck-button__toggle__inner'
],
]
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/colorgrid/colorgridview.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class ColorGridView extends View {
focusPrevious: 'arrowleft',

// Navigate grid items forwards using the arrowdown key.
focusNext: 'arrowright',
focusNext: 'arrowright'
}
} );

Expand Down
2 changes: 1 addition & 1 deletion src/dropdown/dropdownview.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export default class DropdownView extends View {
buttonView.extendTemplate( {
attributes: {
class: [
'ck-dropdown__button',
'ck-dropdown__button'
]
}
} );
Expand Down
2 changes: 1 addition & 1 deletion src/editorui/bodycollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class BodyCollection extends ViewCollection {
'ck-body',
'ck-rounded-corners'
],
dir: this.locale.uiLanguageDirection,
dir: this.locale.uiLanguageDirection
},
children: this
} ).render();
Expand Down
2 changes: 1 addition & 1 deletion src/list/listview.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class ListView extends View {
focusPrevious: 'arrowup',

// Navigate toolbar items forwards using the arrowdown key.
focusNext: 'arrowdown',
focusNext: 'arrowdown'
}
} );

Expand Down
2 changes: 1 addition & 1 deletion src/panel/balloon/balloonpanelview.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ BalloonPanelView.defaultPositions = {
top: getSouthTop( targetRect, balloonRect ),
left: targetRect.right - BalloonPanelView.arrowHorizontalOffset,
name: 'arrow_nw'
} ),
} )
};

// Returns the top coordinate for positions starting with `north*`.
Expand Down
2 changes: 1 addition & 1 deletion src/panel/balloon/contextualballoon.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ class RotatorView extends View {
}
]
},
this.buttonNextView,
this.buttonNextView
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/panel/sticky/stickypanelview.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export default class StickyPanelView extends View {
'ck-sticky-panel__content',
// Toggle class of the panel when "sticky" state changes in the view.
bind.if( 'isSticky', 'ck-sticky-panel__content_sticky' ),
bind.if( '_isStickyToTheLimiter', 'ck-sticky-panel__content_sticky_bottom-limit' ),
bind.if( '_isStickyToTheLimiter', 'ck-sticky-panel__content_sticky_bottom-limit' )
],
style: {
width: bind.to( 'isSticky', isSticky => {
Expand Down
2 changes: 1 addition & 1 deletion src/toolbar/block/blockbuttonview.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class BlockButtonView extends ButtonView {
class: 'ck-block-toolbar-button',
style: {
top: bind.to( 'top', val => toPx( val ) ),
left: bind.to( 'left', val => toPx( val ) ),
left: bind.to( 'left', val => toPx( val ) )
}
}
} );
Expand Down
4 changes: 2 additions & 2 deletions src/toolbar/toolbarview.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default class ToolbarView extends View {
'ck',
'ck-toolbar',
bind.to( 'class' ),
bind.if( 'isCompact', 'ck-toolbar_compact' ),
bind.if( 'isCompact', 'ck-toolbar_compact' )
],
role: 'toolbar',
'aria-label': bind.to( 'ariaLabel' )
Expand Down Expand Up @@ -318,7 +318,7 @@ class ItemsView extends View {
class: [
'ck',
'ck-toolbar__items'
],
]
},
children: this.children
} );
Expand Down
2 changes: 1 addition & 1 deletion src/tooltip/tooltipview.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class TooltipView extends View {

children: [
{
text: bind.to( 'text' ),
text: bind.to( 'text' )
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions tests/_utils-tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe( 'utils', () => {
it( 'creates collections and regions', () => {
const view = testUtils.createTestUIView( {
foo: el => el.firstChild,
bar: el => el.lastChild,
bar: el => el.lastChild
} );

expect( view.foo._parentElement ).to.equal( document.body.firstChild );
Expand All @@ -29,7 +29,7 @@ describe( 'utils', () => {
it( 'is rendered', () => {
const view = testUtils.createTestUIView( {
foo: el => el.firstChild,
bar: el => el.lastChild,
bar: el => el.lastChild
} );

expect( view.isRendered ).to.be.true;
Expand Down
2 changes: 1 addition & 1 deletion tests/focuscycler.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ describe( 'FocusCycler', () => {
cycler = new FocusCycler( {
focusables, focusTracker, keystrokeHandler,
actions: {
focusPrevious: [ 'arrowup', 'arrowleft' ],
focusPrevious: [ 'arrowup', 'arrowleft' ]
}
} );

Expand Down
2 changes: 1 addition & 1 deletion tests/manual/tickets/228/1.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articleplugi
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ ArticlePluginSet ],
toolbar: [ 'heading' ],
toolbar: [ 'heading' ]
} )
.catch( err => console.error( err.stack ) );
4 changes: 2 additions & 2 deletions tests/panel/balloon/contextualballoon.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ describe( 'ContextualBalloon', () => {
balloon.add( {
view: viewB,
position: {
target: 'foo',
target: 'foo'
}
} );

Expand All @@ -290,7 +290,7 @@ describe( 'ContextualBalloon', () => {
const data = {
view: viewB,
position: {
target: 'foo',
target: 'foo'
}
};

Expand Down
4 changes: 2 additions & 2 deletions tests/panel/sticky/stickypanelview.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ describe( 'StickyPanelView', () => {

it( 'is false if view.isSticky is false', () => {
testUtils.sinon.stub( limiterElement, 'getBoundingClientRect' ).returns( {
top: 10,
top: 10
} );

expect( view.isSticky ).to.be.false;
Expand Down Expand Up @@ -477,7 +477,7 @@ describe( 'StickyPanelView', () => {

it( 'is not set if view.isSticky is false', () => {
testUtils.sinon.stub( limiterElement, 'getBoundingClientRect' ).returns( {
top: 10,
top: 10
} );

expect( view.isSticky ).to.be.false;
Expand Down
40 changes: 20 additions & 20 deletions tests/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe( 'Template', () => {

it( 'defines #children collection', () => {
const elementTpl = new Template( {
tag: 'p',
tag: 'p'
} );

const textTpl = new Template( {
Expand All @@ -119,7 +119,7 @@ describe( 'Template', () => {
const def = {
tag: 'p',
attributes: {
a: 'foo',
a: 'foo'
},
children: [
{
Expand Down Expand Up @@ -167,7 +167,7 @@ describe( 'Template', () => {
describe( 'DOM Node', () => {
it( 'creates HTMLElement', () => {
const el = new Template( {
tag: 'p',
tag: 'p'
} ).render();

expect( el ).to.be.instanceof( HTMLElement );
Expand Down Expand Up @@ -882,7 +882,7 @@ describe( 'Template', () => {
tag: 'p',
attributes: {
style: {
width: '20px',
width: '20px'
}
}
} );
Expand All @@ -906,7 +906,7 @@ describe( 'Template', () => {
tag: 'p',
attributes: {
style: {
left: '20px',
left: '20px'
}
}
} );
Expand Down Expand Up @@ -1224,14 +1224,14 @@ describe( 'Template', () => {
tag: 'a',
attributes: {
foo: 'af',
bar: 'ab',
bar: 'ab'
},
children: [
{
tag: 'b',
attributes: {
foo: 'bf',
bar: 'bb',
bar: 'bb'
}
}
]
Expand Down Expand Up @@ -1274,14 +1274,14 @@ describe( 'Template', () => {
tag: 'a',
attributes: {
foo: 'af',
bar: 'ab',
bar: 'ab'
},
children: [
{
tag: 'b',
attributes: {
foo: 'bf',
bar: 'bb',
bar: 'bb'
}
}
]
Expand Down Expand Up @@ -1546,7 +1546,7 @@ describe( 'Template', () => {
const template = new Template( {
tag: 'div',
children: [
viewA,
viewA
]
} );

Expand Down Expand Up @@ -1596,7 +1596,7 @@ describe( 'Template', () => {
setElement( {
tag: 'p',
on: {
x: bind.to( 'a' ),
x: bind.to( 'a' )
}
} );

Expand Down Expand Up @@ -1648,7 +1648,7 @@ describe( 'Template', () => {
{
tag: 'span',
attributes: {
'class': 'y',
'class': 'y'
},
on: {
'test@p': bind.to( 'c' )
Expand All @@ -1660,10 +1660,10 @@ describe( 'Template', () => {
{
tag: 'span',
attributes: {
'class': 'y',
'class': 'y'
}
}
],
]
}
],
on: {
Expand Down Expand Up @@ -1761,7 +1761,7 @@ describe( 'Template', () => {
}
],
on: {
x: bind.to( 'a' ),
x: bind.to( 'a' )
}
} );

Expand Down Expand Up @@ -2313,7 +2313,7 @@ describe( 'Template', () => {
const def = {
tag: 'p',
attributes: {
a: 'foo',
a: 'foo'
}
};
const ext = {
Expand Down Expand Up @@ -2470,7 +2470,7 @@ describe( 'Template', () => {
it( 'creates new - no attributes', () => {
extensionTest(
{
tag: 'p',
tag: 'p'
},
{
attributes: {
Expand Down Expand Up @@ -2711,7 +2711,7 @@ describe( 'Template', () => {
expectToThrowCKEditorError( () => {
extensionTest(
{
tag: 'p',
tag: 'p'
},
{
children: [
Expand Down Expand Up @@ -2895,7 +2895,7 @@ describe( 'Template', () => {

Template.extend( template.children[ 0 ], {
attributes: {
class: 'B',
class: 'B'
},
children: [
'B',
Expand Down Expand Up @@ -2982,7 +2982,7 @@ describe( 'Template', () => {
{
tag: 'span'
}
],
]
},
{
on: {
Expand Down

0 comments on commit 334270b

Please sign in to comment.