.jshintrc
JSHint configuration file
.jshintrc
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
.jshintrc and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
bitwise | boolean | Prohibit the use of bitwise operators (&, |, ^, etc.) default: false |
curly | boolean | Requires you to always put curly braces around blocks in loops and conditionals default: false |
eqeqeq | boolean | Prohibits the use of `==` and `!=` in favor of `===` and `!==` default: false |
esversion | integer | The ECMAScript version to which the code must adhere default: 5one of: 3, 5, 6, 7, 8, 9 … (+2) |
forin | boolean | Requires all `for in` loops to filter object's items with obj.hasOwnProperty() default: false |
freeze | boolean | Prohibits overwriting prototypes of native objects such as Array, Date and so on default: false |
funcscope | boolean | Suppresses warnings about declaring variables inside of control structures while accessing them later from the outside default: false |
futurehostile | boolean | Enables warnings about the use of identifiers which are defined in future versions of JavaScript default: false |
iterator | boolean | Suppresses warnings about the __iterator__ property. default: false |
latedef | enum | Prohibits the use of a variable before it was defined default: falseone of: true, false, "nofunc" |
leanswitch | boolean | Prohibits unnecessary clauses within `switch` statements default: false |
maxcomplexity | anyOf | Max cyclomatic complexity per function default: false |
maxdepth | anyOf | Max depth of nested blocks default: false |
maxerr | integer | Maximum amount of warnings JSHint will produce before giving up default: 50 |
maxparams | anyOf | Max number of formal parameters allowed per function |
maxstatements | anyOf | Max number statements per function default: false |
noarg | boolean | Prohibits the use of `arguments.caller` and `arguments.callee` default: false |
nocomma | boolean | Prohibits the use of the comma operator default: false |
nonbsp | boolean | Warns about `non-breaking whitespace` characters default: false |
nonew | boolean | Prohibits the use of constructors for side-effects (without assignment) default: false |
notypeof | boolean | Suppresses warnings about invalid `typeof`operator values default: false |
noreturnawait | boolean | 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 default: false |
regexpu | boolean | Enables warnings for regular expressions which do not include the 'u' flag default: false |
shadow | anyOf | Suppresses warnings about variable shadowing. i.e. declaring a variable that had been already declared somewhere in the outer scope default: false |
singleGroups | boolean | Prohibits the use of the grouping operator when it is not strictly required. default: false |
strict | anyOf | Requires all code to run in ES5 strict mode default: false |
trailingcomma | boolean | Warns when a comma is not placed after the last element in an array or object literal default: false |
undef | boolean | Prohibits the use of explicitly undeclared variables default: false |
unused | anyOf | Warns when you define and never use your variables default: false |
varstmt | boolean | Forbids the use of VariableStatements (`var`) in favor of `let` and `const` default: false |
asi | boolean | Suppresses warnings about missing semicolons default: false |
boss | boolean | Suppresses warnings about the use of assignments in cases where comparisons are expected default: false |
debug | boolean | Suppresses warnings about the `debugger` statements in your code default: false |
elision | boolean | Tells JSHint that your code uses ES3 array elision elements, or empty elements default: false |
eqnull | boolean | Suppresses warnings about `== null` comparisons default: false |
evil | boolean | Suppresses warnings about the use of `eval` default: false |
expr | boolean | Suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls default: false |
lastsemic | boolean | Suppresses warnings about missing semicolons, but only when the semicolon is omitted for the last statement in a one-line block default: false |
loopfunc | boolean | Suppresses warnings about functions inside of loops default: false |
moz | boolean | Tells JSHint that your code uses Mozilla JavaScript extensions default: false |
noyield | boolean | Suppresses warnings about generator functions with no `yield` statement in them default: false |
plusplus | boolean | Prohibits the use of `++` and `--` default: false |
proto | boolean | Suppresses warnings about the `__proto__` property default: false |
scripturl | boolean | Suppresses warnings about the use of script-targeted URLs default: false |
supernew | boolean | Suppresses warnings about constructions like `new function () { ... };` and `new Object;` default: false |
validthis | boolean | Suppresses warnings about possible strict violations when the code is running in strict mode and you use `this` in a non-constructor function default: false |
withstmt | boolean | Suppresses warnings about the use of the `with` statement default: false |
browser | boolean | [Environment] Web Browser (window, document, etc) default: false |
browserify | boolean | [Environment] Browserify default: false |
couch | boolean | [Environment] CouchDB default: false |
devel | boolean | [Environment] Development/debugging (alert, confirm, etc) default: false |
dojo | boolean | [Environment] Dojo Toolkit default: false |
jasmine | boolean | [Environment] Jasmine unit testing framework default: false |
jquery | boolean | [Environment] jQuery default: false |
mocha | boolean | [Environment] Mocha unit testing framework default: false |
module | boolean | [Environment] ES6 module default: false |
mootools | boolean | [Environment] MooTools default: false |
node | boolean | [Environment] Node.js default: false |
nonstandard | boolean | [Environment] Widely adopted globals (escape, unescape, etc) default: false |
phantom | boolean | [Environment] PhantomJS runtime environment default: false |
prototypejs | boolean | [Environment] Prototype JavaScript framework default: false |
rhino | boolean | [Environment] Rhino default: false |
shelljs | boolean | [Environment] Defines globals exposed by the ShellJS library default: false |
typed | boolean | [Environment] Defines globals for typed array constructors default: false |
worker | boolean | [Environment] Web Workers default: false |
wsh | boolean | [Environment] Windows Scripting Host default: false |
yui | boolean | [Environment] Yahoo User Interface default: false |
globals | object | Specify a white list of global variables that are not formally defined in the source code |
extends | string | Specify the path to another configuration file to use as a base, relative to the current file |
overrides | object | Specify the options that should only be applied to files matching a given path pattern |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- 70 properties, 100% carrying a description, max nesting depth 5.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
anyOf | JSON Schema Core, draft 2020-12 | §10.2.1.2 — "anyOf" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.