Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Extends doesn't work #87

Closed
AdriVanHoudt opened this issue Jun 1, 2015 · 12 comments
Closed

Extends doesn't work #87

AdriVanHoudt opened this issue Jun 1, 2015 · 12 comments

Comments

@AdriVanHoudt
Copy link

The 'new' extends function doesn't work properly with plugins. If a plugin is defined in the extended config, the linter can't seem to find it

@iam4x iam4x added the bug label Jun 11, 2015
@maxbeatty
Copy link

I also came across this trying to extend airbnb's config.

{
  "env": {
    "es6": true,
    "node": true
  },
  "extends": "airbnb"
}

I traced it down to eslint requiring the extension. Solutions that didn't work:

  1. installing eslint-config-airbnb in ~/.atom/packages/linter-eslint (got an error similar to "Cannot read property 'match' of undefined" #128)
  2. installing eslint-config-airbnb globally
  3. trying to require before getting the config file here

Hopefully someone has a more creative solution

@iam4x
Copy link
Member

iam4x commented Jun 29, 2015

I use extends with https://github.com/ericclemmons/eslint-config-future and it's working great all I have is:

  • $ npm install --save-dev eslint eslint-config-future

In my .eslintrc

{
  "extends": "future/react"
}

What's different from me?

@maxbeatty
Copy link

I reproduced your setup in this gist and it worked great. The only differences were using a more stable version of node and npm (0.10.38 and 2.7.3 respectively). I was using 2.3.1 (iojs) and the new 3.0.0 of npm. Clearing node_modules, downgrading to npm 2.12.0, and reinstalling made everything work.

@AdriVanHoudt
Copy link
Author

I'm not using a eslint config module but just extending a config file like
"extends": "./node_modules/lab/lib/linters/eslint/.eslintrc" but I will try again with the 1.0 version this week

@iam4x
Copy link
Member

iam4x commented Jul 5, 2015

@AdriVanHoudt Working?

@AdriVanHoudt
Copy link
Author

not used Atom recently but I thought my last try of 1.0 did work yes, will test soon

@iam4x
Copy link
Member

iam4x commented Jul 5, 2015

I'll close this so, just confirm me later or open new issue 👍

@iam4x iam4x closed this as completed Jul 5, 2015
@AdriVanHoudt
Copy link
Author

so quick test and it can't find all the rules (of a plugin), I know this is something difficult since I have debugged the same issue with the author of the eslint linter of brackets, would be really nice if eslint could provide debug info of where it is looking for the plugins/rules

@iam4x iam4x reopened this Jul 6, 2015
@iam4x
Copy link
Member

iam4x commented Jul 6, 2015

@AdriVanHoudt Could you provide me an easy repro case?

@AdriVanHoudt
Copy link
Author

Basic node server with lab testing lib of which I extend the eslint config and the server has a basic eslint config:

{
    "env": {
        "node": true
    },
    "extends": "./node_modules/lab/lib/linters/eslint/.eslintrc",
    "rules": {
        "no-undef": 2
    }
}

@iam4x
Copy link
Member

iam4x commented Jul 9, 2015

Version 2.0 has been released now using CLI, please open a new issue if something is wrong.

@iam4x iam4x closed this as completed Jul 9, 2015
@AdriVanHoudt
Copy link
Author

I have eslint installed both globally and locally in project and I get

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

No branches or pull requests

3 participants