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

Support .jshintignore files #22

Closed
kieferrm opened this issue Apr 22, 2016 · 9 comments
Closed

Support .jshintignore files #22

kieferrm opened this issue Apr 22, 2016 · 9 comments
Assignees

Comments

@kieferrm
Copy link
Member

We should respect .jshintignore files as described in http://jshint.com/docs/cli/

@kieferrm
Copy link
Member Author

@kieferrm
Copy link
Member Author

kieferrm commented May 4, 2016

Closed with 49b9258.

@kieferrm kieferrm closed this as completed May 4, 2016
@baelter
Copy link

baelter commented Mar 21, 2018

Can't get this to work,

Putting

**/*

in .jshintignore and all files are linted.

vscode: 1.21.1
vscode-jshint: 0.10.17
jshint: 2.9.5

@osya
Copy link

osya commented May 29, 2018

@baelter , confirm that .jshintignore support in vscode-jshint is not worked as expected.

Projects structure:

  • app - src - index.jsx

Step to reproduce

  1. Add to user settings
"jshint.exclude": {
    "**/*.jsx": true
},

index.jsx for jshint ignored. It is as expected
2. Add an empty file .jshintignore to the project root and restart VS Code
index.jsx for jshint is NOT igored. It is a bug
3. Add src/** in the .jshintignore file and restart VS Code
index.jsx is ignored in PyCharm - so .jshintignore is correct. In VS Code index.jsx for jshint is NOT igored. It is a bug
4. Remove jshint.exclude from user settings and restart VS Code
index.jsx for jshint is NOT igored. It is a bug

vscode: 1.23.1
vscode-jshint: 0.10.18
jshint: 2.9.5

@RMacfarlane RMacfarlane assigned RMacfarlane and unassigned kieferrm May 29, 2018
@RMacfarlane RMacfarlane reopened this May 29, 2018
@RMacfarlane
Copy link
Contributor

RMacfarlane commented Jun 4, 2018

@baelter @osya Thanks for reporting and the clear steps to reproduce! There was an issue with caching that I just checked in a fix for. The extension maintains a cache for excludes that was correctly being cleared when the ignore file updated, but there was also a cache being maintained by a parsing library that didn't ever get reset. I'll publish a new version of the extension soon.

@RMacfarlane
Copy link
Contributor

@baelter @osya Just published a new version of the extension. Please give it a try

@osya
Copy link

osya commented Jun 10, 2018

@RMacfarlane , thank you for your attention. I just checked. But the issue still exists.

vscode: 1.24.0
vscode-jshint: 0.10.19
jshint: 2.9.5

@RMacfarlane
Copy link
Contributor

@osya Hmm, I've tried your steps above with the versions you listed and it works for me. Could you share your settings?

@osya
Copy link

osya commented Jun 12, 2018

@RMacfarlane , sorry. It works. I just added the content **/*.jsx to the file .jshintignore and then jshint begins ignoring *.jsx files. Empty file .jshintignore with the user setting

"jshint.exclude": {
    "**/*.jsx": true
},

does not ignore *.jsx files. It seems it is correct

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

No branches or pull requests

4 participants