Skip to content

Commit 4cd8734

Browse files
committed
Clarify the upgrader report
This has the potential to confuse people. If you extend the airbnb config, you get this warning: ``` * Move ecmaFeatures section under parserOptions section ``` Which I believe originates in: https://github.com/airbnb/javascript/blob/17917eedfb16ce7124c1d6c8327841d4c4b9bf48/packages/eslint-config-airbnb/rules/react.js#L5-L12 which is extended by the airbnb config. The user has no idea that this is what it's referring to, and this isn't in their control.
1 parent f1a121a commit 4cd8734

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/config_upgrader.js

+3
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ class ConfigUpgrader {
247247
if (report.length > 0 || upgrader.report.length > 0) {
248248
report = [
249249
`${bareConfigFilePath} appears to be incompatible with ESLint 3.`,
250+
"We've attempted to fix any compatibility issues.",
251+
"Note: some of these warnings may originate in configurations you are extending.",
252+
"If analysis succeeds, you have nothing to worry about.",
250253
"To upgrade it do the following:\n"
251254
].concat(report).concat(upgrader.report);
252255
}

test/config_upgrater_test.js

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ describe("ConfigUpgrader", function() {
2222
.upgradeInstructions([directory + '/.eslintrc'], directory);
2323
expect(report).to.deep.eq([
2424
".eslintrc appears to be incompatible with ESLint 3.",
25+
"We've attempted to fix any compatibility issues.",
26+
"Note: some of these warnings may originate in configurations you are extending.",
27+
"If analysis succeeds, you have nothing to worry about.",
2528
"To upgrade it do the following:\n",
2629
"* Add .yml or .json to the config file name. Extension-less config file names are deprecated."
2730
]);

0 commit comments

Comments
 (0)