Skip to content

Commit 49b196d

Browse files
committed
fix linting issues
1 parent a18a4ea commit 49b196d

6 files changed

Lines changed: 40 additions & 48 deletions

File tree

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ build
44
!.*.js
55
snapshots.js
66
cypress/index.d.ts
7+
release/

.eslintrc.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ module.exports = {
1212
// Use cypress/recommended plugin for cypress tests.
1313
files: [ 'cypress/**/*.js' ],
1414
extends: [ 'plugin:cypress/recommended' ],
15-
rules: {
16-
'jest/expect-expect': [
17-
'error',
18-
{ assertFunctionNames: [ 'expect', 'cy' ] },
19-
],
20-
},
2115
},
2216
],
2317
};
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Cypress.Commands.add( 'insertButtonBlock', () => {
22
cy.searchForBlock( 'Bootstrap Button' );
3-
cy.get(
4-
'button.editor-block-list-item-wp-bootstrap-blocks-button'
5-
).click( { force: true } );
3+
cy.get( 'button.editor-block-list-item-wp-bootstrap-blocks-button' ).click(
4+
{ force: true }
5+
);
66
} );

src/column/edit.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ paddingOptions = applyFilters(
9090

9191
class BootstrapColumnEdit extends Component {
9292
render() {
93-
const {
94-
attributes,
95-
className,
96-
setAttributes,
97-
hasChildBlocks,
98-
} = this.props;
93+
const { attributes, className, setAttributes, hasChildBlocks } =
94+
this.props;
9995
const {
10096
sizeXxl,
10197
sizeXl,
@@ -333,7 +329,8 @@ class BootstrapColumnEdit extends Component {
333329
) }
334330
onChange={ ( newContentVerticalAlignment ) =>
335331
setAttributes( {
336-
contentVerticalAlignment: newContentVerticalAlignment,
332+
contentVerticalAlignment:
333+
newContentVerticalAlignment,
337334
} )
338335
}
339336
alignmentControls={ contentVerticalAlignmentControls }

src/container/edit.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,8 @@ fluidBreakpointOptions = [
8282

8383
class BootstrapContainerEdit extends Component {
8484
render() {
85-
const {
86-
attributes,
87-
className,
88-
setAttributes,
89-
hasChildBlocks,
90-
} = this.props;
85+
const { attributes, className, setAttributes, hasChildBlocks } =
86+
this.props;
9187
const { isFluid, fluidBreakpoint, marginAfter } = attributes;
9288

9389
return (

src/row/edit.js

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -383,33 +383,37 @@ class BootstrapRowEdit extends Component {
383383
title={ __( 'Change layout', 'wp-bootstrap-blocks' ) }
384384
>
385385
<ul className="wp-bootstrap-blocks-template-selector-list">
386-
{ templates.map( (
387-
template,
388-
index // eslint-disable-line no-shadow
389-
) => (
390-
<li
391-
className="wp-bootstrap-blocks-template-selector-button"
392-
key={ index }
393-
>
394-
<IconButton
395-
label={ template.title }
396-
icon={ template.icon }
397-
onClick={ () => {
398-
onTemplateChange( template.name );
399-
} }
400-
className={
401-
selectedTemplateName ===
402-
template.name
403-
? 'is-active'
404-
: null
405-
}
386+
{ templates.map(
387+
(
388+
template,
389+
index // eslint-disable-line no-shadow
390+
) => (
391+
<li
392+
className="wp-bootstrap-blocks-template-selector-button"
393+
key={ index }
406394
>
407-
<div className="wp-bootstrap-blocks-template-selector-button-label">
408-
{ template.title }
409-
</div>
410-
</IconButton>
411-
</li>
412-
) ) }
395+
<IconButton
396+
label={ template.title }
397+
icon={ template.icon }
398+
onClick={ () => {
399+
onTemplateChange(
400+
template.name
401+
);
402+
} }
403+
className={
404+
selectedTemplateName ===
405+
template.name
406+
? 'is-active'
407+
: null
408+
}
409+
>
410+
<div className="wp-bootstrap-blocks-template-selector-button-label">
411+
{ template.title }
412+
</div>
413+
</IconButton>
414+
</li>
415+
)
416+
) }
413417
</ul>
414418
</PanelBody>
415419
<PanelBody

0 commit comments

Comments
 (0)