Remove eslint from project generation to gain speed and keep node compat

This commit is contained in:
Alexandre Bodin 2019-10-15 16:54:23 +02:00
parent 0367a55751
commit c0683cad2f
3 changed files with 7 additions and 14 deletions

View File

@ -100,8 +100,8 @@ module.exports = async function createProject(
error: error.stderr.slice(-1024),
});
console.log(`${chalk.red('Error')} while installing dependencies:`);
console.log(error.stderr);
console.error(`${chalk.red('Error')} while installing dependencies:`);
console.error(error.stderr);
await captureStderr('didNotInstallProjectDependencies', error);

View File

@ -24,18 +24,11 @@ module.exports = opts => {
develop: 'strapi develop',
start: 'strapi start',
build: 'strapi build',
strapi: 'strapi', // Allow to use `npm run strapi` CLI,
lint: 'eslint .',
},
devDependencies: {
'babel-eslint': '^10.0.0',
eslint: '^6.3.0',
'eslint-config-airbnb': '^18.0.0',
'eslint-plugin-import': '^2.18.0',
'eslint-plugin-react': '^7.14.0',
strapi: 'strapi',
},
devDependencies: {},
dependencies: Object.assign(
{ lodash: '^4.17.5' },
{},
strapiDependencies.reduce((acc, key) => {
acc[key] = strapiVersion;
return acc;

View File

@ -5,9 +5,9 @@ module.exports = function checkBeforeInstall() {
var semver = currentNodeVersion.split('.');
var major = semver[0];
if (major < 10 || major == 11) {
if (major < 10) {
console.error(`You are running Node ${currentNodeVersion}`);
console.error('Strapi requires Node 10 or Node 12 and higher.');
console.error('Strapi requires Node 10 and higher.');
console.error('Please make sure to use the right version of Node.');
process.exit(1);
}