Skip to content

Commit

Permalink
properly fixing eslint-introduced commma errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nfriedly committed Jan 9, 2017
1 parent c215099 commit b0001a8
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
"import/extensions": "off",
"jsx-a11y/no-static-element-interactions": "off",
"no-tabs": "off",
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "never",
"exports": "never",
"functions": "never", // this one was set to always or always-multiline, whic breaks gulp
}],

"import/newline-after-import": "off",
"import/no-extraneous-dependencies": ["warn", {
Expand Down
2 changes: 1 addition & 1 deletion example/src/components/ColorsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function ColorsExamples() {
// 8947848 is #888888, converted to decimal - darker
color: parseInt(Colors[c].substr(1), 16) > 8947848 ? 'black' : 'white',
}}
>{c}</li>),
>{c}</li>)
)}
</ul>
<Code language="jsx">{`
Expand Down
20 changes: 10 additions & 10 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ gulp.task('css', () =>
.pipe(gulp.dest(paths.build))
.pipe(minifyCss({ compatibility: 'ie8' }))
.pipe(rename(`css/${pkg.name}.min.css`))
.pipe(gulp.dest(paths.build)),
.pipe(gulp.dest(paths.build))
);

gulp.task('scss', () =>
gulp.src(['src/stylesheets/**/*.scss', '!src/stylesheets/main.scss'])
.pipe(gulp.dest(`${paths.build}/scss`)),
.pipe(gulp.dest(`${paths.build}/scss`))
);

// concat, minimize, uglify components into a bundle
Expand Down Expand Up @@ -102,29 +102,29 @@ gulp.task('components', () =>
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(`${paths.build}/components`))
.pipe(browserSync.stream()),
.pipe(browserSync.stream())
);

// merge ui-component images and static images in this library
gulp.task('images', () =>
gulp.src(`${paths.static}/images/**`)
.pipe(imagemin())
.pipe(gulp.dest(`${paths.build}/images`)),
.pipe(gulp.dest(`${paths.build}/images`))
);

gulp.task('prepare-site', ['build', 'example'], () =>
[
gulp.src(`${paths.build}/images/**/*`).pipe(gulp.dest('gh-pages/images')),
gulp.src(['example/**/*', '!example/src/**']).pipe(gulp.dest('gh-pages')),
],
]
);

gulp.task('gh-pages', ['prepare-site'], () =>
gulp.src('gh-pages/**/*').pipe(ghPages({ force: true })),
gulp.src('gh-pages/**/*').pipe(ghPages({ force: true }))
);

gulp.task('example-images', ['images'], () =>
gulp.src(`${paths.build}/images/**/*`).pipe(gulp.dest('example/images')),
gulp.src(`${paths.build}/images/**/*`).pipe(gulp.dest('example/images'))
);

gulp.task('example-css', () =>
Expand All @@ -137,15 +137,15 @@ gulp.task('example-css', () =>
'./node_modules/',
],
outputStyle: 'nested',
}).on('error', sass.logError),
}).on('error', sass.logError)
)
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false,
}))
.pipe(rename('bundle.css'))
.pipe(gulp.dest(paths.example_build))
.pipe(browserSync.stream()),
.pipe(browserSync.stream())
);

gulp.task('example-js', () =>
Expand All @@ -155,7 +155,7 @@ gulp.task('example-js', () =>
console.log('[browserify error]', err.message)
)
.pipe(source('bundle.js'))
.pipe(gulp.dest(paths.example_build)),
.pipe(gulp.dest(paths.example_build))
);

gulp.task('example-js-watch', ['example-js'], reloadBrowser);
Expand Down
6 changes: 3 additions & 3 deletions src/components/ArrowBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ export default React.createClass({
{ 'arrow-box_left': this.props.direction === 'left' },
{ 'arrow-box_no-arrow': this.props.direction === 'none' },
{ 'arrow-box_hidden': !this.props.show },
this.props.className,
this.props.className
)}
style={Object.assign(
directions[this.props.direction],
{ width: this.props.width },
{ height: this.props.height },
{ backgroundColor: this.props.color },
this.props.style,
this.props.style
)}
>
{ // eslint-disable-next-line react/prop-types
Expand All @@ -121,7 +121,7 @@ export default React.createClass({
className="arrow-box--arrow"
style={Object.assign(
borderStyle,
this.props.arrowStyle,
this.props.arrowStyle
)}
/>
{ this.props.icon ?
Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonsGroup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class ButtonsGroup extends React.Component {
'base--button',
'buttons-group--button',
{ 'buttons-group--button_first': index === 0 },
{ 'buttons-group--button_last': index === this.props.buttons.length - 1 },
{ 'buttons-group--button_last': index === this.props.buttons.length - 1 }
)}
style={{
width: '100%',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class Icon extends React.Component {
'icon',
this.props.className,
{ icon_large: this.props.size === 'large' },
{ icon_small: this.props.size === 'small' },
{ icon_small: this.props.size === 'small' }
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/ImagePicker/Url.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const InputImageUrl = React.createClass({
className={classNames(
'image-picker--url-input',
'base--input',
{ 'image-picker--url-input_error': this.props.error },
{ 'image-picker--url-input_error': this.props.error }
)}
onChange={this.handleInputChange}
onKeyPress={this.handleKeyPress}
Expand Down
6 changes: 3 additions & 3 deletions src/components/ImagePicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default React.createClass({
// eslint-disable-next-line
onClick={this.onClickTile.bind(null, index)}
dataId={index}
/>),
/>)
)}
{!this.props.disableFileInput ? (
<div className="image-picker--tile">
Expand All @@ -250,7 +250,7 @@ export default React.createClass({
<label
className={classNames(
'image-picker--tile-input-container',
{ 'image-picker--tile-input-container_error': this.props.fileError },
{ 'image-picker--tile-input-container_error': this.props.fileError }
)}
htmlFor="image-picker--file-input"
>
Expand All @@ -268,7 +268,7 @@ export default React.createClass({
className={classNames(
'content',
'dropzone',
{ 'dropzone_on-drag': this.state.isDragging },
{ 'dropzone_on-drag': this.state.isDragging }
)}
disableClick={this.props.disableClick}
inputProps={this.props.inputProps}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default React.createClass({
className={classNames(
'overlay',
{ hide: this.state.initialHide },
{ show: this.props.isOpen },
{ show: this.props.isOpen }
)}
>
<div className="modal" style={this.props.style || null}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default React.createClass({
className={classNames(
'text-input--input',
'base--input',
{ empty: this.state.inputWidth === padding },
{ empty: this.state.inputWidth === padding }
)}
style={{ width:
(this.state.inputWidth > padding ?
Expand Down

0 comments on commit b0001a8

Please sign in to comment.