@angular-eslint/schematics
Advanced tools
Comparing version 0.7.0-alpha.6 to 0.7.0-alpha.7
@@ -114,3 +114,3 @@ "use strict"; | ||
function convertRootTSLintConfig(rootTslintJsonPath, rootEslintrcJsonPath) { | ||
return async (tree) => { | ||
return async (tree, context) => { | ||
const rawRootTslintJson = utils_1.readJsonInTree(tree, rootTslintJsonPath); | ||
@@ -174,6 +174,11 @@ const convertedRoot = await convert_to_eslint_config_1.convertToESLintConfig('tslint.json', rawRootTslintJson); | ||
* ] | ||
* | ||
* TODO: Handle communicating the unconverted TSLint rules to the user | ||
* data is available here -> convertedRoot.unconvertedTSLintRules | ||
*/ | ||
const unconvertedTSLintRuleNames = convertedRoot.unconvertedTSLintRules | ||
.filter((unconverted) => !['import-spacing', 'whitespace', 'typedef'].includes(unconverted.ruleName)) | ||
.map((unconverted) => unconverted.ruleName); | ||
if (unconvertedTSLintRuleNames.length > 0) { | ||
context.logger.warn(`\nWARNING: Within "${rootTslintJsonPath}", the following ${unconvertedTSLintRuleNames.length} rule(s) did not have known converters in https://github.com/typescript-eslint/tslint-to-eslint-config`); | ||
context.logger.warn('\n - ' + unconvertedTSLintRuleNames.join('\n- ')); | ||
context.logger.warn('\nYou will need to decide on how to handle the above manually, but everything else has been handled for you automatically.\n'); | ||
} | ||
if (convertedRootESLintConfig.rules) { | ||
@@ -202,2 +207,3 @@ delete convertedRootESLintConfig.rules['@typescript-eslint/tslint/config']; | ||
* how they were converted, so they wouldn't be cleaned up by our deduplication logic | ||
* and we have to manually remove them. | ||
*/ | ||
@@ -208,3 +214,3 @@ delete convertedRootESLintConfig.rules['@typescript-eslint/quotes']; | ||
* We have handled this in eslint-plugin recommended.json, any subtle differences that would | ||
* case the deduplication logic not to find a match can be addressed via PRs to the recommended | ||
* cause the deduplication logic not to find a match can be addressed via PRs to the recommended | ||
* config in the plugin | ||
@@ -211,0 +217,0 @@ */ |
{ | ||
"name": "@angular-eslint/schematics", | ||
"version": "0.7.0-alpha.6", | ||
"version": "0.7.0-alpha.7", | ||
"description": "Angular Schematics for angular-eslint", | ||
@@ -40,3 +40,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "05428de98e6e81344cbdd15eec8891e4b97e5f5d" | ||
"gitHead": "338ac75fcb935b4b03650ce1faae65d7a143cd8d" | ||
} |
37153
633