Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit 4ac0384

Browse files
committed
fix(eslint): remove trailing commas
1 parent 5d90c47 commit 4ac0384

File tree

7 files changed

+39
-32
lines changed

7 files changed

+39
-32
lines changed

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,12 @@ module.exports = {
1414
'no-console': [0],
1515
'global-require': [0],
1616
'import/no-dynamic-require': [0],
17+
'comma-dangle': ['error', {
18+
arrays: 'never',
19+
objects: 'never',
20+
imports: 'never',
21+
exports: 'never',
22+
functions: 'never'
23+
}]
1724
},
1825
};

lib/browser-sync.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ module.exports = (gulp, config, tasks) => {
3131
snippetOptions: {
3232
rule: {
3333
match: /<\/body>/i,
34-
fn: (snippet, match) => snippet + match,
35-
},
34+
fn: (snippet, match) => snippet + match
35+
}
3636
},
3737
notify: {
3838
styles: [
@@ -48,22 +48,22 @@ module.exports = (gulp, config, tasks) => {
4848
'background-color: #1B2032',
4949
'margin: 0',
5050
'color: white',
51-
'text-align: center',
52-
],
53-
},
51+
'text-align: center'
52+
]
53+
}
5454
};
5555
if (config.browserSync.domain) {
5656
_.merge(options, {
5757
proxy: config.browserSync.domain,
5858
startPath: config.browserSync.startPath,
59-
serveStatic: config.browserSync.serveStatic || [],
59+
serveStatic: config.browserSync.serveStatic || []
6060
});
6161
} else {
6262
_.merge(options, {
6363
server: {
64-
baseDir: config.browserSync.baseDir,
64+
baseDir: config.browserSync.baseDir
6565
},
66-
startPath: config.browserSync.startPath,
66+
startPath: config.browserSync.startPath
6767
});
6868
}
6969

lib/core.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const notifier = require('node-notifier');
66
function sh(cmd, exitOnError, cb) {
77
const child = exec(cmd, {
88
encoding: 'utf8',
9-
timeout: 1000 * 60 * 3, // 3 min; just want to make sure nothing gets detached forever.
9+
timeout: 1000 * 60 * 3 // 3 min; just want to make sure nothing gets detached forever.
1010
});
1111
let stdout = '';
1212
child.stdout.on('data', (data) => {
@@ -29,7 +29,7 @@ function sh(cmd, exitOnError, cb) {
2929
notifier.notify({
3030
title: cmd,
3131
message: stdout,
32-
sound: true,
32+
sound: true
3333
});
3434
}
3535
}
@@ -79,5 +79,5 @@ module.exports = {
7979
sh,
8080
flattenArray,
8181
uniqueArray,
82-
error,
82+
error
8383
};

lib/css.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@ module.exports = (gulp, config, tasks) => {
2424
errorHandler(error) {
2525
notify.onError({
2626
title: 'CSS <%= error.name %> - Line <%= error.line %>',
27-
message: '<%= error.message %>',
27+
message: '<%= error.message %>'
2828
})(error);
2929
if (errorShouldExit) process.exit(1);
3030
this.emit('end');
31-
},
31+
}
3232
}))
3333
.pipe(gulpif(config.css.sourceMap.enabled, sourcemaps.init({
34-
debug: config.debug,
34+
debug: config.debug
3535
})))
3636
.pipe(sass({
3737
outputStyle: config.css.outputStyle,
3838
sourceComments: config.css.sourceComments,
39-
includePaths: config.css.includePaths,
39+
includePaths: config.css.includePaths
4040
}).on('error', sass.logError))
4141
.pipe(postcss(
4242
[
4343
autoprefixer({
44-
browsers: config.css.autoPrefixerBrowsers,
45-
}),
46-
],
44+
browsers: config.css.autoPrefixerBrowsers
45+
})
46+
]
4747
))
4848
.pipe(gulpif(config.css.sourceMap.enabled, sourcemaps.write((config.css.sourceMap.sourceMapEmbed) ? null : './')))
4949
.pipe(gulpif(config.css.flattenDestOutput, flatten()))
@@ -59,7 +59,7 @@ module.exports = (gulp, config, tasks) => {
5959

6060
gulp.task('clean:css', (done) => {
6161
del([
62-
join(config.css.dest, '*.{css,css.map}'),
62+
join(config.css.dest, '*.{css,css.map}')
6363
], { force: true }).then(() => {
6464
done();
6565
});
@@ -73,8 +73,8 @@ module.exports = (gulp, config, tasks) => {
7373
.pipe(stylelint({
7474
failAfterError: errorShouldExit,
7575
reporters: [
76-
{ formatter: 'string', console: true },
77-
],
76+
{ formatter: 'string', console: true }
77+
]
7878
}));
7979
}
8080

@@ -94,7 +94,7 @@ module.exports = (gulp, config, tasks) => {
9494
basePath: config.css.sassdoc.basePath,
9595
exclude: config.css.sassdoc.exclude,
9696
theme: config.css.sassdoc.theme,
97-
sort: config.css.sassdoc.sort,
97+
sort: config.css.sassdoc.sort
9898
}));
9999
}
100100

lib/icons.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = (gulp, config, tasks) => {
2828
formats: config.icons.formats,
2929
timestamp: config.icons.useTimestamp ? runTimestamp : 0,
3030
autohint: config.icons.autohint,
31-
normalize: config.icons.normalize,
31+
normalize: config.icons.normalize
3232
}));
3333
stream.pipe(gulp.dest(config.icons.dest));
3434
if (config.browserSync.enabled) {
@@ -39,11 +39,11 @@ module.exports = (gulp, config, tasks) => {
3939
const iconData = {
4040
glyphs: glyphs.map(glyph => ({ // returns the object
4141
name: glyph.name,
42-
content: glyph.unicode[0].toString(16).toUpperCase(),
42+
content: glyph.unicode[0].toString(16).toUpperCase()
4343
})),
4444
fontName: iconName,
4545
fontPath: config.icons.fontPathPrefix,
46-
classNamePrefix: config.icons.classNamePrefix,
46+
classNamePrefix: config.icons.classNamePrefix
4747
};
4848

4949
/**

lib/js.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = (gulp, config, tasks) => {
5353

5454
gulp.task('clean:js', (done) => {
5555
del([
56-
`${config.js.dest}*.{js,js.map}`,
56+
`${config.js.dest}*.{js,js.map}`
5757
], { force: true }).then(() => {
5858
done();
5959
});
@@ -78,7 +78,7 @@ module.exports = (gulp, config, tasks) => {
7878
}
7979
return path.extname(filePath) === '.js' && !(isExcluded);
8080
},
81-
includeDev: devDeps ? 'exclusive' : false, // `'exclusive'` does just devDeps w/o deps
81+
includeDev: devDeps ? 'exclusive' : false // `'exclusive'` does just devDeps w/o deps
8282
});
8383
if (files.length) {
8484
gulp.src(files)
@@ -99,7 +99,7 @@ module.exports = (gulp, config, tasks) => {
9999
if (config.js.bundleBower) {
100100
gulp.task('js:bundleBower', gulp.parallel(
101101
function bundleBowerDeps(done) { bundleBower(done); },
102-
function bundleBowerDevDeps(done) { bundleBower(done, true); },
102+
function bundleBowerDevDeps(done) { bundleBower(done, true); }
103103
));
104104

105105
const bowerBasePath = config.js.bowerBasePath || './';

lib/webpack.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Note: you can copy the template from templates/webpack.config.js.
3939
// Stats config options: https://webpack.js.org/configuration/stats/
4040
console.log(stats.toString({
4141
chunks: false, // Makes the build much quieter
42-
colors: true, // Shows colors in the console
42+
colors: true // Shows colors in the console
4343
}));
4444

4545
done(stats.hasErrors() ? core.error('Webpack Compile Failed.') : null);
@@ -62,8 +62,8 @@ Note: you can copy the template from templates/webpack.config.js.
6262

6363
webpackConfig.plugins.push(
6464
new webpack.LoaderOptionsPlugin({
65-
debug: true,
66-
}),
65+
debug: true
66+
})
6767
);
6868

6969
return webpack(webpackConfig).watch({
@@ -80,7 +80,7 @@ Note: you can copy the template from templates/webpack.config.js.
8080
// Stats config options: https://webpack.js.org/configuration/stats/
8181
console.log(stats.toString({
8282
chunks: false, // Makes the build much quieter
83-
colors: true, // Shows colors in the console
83+
colors: true // Shows colors in the console
8484
}));
8585

8686
if (config.browserSync.enabled) browserSync.get('server').reload();

0 commit comments

Comments
 (0)