Remove node 6 trailing comma support
This removes trailing commas from node scripts which previously omitted them for compatiblity with node 6
This commit is contained in:
parent
ea1ababae2
commit
c46b791911
10
.prettierrc
10
.prettierrc
|
@ -1,13 +1,5 @@
|
|||
{
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/app/**/*", "**/spec/**/*"],
|
||||
"options": {
|
||||
"trailingComma": "all"
|
||||
}
|
||||
}
|
||||
]
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue