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

.eslintignore file is ignored #13

Closed
tschoartschi opened this issue May 6, 2015 · 24 comments
Closed

.eslintignore file is ignored #13

tschoartschi opened this issue May 6, 2015 · 24 comments
Labels

Comments

@tschoartschi
Copy link

I have a script folder inside my ember cli project. I dont want to eslint this script folder because it is just quick&dirty try-out code of prototype-ideas. Now I put a .eslintignore file into my project root, right next to .eslintrc.

But the folder is still linted... what am I doing wrong?

Thanks

@jonathanKingston
Copy link
Member

This is something that will be fixed by a upcoming top-down rewrite. Should be released in the next few days, sorry for the delay.

@tschoartschi
Copy link
Author

@jonathanKingston don't worry. I'm happy that I can use ember-cli-eslint and if I know this is an issue it's ok. I'll wait until it is fixed :-) it is good to know that it is a bug so I don't need to spend more time trying to get it work.

@jonathanKingston
Copy link
Member

@tschoartschi the latest ember-cli-eslint@latest should solve this (I'm holding off making this a full 1.0.0 release until certain all issues are over)

@ezpuzz
Copy link

ezpuzz commented May 19, 2015

"latest" doesn't seem to include index.js and there is a big tmp folder that comes with it?
actually the stable version from npm also seems to include a big tmp folder that I don't think should be there.

@jonathanKingston
Copy link
Member

Always seems to happen with index.js files being missed there is an npm issue for it. tmp is my fault which should now be resolved.

@jonathanKingston
Copy link
Member

Does npm install ember-cli-eslint@latest work for you both for this issue? @ezpuzz and @tschoartschi

@ezpuzz
Copy link

ezpuzz commented May 22, 2015

beta.9 with my .eslintignore containing

**/modules/**

works to not lint imported addons. Without it in place the modules do get linted.
beta.10 is missing index.js again.

haven't tried the .eslintignore for any other purpose though.

@jonathanKingston
Copy link
Member

I think I'm getting close to finding out what is causing that index.js issue with npm, it's an outstanding issue that has not been fixed but seems to hit me more than anyone else (which points at it being a memory issue probably).

Yeah so I think that it is fair to say we now have .eslintignore files being read fine the other issue covers the addon usage error.

@mmahalwy
Copy link

@jonathanKingston any luck with this? I am facing the same problem too

@mmahalwy
Copy link

Hmm actually when I am using the @latest, the ignore works but now it's not running the linter against my files in app/**

How come!

@mmahalwy
Copy link

Okay, discovered what I was doing wrong and that is this in my ignore
**/*.tmp/
The reason was, I didn't understand why the eslint was running the files in the tmp folder vs how master is doing it, against the files themselves...

The tests run against the test files but everything in the app is run against the tmp folder? Am I missing something?

@jonathanKingston
Copy link
Member

Sorry I'm away at the moment so not able to answer many mails.

It has been on my todo list to move where the code is linting, it was the only way I could get it to work quickly.

However yeah please use latest, once I fix this issue then we should be ok to bump to version 1.

Thanks

@mmahalwy
Copy link

Awesome! Thanks @jonathanKingston

@tschoartschi
Copy link
Author

@jonathanKingston I did a restructure of my project directory structure so I don't need the .eslintignore anymore. Because you wrote that you would bump the version to 1, maybe this issue is also interesting for you adametry/gulp-eslint#72 (comment) (I'm not sure if it is really worth to open a new issue on this)

@jonathanKingston
Copy link
Member

@tschoartschi latest version now published thanks for the heads up. Back home now so will likely work on this soon.

@ezpuzz
Copy link

ezpuzz commented Jul 20, 2015

my builds are breaking again, the .eslintignore is not being applied to the imported modules

eg.

modules/ember-rapid-forms/utils/utils.js
  2:4  error  Utils is defined but never used   no-unused-vars
  5:8  error  Use ‘===’ to compare with ‘null’  no-eq-null

✖ 2 problems (2 errors, 0 warnings)

before the output was tmp/modules/whatever but now the tmp is gone again? I'm on 0.2.5 for this.

@jonathanKingston
Copy link
Member

Try the beta again? 1.0.0-beta.14

@tschoartschi
Copy link
Author

I installed version 1.0.0 today and now my tmp folder is linted again

So I get linting errors for example this file:

/../../tmp/funnel-output_path-Mm8daVKN.tmp/routes/application.js

My eslintignore file looks as follows:

tmp/
dist/

It was fine until I upgraded. What could be the issue?

@jonathanKingston do you have any idea what I did wrong or what could cause the issue?

@yagni
Copy link

yagni commented Oct 8, 2015

@tschoartschi Check your glob syntax. I struggled with this for a bit and found out that was my problem. For example, instead of tmp/, try **/tmp/**

@BrianSipple
Copy link
Collaborator

Should be fixed by ember-cli/broccoli-lint-eslint#30

@v-shan
Copy link

v-shan commented Aug 25, 2016

Hi @BrianSipple @jonathanKingston can we get broccoli-lint-eslint bumped to get that change in? I can open the PR if needed. Thanks!

@alexlafroscia
Copy link
Collaborator

I think the .eslintignore issues might be more complex than that; see #82

@RobbieTheWagner
Copy link

Is this still an issue? I am trying to exclude tests/helpers/*.js in a .eslintignore file and it does not ignore the files.

@alexlafroscia
Copy link
Collaborator

Yup, definitely still an issue. See #82

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

No branches or pull requests

9 participants