Commit c46b7919 authored by Mike Greiling's avatar Mike Greiling

Remove node 6 trailing comma support

This removes trailing commas from node scripts which previously
omitted them for compatiblity with node 6
parent ea1ababa
{ {
"printWidth": 100, "printWidth": 100,
"singleQuote": true, "singleQuote": true,
"trailingComma": "es5",
"overrides": [
{
"files": ["**/app/**/*", "**/spec/**/*"],
"options": {
"trailingComma": "all" "trailingComma": "all"
}
}
]
} }
...@@ -26,7 +26,7 @@ webpackConfig.devtool = 'cheap-inline-source-map'; ...@@ -26,7 +26,7 @@ webpackConfig.devtool = 'cheap-inline-source-map';
webpackConfig.plugins.push( webpackConfig.plugins.push(
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.BABEL_ENV': JSON.stringify(process.env.BABEL_ENV || process.env.NODE_ENV || null), 'process.env.BABEL_ENV': JSON.stringify(process.env.BABEL_ENV || process.env.NODE_ENV || null),
}) }),
); );
const specFilters = argumentsParser const specFilters = argumentsParser
...@@ -37,7 +37,7 @@ const specFilters = argumentsParser ...@@ -37,7 +37,7 @@ const specFilters = argumentsParser
memo.push(filter, filter.replace(/\/?$/, '/**/*.js')); memo.push(filter, filter.replace(/\/?$/, '/**/*.js'));
return memo; return memo;
}, },
[] [],
) )
.parse(process.argv).filterSpec; .parse(process.argv).filterSpec;
...@@ -51,7 +51,7 @@ if (specFilters.length) { ...@@ -51,7 +51,7 @@ if (specFilters.length) {
root: ROOT_PATH, root: ROOT_PATH,
matchBase: true, matchBase: true,
}) })
.filter(path => path.endsWith('spec.js')) .filter(path => path.endsWith('spec.js')),
); );
// flatten // flatten
...@@ -78,8 +78,8 @@ if (specFilters.length) { ...@@ -78,8 +78,8 @@ if (specFilters.length) {
new webpack.ContextReplacementPlugin( new webpack.ContextReplacementPlugin(
/spec[\\\/]javascripts$/, /spec[\\\/]javascripts$/,
path.join(ROOT_PATH, 'spec/javascripts'), path.join(ROOT_PATH, 'spec/javascripts'),
newContext newContext,
) ),
); );
} }
......
...@@ -251,7 +251,7 @@ module.exports = { ...@@ -251,7 +251,7 @@ module.exports = {
} else { } else {
resource.request = path.join( resource.request = path.join(
ROOT_PATH, 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 = { ...@@ -267,7 +267,7 @@ module.exports = {
const missingDeps = Array.from(compilation.missingDependencies); const missingDeps = Array.from(compilation.missingDependencies);
const nodeModulesPath = path.join(ROOT_PATH, 'node_modules'); const nodeModulesPath = path.join(ROOT_PATH, 'node_modules');
const hasMissingNodeModules = missingDeps.some( const hasMissingNodeModules = missingDeps.some(
file => file.indexOf(nodeModulesPath) !== -1 file => file.indexOf(nodeModulesPath) !== -1,
); );
// watch for changes to missing node_modules // watch for changes to missing node_modules
...@@ -278,7 +278,7 @@ module.exports = { ...@@ -278,7 +278,7 @@ module.exports = {
// report our auto-generated bundle count // report our auto-generated bundle count
console.log( console.log(
`${autoEntriesCount} entries from '/pages' automatically added to webpack output.` `${autoEntriesCount} entries from '/pages' automatically added to webpack output.`,
); );
callback(); callback();
......
...@@ -13,7 +13,7 @@ if (process.platform === 'darwin') { ...@@ -13,7 +13,7 @@ if (process.platform === 'darwin') {
ensure that it is supported by the fsevents library. ensure that it is supported by the fsevents library.
You can try installing again with \`${chalk.cyan('yarn install --force')}\` You can try installing again with \`${chalk.cyan('yarn install --force')}\`
`) `),
); );
process.exit(1); process.exit(1);
} }
......
...@@ -32,7 +32,7 @@ let globDir = process.argv[3] || ''; ...@@ -32,7 +32,7 @@ let globDir = process.argv[3] || '';
if (globDir && globDir.charAt(globDir.length - 1) !== '/') globDir += '/'; if (globDir && globDir.charAt(globDir.length - 1) !== '/') globDir += '/';
console.log( 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}`); const globPatterns = matchExtensions.map(ext => `${globDir}**/*.${ext}`);
...@@ -105,7 +105,7 @@ Promise.all(matchedFiles.map(checkFileWithPrettierConfig)) ...@@ -105,7 +105,7 @@ Promise.all(matchedFiles.map(checkFileWithPrettierConfig))
.then(() => { .then(() => {
const failAction = shouldSave ? 'fixed' : 'failed'; const failAction = shouldSave ? 'fixed' : 'failed';
console.log( 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); if (didWarn) process.exit(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment