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

case-insensitive rule in esLintConfig is being ignored (eslint version issue?) #119

Open
codefactor opened this issue Jul 7, 2020 · 0 comments

Comments

@codefactor
Copy link

codefactor commented Jul 7, 2020

We are using a method to import eslintConfig from another project, which I will demonstrate below, so that all our projects do not need to duplicate the same eslint rules. I will try to simplify the files as much as possible

eslintproject/package.json

{
  "peerDependencies": {
    "eslint": ">= 6.8.0"
  }
}

eslintproject/index.js

module.exports = {
  "rules": {
    "sort-imports": [2, {"ignoreCase": true}]
  }
}

project/package.json

{
  "dependencies": {
    "eslint": "^7.0.0"
  },
  "eslintConfig": {
    "extends": "eslintproject"
  }
}

In the above example, the vs code extension "sort-imports" is not respecting the case insensitive rule and produces the wrong sorting that will break the eslint checks.

Here is a related line:
https://github.com/renke/import-sort/blob/master/packages/import-sort-style-eslint/src/index.ts#L28
https://github.com/renke/import-sort/blob/master/packages/import-sort-style/package.json#L27

I think this is based on an older version of eslint that doesn't support the way that it is being extended in the example above and so it doesn't see this particular rule, is it possible to upgrade to a newer version somewhere?

I would really like to use this vs code extension but it is not working for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant