diff --git a/.prettierrc b/.prettierrc index 3384551aea52e685c72c9e48a96b3d7ef15a7fe1..5e2863a11f688a194ff86f649a89e501ff8e53d5 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,13 +1,5 @@ { "printWidth": 100, "singleQuote": true, - "trailingComma": "es5", - "overrides": [ - { - "files": ["**/app/**/*", "**/spec/**/*"], - "options": { - "trailingComma": "all" - } - } - ] + "trailingComma": "all" } diff --git a/config/karma.config.js b/config/karma.config.js index e1d7c30b1c2aa5ae23a9ab5af8fd2a9146d89841..b90b20c26da67e461de6e9032a904d7e81bf8317 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -26,7 +26,7 @@ webpackConfig.devtool = 'cheap-inline-source-map'; webpackConfig.plugins.push( new webpack.DefinePlugin({ 'process.env.BABEL_ENV': JSON.stringify(process.env.BABEL_ENV || process.env.NODE_ENV || null), - }) + }), ); const specFilters = argumentsParser @@ -37,7 +37,7 @@ const specFilters = argumentsParser memo.push(filter, filter.replace(/\/?$/, '/**/*.js')); return memo; }, - [] + [], ) .parse(process.argv).filterSpec; @@ -51,7 +51,7 @@ if (specFilters.length) { root: ROOT_PATH, matchBase: true, }) - .filter(path => path.endsWith('spec.js')) + .filter(path => path.endsWith('spec.js')), ); // flatten @@ -78,8 +78,8 @@ if (specFilters.length) { new webpack.ContextReplacementPlugin( /spec[\\\/]javascripts$/, path.join(ROOT_PATH, 'spec/javascripts'), - newContext - ) + newContext, + ), ); } diff --git a/config/webpack.config.js b/config/webpack.config.js index 64e6ec492199b48c5878a6a90a3d22d553616b63..11970b620bc9a4cdd7e3374ba351fcb1aae56fc7 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -251,7 +251,7 @@ module.exports = { } else { resource.request = path.join( ROOT_PATH, - 'app/assets/javascripts/vue_shared/components/empty_component.js' + 'app/assets/javascripts/vue_shared/components/empty_component.js', ); } }), @@ -267,7 +267,7 @@ module.exports = { const missingDeps = Array.from(compilation.missingDependencies); const nodeModulesPath = path.join(ROOT_PATH, 'node_modules'); const hasMissingNodeModules = missingDeps.some( - file => file.indexOf(nodeModulesPath) !== -1 + file => file.indexOf(nodeModulesPath) !== -1, ); // watch for changes to missing node_modules @@ -278,7 +278,7 @@ module.exports = { // report our auto-generated bundle count console.log( - `${autoEntriesCount} entries from '/pages' automatically added to webpack output.` + `${autoEntriesCount} entries from '/pages' automatically added to webpack output.`, ); callback(); diff --git a/scripts/frontend/postinstall.js b/scripts/frontend/postinstall.js index 682039a41b353998595abb93c779ea1460c27653..94977e459e301ec67a1c607f218fff5ec0aed4aa 100644 --- a/scripts/frontend/postinstall.js +++ b/scripts/frontend/postinstall.js @@ -13,7 +13,7 @@ if (process.platform === 'darwin') { ensure that it is supported by the fsevents library. You can try installing again with \`${chalk.cyan('yarn install --force')}\` - `) + `), ); process.exit(1); } diff --git a/scripts/frontend/prettier.js b/scripts/frontend/prettier.js index ffb09ea9779bfd1bbd066bddde16fe9ea4b41c4f..bf0e98da1392ed9ed9330204c9bc6c7187f39655 100644 --- a/scripts/frontend/prettier.js +++ b/scripts/frontend/prettier.js @@ -32,7 +32,7 @@ let globDir = process.argv[3] || ''; if (globDir && globDir.charAt(globDir.length - 1) !== '/') globDir += '/'; console.log( - `Loading all ${allFiles ? '' : 'staged '}files ${globDir ? `within ${globDir} ` : ''}...` + `Loading all ${allFiles ? '' : 'staged '}files ${globDir ? `within ${globDir} ` : ''}...`, ); const globPatterns = matchExtensions.map(ext => `${globDir}**/*.${ext}`); @@ -105,7 +105,7 @@ Promise.all(matchedFiles.map(checkFileWithPrettierConfig)) .then(() => { const failAction = shouldSave ? 'fixed' : 'failed'; console.log( - `\nSummary:\n ${matchedCount} files processed (${passedCount} passed, ${failedCount} ${failAction}, ${ignoredCount} ignored)\n` + `\nSummary:\n ${matchedCount} files processed (${passedCount} passed, ${failedCount} ${failAction}, ${ignoredCount} ignored)\n`, ); if (didWarn) process.exit(1);