SimenB / stylint

Improve your Stylus code with Stylint
https://simenb.github.io/stylint/
GNU General Public License v2.0
348 stars 62 forks source link

Styling does not see .stylintignore file #393

Open alex-shamshurin opened 7 years ago

alex-shamshurin commented 7 years ago

node_modules/

eddiemonge commented 7 years ago

?? Can you provide more info please?

alex-shamshurin commented 7 years ago

It simply does not see it and linting node_modules

eddiemonge commented 7 years ago

Do you happen to use gulp-stylint to do the checking?

alex-shamshurin commented 7 years ago

No, just CLI

eddiemonge commented 7 years ago

Hmm not sure then. I see gulp-stylint rewriting the read method so stylintignore gets ignored. When I run locally, my ignore file is followed.

alex-shamshurin commented 7 years ago

Could you run it directly without gulp?

eddiemonge commented 7 years ago

I do and it follows the stylintignore rules. Its only when I use gulp that it ignores it

alex-shamshurin commented 7 years ago

What version?

eddiemonge commented 7 years ago

The latest 1.5.9

raphaelfabeni commented 7 years ago

Happening the same here. I tried both, using . stylintignore file and the inside package.json and stylint still tries to lint the files.

raphaelfabeni commented 7 years ago

@alex-shamshurin after some debug it worked. What I did:

stylint app/styles/** -c ./.stylintrc

and in my package.json I have

"stylintignore": [ "app/styles/vendors" ],

And it worked for me. Now the stylint is ignoring the vendors folder.

darrencrossley commented 6 years ago

we're also seeing this - both on our local machines and in CI - this despite having

"stylintignore": ["node_modules"], in package.json and node_modules in a .stylintignore.

hugomota commented 6 years ago

Worked for me adding the exclude:[] on the .stylintrc file.

Ex-> "exclude": ["resources/assets/stylus/vendor/*/", "node_modules/*/"],

The thing making the difference here is the "/*/" on the path...not sure why but you have to add it.

kooshywoosh commented 6 years ago

@hugomota Thanks for pointing me in the right direction, although I find your comment a bit confusing likely because of the markup. What worked for me was the following addition in .stylintrc:

"exclude": [
    "node_modules/**"
],

The two stars are necessary to include subdirectories and files within the node_modules directory.