peol / brackets-eslint

Use https://github.com/zaggino/brackets-eslint instead [DEPRECATED] ESLint support in Adobe Brackets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't report covered Vars

JeffryBooher opened this issue · comments

This extension does not report vars covered by child-scope.

var comp,
     activeComp = _.find(document.comps, function (comp) {
            return comp.appearance;
     });

It only reports the no-unused-vars error on line 1 it does not report the no-shadow error on line 2 even though this is not turned off in my .eslintrc file:

{
    "env": {
        "node": true
    },
    "rules": {
        "no-underscore-dangle": 0,
        "no-multi-spaces": 0,
        "no-trailing-spaces": 0
    }
}

This extension doesn't modify ESLint in any way, I can't see how that's an extension issue. If you use ESLint version 0.14.1 in CLI, does it warn? Do you have any inherited .eslintrc settings?

no inherited settings. i'm using it straight out of the box -- are you installing your own node modules or relying on what the user has installed globally?

I see the extension is dependant on eslint "^0.14.1"; so i'm not sure why it doesn't report the error. I switched to another Brackets ES Lint extension that does report the error -- his is dependant on "0.14.x" ; not sure why his reports it and yours doesn't.

BTW: I'm reporting this from the Gulp ESLint plugin (gulp.eslint) that depends on ESLint "^0.13.0" still not sure why yours doesn't report it. Gulp is using 0.13.0, the ES Lint extension that reports the error is using ESLint 0.14.1 as is yours. You might give it a try and see if you can reproduce the error.

I just tried it locally, mine does warn:
[no-shadow] comp is already declared in the upper scope. activeComp = _.find(document.comps, function (comp) {
`

Since I cannot reproduce and I cannot see a reason why it shouldn't work (since we're basically just feeding ESLint options and get a list of errors back), I'm closing this. If you have additional info that might make it reproducible, feel free to update/re-open this issue.