Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: init error in extending recommended config (fixes #12707) #12738

Merged
merged 6 commits into from Apr 6, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/init/autoconfig.js
Expand Up @@ -319,7 +319,7 @@ class Registry {
* This will return a new config with `"extends": "eslint:recommended"` and
* only the rules which have configurations different from the recommended config.
* @param {Object} config config object
* @returns {Object} config object using `"extends": "eslint:recommended"`
* @returns {Object} config object using `"extends": ["eslint:recommended"]`
*/
function extendFromRecommended(config) {
const newConfig = Object.assign({}, config);
Expand All @@ -333,7 +333,7 @@ function extendFromRecommended(config) {
delete newConfig.rules[ruleId];
}
});
newConfig.extends = RECOMMENDED_CONFIG_NAME;
newConfig.extends = [RECOMMENDED_CONFIG_NAME];
yeonjuan marked this conversation as resolved.
Show resolved Hide resolved
return newConfig;
}

Expand Down