package eslint import "list" // JSON schema for ESLint configuration files #Schema: { @jsonschema(schema="http://json-schema.org/draft-07/schema#") @jsonschema(id="https://json.schemastore.org/eslintrc.json") // By default, ESLint supports only ECMAScript 5 syntax. You can override that // setting to enable support for ECMAScript 6 as well as JSX by using // configuration settings. ecmaFeatures?: _#defs."/properties/ecmaFeatures" // An environment defines global variables that are predefined. env?: _#defs."/properties/env" extends?: #stringOrStringArray // Set each global variable name equal to true to allow the variable to be // overwritten or false to disallow overwriting. globals?: _#defs."/properties/globals" // Prevent comments from changing config or rules noInlineConfig?: bool // Report unused eslint-disable comments reportUnusedDisableDirectives?: bool parser?: _#defs."/properties/parser" // The JavaScript language options to be supported parserOptions?: _#defs."/properties/parserOptions" // ESLint supports the use of third-party plugins. Before using the plugin, you // have to install it using npm. plugins?: _#defs."/properties/plugins" // By default, ESLint will look for configuration files in all parent folders up // to the root directory. This can be useful if you want all of your projects // to follow a certain convention, but can sometimes lead to unexpected // results. To limit ESLint to a specific project, set this to `true` in a // configuration in the root of your project. root?: bool ignorePatterns?: #stringOrStringArray // ESLint comes with a large number of rules. You can modify which rules your // project uses either using configuration comments or configuration files. rules?: _#defs."/properties/rules" // ESLint supports adding shared settings into configuration file. You can add // settings object to ESLint configuration file and it will be supplied to // every rule that will be executed. This may be useful if you are adding // custom rules and want them to have access to the same information and be // easily configurable. settings?: _#defs."/properties/settings" // Allows to override configuration for files and folders, specified by glob patterns overrides?: _#defs."/properties/overrides" #bestPractices: { "accessor-pairs"?: #rule "array-callback-return"?: #rule "block-scoped-var"?: #rule "class-methods-use-this"?: #rule complexity?: #rule "consistent-return"?: #rule curly?: #rule "default-case"?: #rule "dot-location"?: #rule "dot-notation"?: #rule eqeqeq?: #rule "guard-for-in"?: #rule "no-alert"?: #rule "no-caller"?: #rule "no-case-declarations"?: #rule "no-div-regex"?: #rule "no-else-return"?: #rule "no-empty-function"?: #rule "no-empty-pattern"?: #rule "no-eq-null"?: #rule "no-eval"?: #rule "no-extend-native"?: #rule "no-extra-bind"?: #rule "no-extra-label"?: #rule "no-fallthrough"?: #rule "no-floating-decimal"?: #rule "no-global-assign"?: #rule "no-implicit-coercion"?: #rule "no-implicit-globals"?: #rule "no-implied-eval"?: #rule "no-invalid-this"?: #rule "no-iterator"?: #rule "no-labels"?: #rule "no-lone-blocks"?: #rule "no-loop-func"?: #rule "no-magic-numbers"?: #rule "no-multi-spaces"?: #rule "no-multi-str"?: #rule "no-native-reassign"?: #rule "no-new"?: #rule "no-new-func"?: #rule "no-new-wrappers"?: #rule "no-octal"?: #rule "no-octal-escape"?: #rule "no-param-reassign"?: #rule "no-proto"?: #rule "no-redeclare"?: #rule "no-restricted-properties"?: #rule "no-return-assign"?: #rule "no-return-await"?: #rule "no-script-url"?: #rule "no-self-assign"?: #rule "no-self-compare"?: #rule "no-sequences"?: #rule "no-throw-literal"?: #rule "no-unmodified-loop-condition"?: #rule "no-unused-expressions"?: #rule "no-unused-labels"?: #rule "no-useless-call"?: #rule "no-useless-concat"?: #rule "no-useless-escape"?: #rule "no-useless-return"?: #rule "no-void"?: #rule "no-warning-comments"?: #rule "no-with"?: #rule "prefer-promise-reject-errors"?: #rule radix?: #rule "require-await"?: #rule "vars-on-top"?: #rule "wrap-iife"?: #rule yoda?: #rule ... } #ecmaScript6: { "arrow-body-style"?: #rule "arrow-parens"?: #rule "arrow-spacing"?: #rule "constructor-super"?: #rule "generator-star-spacing"?: #rule "no-class-assign"?: #rule "no-confusing-arrow"?: #rule "no-const-assign"?: #rule "no-dupe-class-members"?: #rule "no-duplicate-imports"?: #rule "no-new-symbol"?: #rule "no-restricted-imports"?: #rule "no-this-before-super"?: #rule "no-useless-computed-key"?: #rule "no-useless-constructor"?: #rule "no-useless-rename"?: #rule "no-var"?: #rule "object-shorthand"?: #rule "prefer-arrow-callback"?: #rule "prefer-const"?: #rule "prefer-destructuring"?: #rule "prefer-numeric-literals"?: #rule "prefer-reflect"?: #rule "prefer-rest-params"?: #rule "prefer-spread"?: #rule "prefer-template"?: #rule "require-yield"?: #rule "rest-spread-spacing"?: #rule "sort-imports"?: #rule "symbol-description"?: #rule "template-curly-spacing"?: #rule "yield-star-spacing"?: #rule ... } #legacy: { "max-depth"?: #rule "max-len"?: #rule "max-params"?: #rule "max-statements"?: #rule "no-bitwise"?: #rule "no-plusplus"?: #rule ... } #nodeAndCommonJs: { "callback-return"?: #rule "global-require"?: #rule "handle-callback-err"?: #rule "no-buffer-constructor"?: #rule "no-mixed-requires"?: #rule "no-new-require"?: #rule "no-path-concat"?: #rule "no-process-env"?: #rule "no-process-exit"?: #rule "no-restricted-modules"?: #rule "no-sync"?: #rule ... } #possibleErrors: { "comma-dangle"?: #rule "for-direction"?: #rule "getter-return"?: #rule "no-await-in-loop"?: #rule "no-compare-neg-zero"?: #rule "no-cond-assign"?: #rule "no-console"?: #rule "no-constant-condition"?: #rule "no-control-regex"?: #rule "no-debugger"?: #rule "no-dupe-args"?: #rule "no-dupe-keys"?: #rule "no-duplicate-case"?: #rule "no-empty"?: #rule "no-empty-character-class"?: #rule "no-ex-assign"?: #rule "no-extra-boolean-cast"?: #rule "no-extra-parens"?: #rule "no-extra-semi"?: #rule "no-func-assign"?: #rule "no-inner-declarations"?: #rule "no-invalid-regexp"?: #rule "no-irregular-whitespace"?: #rule "no-negated-in-lhs"?: #rule "no-obj-calls"?: #rule "no-prototype-builtins"?: #rule "no-regex-spaces"?: #rule "no-sparse-arrays"?: #rule "no-template-curly-in-string"?: #rule "no-unexpected-multiline"?: #rule "no-unreachable"?: #rule "no-unsafe-finally"?: #rule "no-unsafe-negation"?: #rule "use-isnan"?: #rule "valid-jsdoc"?: #rule "valid-typeof"?: #rule ... } #rule: matchN(1, [int & >=0 & <=2, "off" | "warn" | "error", [...]]) #strictMode: { strict?: #rule ... } #stringOrStringArray: matchN(1, [string, [...string]]) #stylisticIssues: { "array-bracket-newline"?: #rule "array-bracket-spacing"?: #rule "array-element-newline"?: #rule "block-spacing"?: #rule "brace-style"?: #rule camelcase?: #rule "capitalized-comments"?: #rule "comma-dangle"?: #rule "comma-spacing"?: #rule "comma-style"?: #rule "computed-property-spacing"?: #rule "consistent-this"?: #rule "eol-last"?: #rule "func-call-spacing"?: #rule "func-name-matching"?: #rule "func-names"?: #rule "func-style"?: #rule "function-call-argument-newline"?: #rule "function-paren-newline"?: #rule "id-blacklist"?: #rule "id-length"?: #rule "id-match"?: #rule "implicit-arrow-linebreak"?: #rule indent?: #rule "indent-legacy"?: #rule "jsx-quotes"?: #rule "key-spacing"?: #rule "keyword-spacing"?: #rule "line-comment-position"?: #rule "lines-between-class-members"?: #rule "linebreak-style"?: #rule "lines-around-comment"?: #rule "lines-around-directive"?: #rule "max-depth"?: #rule "max-len"?: #rule "max-lines"?: #rule "max-nested-callbacks"?: #rule "max-params"?: #rule "max-statements"?: #rule "max-statements-per-line"?: #rule "multiline-comment-style"?: #rule "multiline-ternary"?: #rule "new-cap"?: #rule "newline-after-var"?: #rule "newline-before-return"?: #rule "newline-per-chained-call"?: #rule "new-parens"?: #rule "no-array-constructor"?: #rule "no-bitwise"?: #rule "no-continue"?: #rule "no-inline-comments"?: #rule "no-lonely-if"?: #rule "no-mixed-operators"?: #rule "no-mixed-spaces-and-tabs"?: #rule "no-multi-assign"?: #rule "no-multiple-empty-lines"?: #rule "no-negated-condition"?: #rule "no-nested-ternary"?: #rule "no-new-object"?: #rule "no-plusplus"?: #rule "no-restricted-syntax"?: #rule "no-spaced-func"?: #rule "no-tabs"?: #rule "no-ternary"?: #rule "no-trailing-spaces"?: #rule "no-underscore-dangle"?: #rule "no-unneeded-ternary"?: #rule "no-whitespace-before-property"?: #rule "nonblock-statement-body-position"?: #rule "object-curly-newline"?: #rule "object-curly-spacing"?: #rule "object-property-newline"?: #rule "object-shorthand"?: #rule "one-var"?: #rule "one-var-declaration-per-line"?: #rule "operator-assignment"?: #rule "operator-linebreak"?: #rule "padded-blocks"?: #rule "padding-line-between-statements"?: #rule "quote-props"?: #rule quotes?: #rule "require-jsdoc"?: #rule semi?: #rule "semi-spacing"?: #rule "semi-style"?: #rule "sort-keys"?: #rule "sort-vars"?: #rule "space-before-blocks"?: #rule "space-before-function-paren"?: #rule "spaced-comment"?: #rule "space-infix-ops"?: #rule "space-in-parens"?: #rule "space-unary-ops"?: #rule "switch-colon-spacing"?: #rule "template-tag-spacing"?: #rule "unicode-bom"?: #rule "wrap-regex"?: #rule ... } #variables: { "init-declarations"?: #rule "no-catch-shadow"?: #rule "no-delete-var"?: #rule "no-label-var"?: #rule "no-restricted-globals"?: #rule "no-shadow"?: #rule "no-shadow-restricted-names"?: #rule "no-undef"?: #rule "no-undefined"?: #rule "no-undef-init"?: #rule "no-unused-vars"?: #rule "no-use-before-define"?: #rule ... } // By default, ESLint supports only ECMAScript 5 syntax. You can override that // setting to enable support for ECMAScript 6 as well as JSX by using // configuration settings. _#defs: "/properties/ecmaFeatures": { arrowFunctions?: bool binaryLiterals?: bool blockBindings?: bool classes?: bool defaultParams?: bool destructuring?: bool // Enables support for the experimental object rest/spread properties // (IMPORTANT: This is an experimental feature that may change significantly in // the future. It's recommended that you do not write rules relying on this // functionality unless you are willing to incur maintenance cost when it // changes.) experimentalObjectRestSpread?: bool forOf?: bool generators?: bool // allow return statements in the global scope globalReturn?: bool // enable global strict mode (if ecmaVersion is 5 or greater) impliedStrict?: bool // enable JSX jsx?: bool modules?: bool objectLiteralComputedProperties?: bool objectLiteralDuplicateProperties?: bool objectLiteralShorthandMethods?: bool objectLiteralShorthandProperties?: bool octalLiterals?: bool regexUFlag?: bool regexYFlag?: bool restParams?: bool spread?: bool superInFunctions?: bool templateStrings?: bool unicodeCodePointEscapes?: bool ... } // An environment defines global variables that are predefined. _#defs: "/properties/env": { // defines require() and define() as global variables as per the amd spec amd?: bool // AppleScript global variables applescript?: bool // Atom test helper globals atomtest?: bool // browser global variables browser?: bool // CommonJS global variables and CommonJS scoping (use this for browser-only // code that uses Browserify/WebPack) commonjs?: bool // Globals common to both Node and Browser "shared-node-browser"?: bool // Ember test helper globals embertest?: bool // enable all ECMAScript 6 features except for modules es6?: bool // GreaseMonkey globals greasemonkey?: bool // adds all of the Jasmine testing global variables for version 1.3 and 2.0 jasmine?: bool // Jest global variables jest?: bool // jQuery global variables jquery?: bool // Meteor global variables meteor?: bool // adds all of the Mocha test global variables mocha?: bool // MongoDB global variables mongo?: bool // Java 8 Nashorn global variables nashorn?: bool // Node.js global variables and Node.js scoping node?: bool // PhantomJS global variables phantomjs?: bool // Prototype.js global variables prototypejs?: bool // Protractor global variables protractor?: bool // QUnit global variables qunit?: bool // Service Worker global variables serviceworker?: bool // ShellJS global variables shelljs?: bool // WebExtensions globals webextensions?: bool // web workers global variables worker?: bool ... } // Set each global variable name equal to true to allow the variable to be // overwritten or false to disallow overwriting. _#defs: "/properties/globals": [string]: matchN(1, ["readonly" | "writable" | "off", bool]) // Allows to override configuration for files and folders, specified by glob patterns _#defs: "/properties/overrides": [...close({ // Glob pattern for files to apply 'overrides' configuration, relative to the // directory of the config file files!: matchN(1, [string, list.MinItems(1) & [...string]]) extends?: #stringOrStringArray excludedFiles?: #stringOrStringArray ecmaFeatures?: _#defs."/properties/ecmaFeatures" env?: _#defs."/properties/env" globals?: _#defs."/properties/globals" parser?: _#defs."/properties/parser" parserOptions?: _#defs."/properties/parserOptions" plugins?: _#defs."/properties/plugins" // To specify a processor, specify the plugin name and processor name joined by a forward slash processor?: string rules?: _#defs."/properties/rules" settings?: _#defs."/properties/settings" overrides?: _#defs."/properties/overrides" })] _#defs: "/properties/parser": string // The JavaScript language options to be supported _#defs: "/properties/parserOptions": { ecmaFeatures?: _#defs."/properties/ecmaFeatures" // Set to 3, 5 (default), 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15 to specify the // version of ECMAScript syntax you want to use. You can also set it to 2015 // (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 // (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 // (same as 14), or 2024 (same as 15) to use the year-based naming. You can // also set "latest" to use the most recently supported version. ecmaVersion?: >=3 & <=3 | >=5 & <=5 | >=6 & <=6 | >=2015 & <=2015 | >=7 & <=7 | >=2016 & <=2016 | >=8 & <=8 | >=2017 & <=2017 | >=9 & <=9 | >=2018 & <=2018 | >=10 & <=10 | >=2019 & <=2019 | >=11 & <=11 | >=2020 & <=2020 | >=12 & <=12 | >=2021 & <=2021 | >=13 & <=13 | >=2022 & <=2022 | >=14 & <=14 | >=2023 & <=2023 | >=15 & <=15 | >=2024 & <=2024 | "latest" // set to "script" (default), "commonjs", or "module" if your code is in ECMAScript modules sourceType?: "script" | "module" | "commonjs" ... } // ESLint supports the use of third-party plugins. Before using the plugin, you // have to install it using npm. _#defs: "/properties/plugins": [...string] // ESLint comes with a large number of rules. You can modify which rules your // project uses either using configuration comments or configuration files. _#defs: "/properties/rules": #possibleErrors & #bestPractices & #strictMode & #variables & #nodeAndCommonJs & #stylisticIssues & #ecmaScript6 & #legacy & #Plugins & {...} // ESLint supports adding shared settings into configuration file. You can add // settings object to ESLint configuration file and it will be supplied to // every rule that will be executed. This may be useful if you are adding // custom rules and want them to have access to the same information and be // easily configurable. _#defs: "/properties/settings": {...} ... }