Ah.

###

To change a rule setting, you must set the rule ID equal to one of these 
values:

   - 0 - turn the rule off
   - 1 - turn the rule on as a warning (doesn't affect exit code)
   - 2 - turn the rule on as an error (exit code is 1 when triggered)

###

Somehow, I totally missed that.

Thanks!

-Jim G


On Thursday, January 22, 2015 at 12:09:15 AM UTC-8, Mathias Schreck wrote:
>
> To enable a rule you have to set the value to 1 (warning) or 2 (error).
>
> Example:
>
> "rules": {
>     "no-bitwise": 2,
>     "camelcase": 2,
>     "curly": 2,
>     "eqeqeq": 2,
>     "quotes": [2, "single"]
> }
>
> Read more about configureing ESLint here: 
> http://eslint.org/docs/configuring/.
>
> 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.

Reply via email to