.jshintrc
JSHint configuration file
| Type | object |
|---|---|
| File match |
.jshintrc
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/jshintrc/latest.json |
| Source | https://www.schemastore.org/jshintrc.json |
Validate with Lintel
npx @lintel/lintel check
Properties
Prohibit the use of bitwise operators (&, |, ^, etc.)
Requires you to always put curly braces around blocks in loops and conditionals
Prohibits the use of == and != in favor of === and !==
The ECMAScript version to which the code must adhere
Requires all for in loops to filter object's items with obj.hasOwnProperty()
Prohibits overwriting prototypes of native objects such as Array, Date and so on
Suppresses warnings about declaring variables inside of control structures while accessing them later from the outside
Enables warnings about the use of identifiers which are defined in future versions of JavaScript
Suppresses warnings about the iterator property.
Prohibits the use of a variable before it was defined
Prohibits unnecessary clauses within switch statements
Max cyclomatic complexity per function
Max depth of nested blocks
Maximum amount of warnings JSHint will produce before giving up
Max number of formal parameters allowed per function
Max number statements per function
Prohibits the use of arguments.caller and arguments.callee
Prohibits the use of the comma operator
Warns about non-breaking whitespace characters
Prohibits the use of constructors for side-effects (without assignment)
Suppresses warnings about invalid typeofoperator values
Async functions resolve on their return value. In most cases, this makes returning the result of an AwaitExpression (which is itself a Promise instance) unnecessary
Enables warnings for regular expressions which do not include the 'u' flag
Suppresses warnings about variable shadowing. i.e. declaring a variable that had been already declared somewhere in the outer scope
Prohibits the use of the grouping operator when it is not strictly required.
Requires all code to run in ES5 strict mode
Warns when a comma is not placed after the last element in an array or object literal
Prohibits the use of explicitly undeclared variables
Warns when you define and never use your variables
Forbids the use of VariableStatements (var) in favor of let and const
Suppresses warnings about missing semicolons
Suppresses warnings about the use of assignments in cases where comparisons are expected
Suppresses warnings about the debugger statements in your code
Tells JSHint that your code uses ES3 array elision elements, or empty elements
Suppresses warnings about == null comparisons
Suppresses warnings about the use of eval
Suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls
Suppresses warnings about missing semicolons, but only when the semicolon is omitted for the last statement in a one-line block
Suppresses warnings about functions inside of loops
Tells JSHint that your code uses Mozilla JavaScript extensions
Suppresses warnings about generator functions with no yield statement in them
Prohibits the use of ++ and --
Suppresses warnings about the __proto__ property
Suppresses warnings about the use of script-targeted URLs
Suppresses warnings about constructions like new function () { ... }; and new Object;
Suppresses warnings about possible strict violations when the code is running in strict mode and you use this in a non-constructor function
Suppresses warnings about the use of the with statement
[Environment] Web Browser (window, document, etc)
[Environment] Browserify
[Environment] CouchDB
[Environment] Development/debugging (alert, confirm, etc)
[Environment] Dojo Toolkit
[Environment] Jasmine unit testing framework
[Environment] jQuery
[Environment] Mocha unit testing framework
[Environment] ES6 module
[Environment] MooTools
[Environment] Node.js
[Environment] Widely adopted globals (escape, unescape, etc)
[Environment] PhantomJS runtime environment
[Environment] Prototype JavaScript framework
[Environment] Rhino
[Environment] Defines globals exposed by the ShellJS library
[Environment] Defines globals for typed array constructors
[Environment] Web Workers
[Environment] Windows Scripting Host
[Environment] Yahoo User Interface
Specify a white list of global variables that are not formally defined in the source code
Specify the path to another configuration file to use as a base, relative to the current file
Specify the options that should only be applied to files matching a given path pattern