microsoft / vscode-jshint

VSCode extension to integrate jshint into VSCode
https://marketplace.visualstudio.com/items?itemName=dbaeumer.jshint
MIT License
72 stars 48 forks source link

support include/exclude files to be linted by glob pattern #21

Closed ljqx closed 8 years ago

ljqx commented 8 years ago

Sometimes we want to include/exclude specific files to be linted. It's boring that there are lint error message for the files we don't want them to be linted.

This change contributes 2 more vscode configurations: jshint.include and jshint.exclude. These 2 configurations have same structure as files.exclude and search.exclude, use glob pattern to match files. (See Glob for node.js). Only files match one of jshint.include and none of jshint.exclude would be linted. jshint.include default to be { "**/*": true }, and jshint.exclude default to be {}. Which makes no break changes for users.

This change partly resolve #10 for language javascript/javascriptreact. User can set jshint.include to be { "**/*.es6": true, "**/*.jsx": true } to lint only .es6 and .jsx files.

msftclas commented 8 years ago

Hi @ljqx, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Zhibin Liu). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

msftclas commented 8 years ago

Hi @ljqx, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Zhibin Liu). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

kieferrm commented 8 years ago

@ljqx Thanks for your great help! I merged the request and opted for removing the 'includes' functionality to be closer to the default behavior of jshint.