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

Overrides do not work with extends/package.json #9025

Closed
milesj opened this issue Jul 28, 2017 · 2 comments
Closed

Overrides do not work with extends/package.json #9025

milesj opened this issue Jul 28, 2017 · 2 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion triage An ESLint team member will look at this issue soon

Comments

@milesj
Copy link

milesj commented Jul 28, 2017

Tell us about your environment

  • ESLint Version: 4.3
  • Node Version: 8.2.1
  • npm Version: 5.3.0
  • Yarn version: 0.27.5

What parser (default, Babel-ESLint, etc.) are you using?

babel-eslint

Please show your full configuration:

https://github.com/milesj/build-tool-config/blob/master/eslint.node.json5

What did you do? Please include the actual source code causing the issue.

Overrides are not respected when they exist in a configuration file that is extended from.

overrides: [
    {
      files: ['tests/**/*.test.js'],
      plugins: ['jest'],
      env: {
        jest: true,
      },
      rules: {
        'no-magic-numbers': 'off',
        'jest/no-identical-title': 'error',
        'jest/valid-expect': 'error',
      },
    },
],

What did you expect to happen?

Overrides work.

What actually happened? Please include the actual, raw output from ESLint.

None of the settings or rules in the overrides block are inherited. I believe the issue is that override globs are relative to the configuration file path, instead of the current working directory.

If I extend from a config file, or from package.json, overrides are broken. For example: https://github.com/milesj/interweave/blob/master/package.json#L68

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jul 28, 2017
@milesj milesj changed the title Overrides does not work with extends/package.json Overrides do not work with extends/package.json Jul 28, 2017
@not-an-aardvark
Copy link
Member

Closing as a duplicate of #8813

@not-an-aardvark not-an-aardvark marked this as a duplicate of #8813 Jul 28, 2017
@milesj
Copy link
Author

milesj commented Jul 28, 2017

Cheers!

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion triage An ESLint team member will look at this issue soon
Projects
None yet
Development

No branches or pull requests

3 participants