@angular-eslint/schematics
Advanced tools
Comparing version 0.7.0-alpha.8 to 0.7.0-alpha.9
@@ -11,2 +11,11 @@ "use strict"; | ||
} | ||
/** | ||
* Make a print-config issue easier to understand for the end user. | ||
* This error could occur if, for example, the user does not have a TSLint plugin installed correctly that they | ||
* reference in their config. | ||
*/ | ||
const printConfigFailureMessageStart = 'Command failed: npx tslint --print-config "tslint.json"'; | ||
if (reportedConfiguration.message.startsWith(printConfigFailureMessageStart)) { | ||
throw new Error(`\nThere was a critical error when trying to inspect your tslint.json: \n${reportedConfiguration.message.replace(printConfigFailureMessageStart, '')}`); | ||
} | ||
throw new Error(`Unexpected error: ${reportedConfiguration.message}`); | ||
@@ -13,0 +22,0 @@ } |
@@ -319,3 +319,3 @@ "use strict"; | ||
json.devDependencies = json.devDependencies || {}; | ||
let requiresInstall = false; | ||
const pluginsToInstall = []; | ||
for (const pluginName of eslintPluginsToBeInstalled) { | ||
@@ -325,6 +325,9 @@ if (!json.devDependencies[pluginName] && | ||
json.devDependencies[pluginName] = 'latest'; | ||
requiresInstall = true; | ||
pluginsToInstall.push(pluginName); | ||
} | ||
} | ||
if (requiresInstall) { | ||
if (pluginsToInstall.length > 0) { | ||
context.logger.info('\nTo most closely match your tslint.json, the `latest` version of following eslint plugins have been installed:'); | ||
context.logger.warn('\n - ' + pluginsToInstall.join('\n - ')); | ||
context.logger.warn('\nNOTE: You may wish to pin these to a specific version number in your package.json, rather than leaving it open to `latest`.\n'); | ||
host.overwrite('package.json', JSON.stringify(json, null, 2)); | ||
@@ -331,0 +334,0 @@ context.addTask(new tasks_1.NodePackageInstallTask()); |
{ | ||
"name": "@angular-eslint/schematics", | ||
"version": "0.7.0-alpha.8", | ||
"version": "0.7.0-alpha.9", | ||
"description": "Angular Schematics for angular-eslint", | ||
@@ -40,3 +40,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "ddb3d105d98400442ba6934846e636ba5e34b090" | ||
"gitHead": "635ed52da0cd8c50545e7513c2bfc78421e298e7" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40772
687