SamVerschueren / clinton

Project style linter
MIT License
122 stars 9 forks source link

node_modules is not in kebab case #32

Closed Scrum closed 8 years ago

Scrum commented 8 years ago

see my test

SamVerschueren commented 8 years ago

Wow, that's odd. All the files/directories in .gitignore should be ignored by clinton. Let me clone your repo and try it locally.

SamVerschueren commented 8 years ago

It seems to work locally. Does it work locally for you?

Scrum commented 8 years ago

no, i cloned my repo post-sequence, run npm i && npm t - test has passed, after i run npm rm -D clinton && npm i -D will installed clinton v.0.7.1 - test has broken and report me:

> post-sequence@0.1.3 pretest D:\sand-box\git\post-sequence
> clinton && npm run lintjs && npm run lintmd

  D:\sand-box\git\post-sequence\.nyc_output
    × Filename is not in kebab case. Rename it to `.nyc-output`. (filename-case)

  D:\sand-box\git\post-sequence\CHANGELOG.md
    × Filename is not in kebab case. Rename it to `changelog.md`. (filename-case)

  D:\sand-box\git\post-sequence\LICENSE
    × Filename is not in kebab case. Rename it to `license`. (filename-case)

  D:\sand-box\git\post-sequence\node_modules
    × Filename is not in kebab case. Rename it to `node-modules`. (filename-case)

npm ERR! Test failed.  See above for more details.
SamVerschueren commented 8 years ago

What's the output of cat .gitignore?

Scrum commented 8 years ago

I understand what the problem is )) node_modules != node_module/

Scrum commented 8 years ago
node_modules/  
.nyc_output/  
npm-debug.log  
lib/  
_gh-pages/  
.publish/  
*.sublime*  
coverage/  
tmp/  
SamVerschueren commented 8 years ago

Oh you're right. Because it uses globbing patterns, it uses node_modules/ to ignore the files inside node_modules but not the directory itself. So how should I solve this? I believe adding node_modules/ to .gitignore might be wrong. It ignores the contents inside the node_modules directory but not the directory itself. Because the directory is empty, it will not be pushed upstream. Not sure though.

@sindresorhus care to chime in?

Scrum commented 8 years ago

I believe adding node_modules/ to .gitignore might be wrong.

you right, maybe lint this or throw recommendation/warning ?

SamVerschueren commented 8 years ago

you right, maybe lint this or throw recommendation/warning ?

Good point, let me create an issue for this. Can we close this then?

Scrum commented 8 years ago

yep, thanks for you pkg 👍

SamVerschueren commented 8 years ago

You're welcome, happy to see some people starting to use it. It helps me to iron out some bugs and improve it. So if you have any ideas for other rules, or improvements whatsoever, do not hesitate to open a new issue!