No rule category details in output
See original GitHub issueTell us about your environment
ESLint Version: 3.16.0 Node Version: 6.10.0 npm Version: 3.10.10
What parser (default, Babel-ESLint, etc.) are you using?
default parser
Please show your full configuration:
{
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"env": {
"browser": true
, "jquery": true
, "node": true
, "es6": true
},
"globals": {
"document": false,
"navigator": false,
"window": false
},
"rules": {
// Possible Errors
// These rules relate to possible syntax or logic errors in JavaScript code:
"no-cond-assign": "error" // disallow assignment operators in conditional expressions
, "no-console": "error" // ? disallow the use of console
, "no-constant-condition": "error" // ? disallow constant expressions in conditions
, "no-control-regex": "error" // disallow control characters in regular expressions
, "no-debugger": "error" // disallow the use of debugger
, "no-dupe-args": "error" // disallow duplicate arguments in function definitions
, "no-dupe-keys": "error" // disallow duplicate keys in object literals
, "no-duplicate-case": "error" // disallow duplicate case labels
, "no-empty-character-class": "error" // disallow empty character classes in regular expressions
, "no-empty": "error" // ? disallow empty block statements
, "no-ex-assign": "error" // disallow reassigning exceptions in catch clauses
, "no-extra-boolean-cast": "error" // disallow unnecessary boolean casts
, "no-extra-semi": "error" // ? disallow unnecessary semicolons
, "no-func-assign": "error" // disallow reassigning function declarations
, "no-inner-declarations": ["error", "functions"] // disallow variable or function declarations in nested blocks
, "no-invalid-regexp": "error" // disallow invalid regular expression strings in RegExp constructors
, "no-irregular-whitespace": "error" // disallow irregular whitespace outside of strings and comments
, "no-obj-calls": "error" // disallow calling global object properties as functions
, "no-regex-spaces": "error" // disallow multiple spaces in regular expressions
, "no-sparse-arrays": "error" // disallow sparse arrays
, "no-template-curly-in-string": "error" // disallow template literal placeholder syntax in regular strings
, "no-unexpected-multiline": "error" // disallow confusing multiline expressions
, "no-unreachable": "error" // disallow unreachable code after return, throw, continue, and break statements
, "no-unsafe-finally": "error" // disallow control flow statements in finally blocks
, "use-isnan": "error" // require calls to isNaN() when checking for NaN
, "valid-typeof": ["error", { "requireStringLiterals": true }] // enforce comparing typeof expressions against valid strings
// Best Practices
// These rules relate to better ways of doing things to help you avoid problems:
, "no-case-declarations": "error" // ? disallow lexical declarations in case clauses
, "no-empty-pattern": "error" // disallow empty destructuring patterns
, "no-fallthrough": "error" // disallow fallthrough of case statements
, "no-global-assign": "error" // disallow assignments to native objects or read-only global variables
, "no-octal": "error" // disallow octal literals
, "no-redeclare": "error" // disallow variable redeclaration
, "no-self-assign": "error" // disallow assignments where both sides are exactly the same
, "no-unused-labels": "error" // ? disallow unused labels
// Variables
// These rules relate to variable declarations:
, "no-delete-var": "error" // disallow deleting variables
, "no-undef": "error" // disallow the use of undeclared variables unless mentioned in /*global */ comments
, "no-unused-vars": ["error", { "vars": "all", "args": "none" }] // disallow unused variables
// Stylistic Issues
// These rules relate to style guidelines, and are therefore quite subjective:
, "no-mixed-spaces-and-tabs": "error" // disallow mixed spaces and tabs for indentation
// ECMAScript 6
// These rules relate to ES6, also known as ES2015:
, "constructor-super": "error" // require super() calls in constructors
, "no-class-assign": "error" // disallow reassigning class members
, "no-const-assign": "error" // disallow reassigning const variables
, "no-dupe-class-members": "error" // disallow duplicate class members
, "no-new-symbol": "error" // disallow new operators with the Symbol object
, "no-this-before-super": "error" // disallow this/super before calling super() in constructors
, "require-yield": "error" // ? require generator functions to contain yield
}
}
What did you do? Please include the actual source code causing the issue.
// Unintentional assignment
var x;
if (x = 0) {
var b = 1;
}
// Practical example that is similar to an error
function setHeight(someNode) {
"use strict";
do {
someNode.height = "100px";
} while (someNode = someNode.parentNode);
}
What did you expect to happen?
I need the description and category elements in json output.
[
{
"filePath": "C:\\Virtusa Projects\\Test\\GIT\\QA_Sawani\\JavaScript\\JS_Isurika\\src\\TestESLint.js",
"messages": [
{
"ruleId": "no-unused-vars",
"severity ": 2,
"message": "'x' is assigned a value but never used.",
"line": 4,
"nodeType": "Identifier",
"description": "disallow unused variables",
"category": "Variabl es"
},
..
]
}
]
What actually happened? Please include the actual, raw output from ESLint.
[
{
"filePath": "C:\\Virtusa Projects\\Test\\GIT\\QA_Sawani\\JavaScript\\JS_Isurika\\src\\TestESLint.js",
"messages": [
{
"ruleId": "no-unused-vars",
"severity": 2,
"message": "'x' is assigned a value but never used.",
"line": 4,
"nodeType": "Identifier"
},
..
]
}
]
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
No rules fired for Output 1. Defuzzified output value set to its ...
I am facing this issue when I changed the input method for 3 inputs from Text area (Numeric) to List box. To resolve...
Read more >Creating a Rule Set - What is Decisions?
This document shows how to create and use a Conditional Rule Set in Decisions. Conditional Rule Set, are additional Rule Sets that occur ......
Read more >Troubleshoot AWS Config rules that don't work
Various issues can cause managed AWS Config rules to not work, including permissions, resource scope, or configuration change items.
Read more >IBM SPSS Modeler Apriori No rules found. Thresholds too high?
Running an Apriori model on data file made up of two fields (baskett / inidividual products) and getting the message "No rules found....
Read more >test security-policy-match shows blank output instead of "No ...
Reading through the discussions and doing my own research, I have seen it result showing "No rule matched" whereas my output is always...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@InsightLive In order to use ESLint with your project, you need to use
npm install eslint --save-dev
(for local project installation) ornpm install -g eslint
(for global installation). This assumes you’ve already runnpm init
for your project and thus created a package.json file.It’s not a good idea to move installed packages around. Instead, let NPM install the packages and let Node handle finding them by using
require("eslint")
, as Ilya recommended.Please stop by our Gitter chat if you need more help installing or configuring ESLint and we’ll do what we can!
Closing because this is working as intended.