Comments (15)
Your exclude
glob is excluding directories, not files.
Try exclude: ['src/thirdparty/**/*', 'src/widgets/**/*'],
.
from grunt-jslint.
It's nothing with the exclude
even if I delete it throws the same error, seems like **
is not supported. When I do this:
src: ['*.js', 'src/*.js', 'src/*/*.js', 'src/*/*/*.js', 'src/*/*/*/*.js'],
I get it fine
317 files scanned.
from grunt-jslint.
You can try it here:
git clone -b zaggino/grunt-jslint https://github.com/adobe/brackets.git
from grunt-jslint.
hmm... it seems to work for me:
$ grunt jslint --no-color > log
$ tail log
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/tests/jquery-1.7.2.js:48:2 Expected 'trimRight' at column 17, not column 2.
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/tests/jquery-1.7.2.js:50:1 Use spaces, not tabs.
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/tests/jquery-1.7.2.js:51:1 Use spaces, not tabs.
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/tests/jquery-1.7.2.js:51:2 Expected 'rsingleTag' at column 17, not column 2.
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/tests/jquery-1.7.2.js:53:1 Use spaces, not tabs.
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/tests/jquery-1.7.2.js:53:1 Too many errors. (0% scanned).
# JSLint failed, 26005 violations in 953. 989 files scanned.
from grunt-jslint.
Ah yes, it works immediately after the clone - sorry.
When you do git submodule update --init
it stops working :)
JSHint works fine so I guess it will be some exception when traversing the directories.
from grunt-jslint.
Yeah, you're using exclude
wrong. Don't exclude directories, but files instead.
Apply this patch to your repository:
diff --git a/Gruntfile.js b/Gruntfile.js
index c762065..56416a3 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -294,7 +294,7 @@ module.exports = function (grunt) {
jslint: {
client: {
src: ['*.js', 'src/**/*.js'],
- exclude: ['src/thirdparty/*', 'src/widgets/*'],
+ exclude: ['src/thirdparty/**/*.js', 'src/widgets/**/*.js'],
directives: {
"vars": true,
"plusplus": true,
from grunt-jslint.
btw, after the patch:
$ grunt jslint --no-color > log
$ tail log
src/extensions/default/JavaScriptCodeHints/thirdparty/tern/test/cases/hint_ecma5.js:33:1 'a3' was used before it was defined.
src/extensions/default/JavaScriptCodeHints/thirdparty/tern/test/cases/hint_ecma5.js:35:1 Expected 'var' at column 5, not column 1.
src/extensions/default/JavaScriptCodeHints/thirdparty/tern/test/cases/hint_ecma5.js:35:1 Too many errors. (8% scanned).
FAIL src/extensions/default/JavaScriptCodeHints/thirdparty/tern/test/cases/hint_simple.js (2)
src/extensions/default/JavaScriptCodeHints/thirdparty/tern/test/cases/hint_simple.js:2:1 Expected an identifier and instead saw 'x'.
src/extensions/default/JavaScriptCodeHints/thirdparty/tern/test/cases/hint_simple.js:2:1 Stopping. (18% scanned).
# JSLint failed, 26905 violations in 1053. 1094 files scanned.
Done, without errors.
from grunt-jslint.
Ah thanks.
Another thing - can I give you a PR to specify a custom JSLint.js
file in the grunt options?
from grunt-jslint.
I believe that's already in the works, but a PR would be appreciated.
/cc @smikes
from grunt-jslint.
I was asking because I really could use it and #34 hasn't been updated for 3 months
from grunt-jslint.
Go for it ;)
FYI, https://github.com/stephenmathieson/grunt-jslint/blob/master/lib/jslint.js#L52 may solve your problem
from grunt-jslint.
Which edition do you need? If it's not one that's present in node-jslint, I can add it for you.
from grunt-jslint.
We already include JSLint file with Brackets and it makes more sense to us just to specify a path to this file inside our project.
from grunt-jslint.
OK. If you're going to put in a PR please have it use an absolute path, since the loading is delegated to a dependency of grunt-jslint; if it were a relative path, it would need to be relative to the node_modules/jslint/lib subdirectory, which is more complexity than I want to expose.
from grunt-jslint.
PR is up, I'm not 100% sure what you meant by absolute path
, please review.
from grunt-jslint.
Related Issues (20)
- Travis build fails for current node 0.11 HOT 5
- Use node-jslint rather than a submodule HOT 9
- Passing es5 -- Not Catching Trailing Commas HOT 8
- Non-trivial exclude rules take forever to filter.
- Remove shelljs dep
- exclude array is ignored HOT 7
- Honor excludes, but use faster algorithm HOT 5
- Reading and removing BOM from UTF8 file HOT 3
- Options.edition with the aboslute path didn't work HOT 7
- Changes to node-jslint HOT 3
- node-jslint will require node 0.8 HOT 1
- How to set jslint options... HOT 1
- Warning: grunt-jslint's interface has changed HOT 2
- Ignore specific warnings HOT 4
- Request - option to run custom function if JSLint fails HOT 1
- Why is this error been thrown when I run jslint using grunt to improve my code quality? HOT 2
- Exclude is not working ... HOT 14
- will it be updated? HOT 9
- array.forEach is not a function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-jslint.