Skip to content

Missing extends in generated config #232

Closed
@jeremyyap

Description

@jeremyyap

🐛 Bug Report

  • tslint-to-eslint-config version: 0.2.7
  • ESLint version: 6.5.1
  • Node version: 12.10.0

Actual Behavior

extends is an empty array in the output even if there were extends in the original .eslintrc

Expected Behavior

The extends in the original .eslintrc should be retained

Reproduction

Original .eslintrc.js:

module.exports = {
  extends: ["airbnb"]
}

Output using ESLint 5:

module.exports = {
    "env": {
        "browser": true,
        "es6": true
    },
    "extends": [
        ".../node_modules/eslint-config-airbnb-base/rules/best-practices.js",
        ".../node_modules/eslint-config-airbnb-base/rules/errors.js",
        ".../node_modules/eslint-config-airbnb-base/rules/node.js",
        ".../node_modules/eslint-config-airbnb-base/rules/style.js",
        ".../node_modules/eslint-config-airbnb-base/rules/variables.js",
        ".../node_modules/eslint-config-airbnb-base/rules/es6.js",
        ".../node_modules/eslint-config-airbnb-base/rules/imports.js",
        ".../node_modules/eslint-config-airbnb-base/rules/strict.js",
        ".../node_modules/eslint-config-airbnb-base/index.js",
        ".../node_modules/eslint-config-airbnb/rules/react.js",
        ".../node_modules/eslint-config-airbnb/rules/react-a11y.js",
        "airbnb"
    ],
    ...
};

Output using ESLint 6:

module.exports = {
    "env": {
        "browser": true,
        "es6": true
    },
    "extends": [],
    ...
};

It seems that the behaviour of the --print-config flag changed in ESLint 6 and it no longer prints extends

Metadata

Metadata

Labels

status: accepting prsPlease, send in a PR to resolve this! ✨type: bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions