Hi, first time poster here.
I'm trying to get ESLint set up to replace JSHint. I've built the attached
.eslintrc file. I've got eslint v0.12.0 installed. When I run it against
a file with known errors (double-quotes, missing semi-colon), ESLint
doesn't catch the problems. Same file run through JSHint, the errors get
caught.
-bash-4.1$ jshint UserActivityTracking.js
UserActivityTracking.js: line 362, col 20, Strings must use singlequote.
UserActivityTracking.js: line 397, col 6, Missing semicolon.
Line 362 in this file looks like this:
* var treeID = "", ATTR_CONTENT = 'content', meta;*
And the closing curly-bracket of this returned anon function is line 397:
return function (xhr) {
var headers = UserActivityTracking.setAjaxContext();
if (xhr) {
xhr.setRequestHeader(X_LINKEDIN_TRACE_DATA_CONTEXT,
headers[X_LINKEDIN_TRACE_DATA_CONTEXT]);
}
if (typeof cb === 'function') {
cb.apply(this, arguments);
}
* }*
Have I stumbled across some bugs, or do I not have my .eslintrc file set up
correctly? FWIW, this file is at the root of my directory structure where
I'm testing this code. I've tried the command as both
"eslint UserActivityTracking.js" and "eslint -c ~/.eslintrc
UserActivityTracking.js" -- no difference.
Thanks!
-Jim G
##############################
## ESLINTRC
{
"env": {
"browser": true
},
"globals": {
"LI": false,
"LIModules": false,
"Inject": false,
"_": false,
"module": false,
"require": false,
"exports": false,
"window": false,
"dust": false,
"WebTracking": false,
"Raphael": false,
"fs": false,
"Fiber": false,
"$": false,
"jQuery": false
},
"rules": {
"no-bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"guard-for-in": false,
"wrap-iife": true,
"no-use-before-define": true,
"new-cap": true,
"no-caller": true,
"no-empty": false,
"no-new": true,
"no-plusplus": false,
* "quotes": "single",*
"no-undef": true,
"no-unused-vars": true,
"strict": false,
"no-irregular-whitespace": true,
"no-trailing-spaces": true,
"no-underscore-dangle": false,
"semi": "always",
"no-cond-assign": false,
"no-debugger": false,
"no-eq-null": true,
"no-eval": false,
"no-unused-expressions": false,
"block-scoped-var": false,
"no-global-strict": false,
"no-iterator": false,
"no-loop-func": false,
"no-multi-str": true,
"no-proto": false,
"no-script-url": false,
"no-mixed-spaces-and-tabs": false,
"no-shadow": true,
"dot-notation": true,
"no-new": false,
"no-new-func": false,
"no-new-object": false,
"no-new-wrappers": false,
"no-shadow-restricted-names": false,
"comma-spacing": false,
"no-multi-spaces": false,
"space-infix-ops": false,
"key-spacing": false,
"eol-last": false
}
}
--
You received this message because you are subscribed to the Google Groups
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.