Available Rules ​
This plugin provides the following rules.
- 🔧 mark means that the
--fix
option on the command line can automatically fix some of the problems reported by the rule.
ES2024 ​
There is a config that enables the rules in this category: no-new-in-esnext
Rule ID | Description | |
---|---|---|
es-x/no-arraybuffer-prototype-transfer | disallow the ArrayBuffer.prototype.transfer method. | |
es-x/no-atomics-waitasync | disallow the Atomics.waitAsync method. | |
es-x/no-object-map-groupby | disallow the {Object,Map}.groupBy() function (array grouping). | |
es-x/no-promise-withresolvers | disallow the Promise.withResolvers() method. | |
es-x/no-regexp-v-flag | disallow RegExp v flag. | |
es-x/no-resizable-and-growable-arraybuffers | disallow resizable and growable ArrayBuffers. | |
es-x/no-string-prototype-iswellformed-towellformed | disallow the String.prototype.{isWellFormed,toWellFormed} methods. |
ES2023 ​
There are multiple configs that enable all rules in this category: no-new-in-es2023
, restrict-to-es3
, restrict-to-es5
, restrict-to-es2015
, restrict-to-es2016
, restrict-to-es2017
, restrict-to-es2018
, restrict-to-es2019
, restrict-to-es2020
, restrict-to-es2021
, and restrict-to-es2022
Rule ID | Description | |
---|---|---|
es-x/no-array-prototype-findlast-findlastindex | disallow the Array.prototype.{findLast,findLastIndex} methods. | |
es-x/no-array-prototype-toreversed | disallow the Array.prototype.toReversed method. | |
es-x/no-array-prototype-tosorted | disallow the Array.prototype.toSorted method. | |
es-x/no-array-prototype-tospliced | disallow the Array.prototype.toSpliced method. | |
es-x/no-array-prototype-with | disallow the Array.prototype.with method. | |
es-x/no-hashbang | disallow Hashbang comments. | |
es-x/no-regexp-unicode-property-escapes-2023 | disallow the new values of RegExp Unicode property escape sequences in ES2023. |
ES2023 Intl API ​
There are multiple configs that enable all rules in this category: no-new-in-es2023-intl-api
, restrict-to-es-intl-api-1st-edition
, restrict-to-es2015-intl-api
, restrict-to-es2016-intl-api
, restrict-to-es2017-intl-api
, restrict-to-es2018-intl-api
, restrict-to-es2019-intl-api
, restrict-to-es2020-intl-api
, restrict-to-es2021-intl-api
, and restrict-to-es2022-intl-api
Rule ID | Description | |
---|---|---|
es-x/no-intl-numberformat-prototype-formatrange | disallow the NumberFormat.prototype.formatRange method. | |
es-x/no-intl-numberformat-prototype-formatrangetoparts | disallow the NumberFormat.prototype.formatRangeToParts method. | |
es-x/no-intl-pluralrules-prototype-selectrange | disallow the PluralRules.prototype.selectRange method. |
ES2022 ​
There are multiple configs that enable all rules in this category: no-new-in-es2022
, restrict-to-es3
, restrict-to-es5
, restrict-to-es2015
, restrict-to-es2016
, restrict-to-es2017
, restrict-to-es2018
, restrict-to-es2019
, restrict-to-es2020
, and restrict-to-es2021
Rule ID | Description | |
---|---|---|
es-x/no-arbitrary-module-namespace-names | disallow arbitrary module namespace names. | |
es-x/no-array-string-prototype-at | disallow the {Array,String}.prototype.at() methods. | |
es-x/no-class-fields | disallow class fields. | |
es-x/no-class-static-block | disallow class static block. | |
es-x/no-error-cause | disallow Error Cause. | |
es-x/no-object-hasown | disallow the Object.hasOwn method. | |
es-x/no-private-in | disallow #x in obj . | |
es-x/no-regexp-d-flag | disallow RegExp d flag. | |
es-x/no-regexp-unicode-property-escapes-2022 | disallow the new values of RegExp Unicode property escape sequences in ES2022. | |
es-x/no-top-level-await | disallow top-level await . |
ES2022 Intl API ​
There are multiple configs that enable all rules in this category: no-new-in-es2022-intl-api
, restrict-to-es-intl-api-1st-edition
, restrict-to-es2015-intl-api
, restrict-to-es2016-intl-api
, restrict-to-es2017-intl-api
, restrict-to-es2018-intl-api
, restrict-to-es2019-intl-api
, restrict-to-es2020-intl-api
, and restrict-to-es2021-intl-api
Rule ID | Description | |
---|---|---|
es-x/no-intl-segmenter | disallow the Intl.Segmenter object. | |
es-x/no-intl-supportedvaluesof | disallow the Intl.supportedValuesOf method. |
ES2021 ​
There are multiple configs that enable all rules in this category: no-new-in-es2021
, restrict-to-es3
, restrict-to-es5
, restrict-to-es2015
, restrict-to-es2016
, restrict-to-es2017
, restrict-to-es2018
, restrict-to-es2019
, and restrict-to-es2020
Rule ID | Description | |
---|---|---|
es-x/no-logical-assignment-operators | disallow logical assignment operators. | 🔧 |
es-x/no-numeric-separators | disallow numeric separators. | 🔧 |
es-x/no-promise-any | disallow Promise.any function and AggregateError class. | |
es-x/no-regexp-unicode-property-escapes-2021 | disallow the new values of RegExp Unicode property escape sequences in ES2021. | |
es-x/no-string-prototype-replaceall | disallow the String.prototype.replaceAll method. | |
es-x/no-weakrefs | disallow the WeakRef and FinalizationRegistry class. |
ES2021 Intl API ​
There are multiple configs that enable all rules in this category: no-new-in-es2021-intl-api
, restrict-to-es-intl-api-1st-edition
, restrict-to-es2015-intl-api
, restrict-to-es2016-intl-api
, restrict-to-es2017-intl-api
, restrict-to-es2018-intl-api
, restrict-to-es2019-intl-api
, and restrict-to-es2020-intl-api
Rule ID | Description | |
---|---|---|
es-x/no-intl-datetimeformat-prototype-formatrange | disallow the Intl.DateTimeFormat.prototype.formatRange method. | |
es-x/no-intl-displaynames | disallow the Intl.DisplayNames object. | |
es-x/no-intl-listformat | disallow the Intl.ListFormat object. |
ES2020 ​
There are multiple configs that enable all rules in this category: no-new-in-es2020
, restrict-to-es3
, restrict-to-es5
, restrict-to-es2015
, restrict-to-es2016
, restrict-to-es2017
, restrict-to-es2018
, and restrict-to-es2019
Rule ID | Description | |
---|---|---|
es-x/no-bigint | disallow bigint syntax and built-ins. | |
es-x/no-dynamic-import | disallow import() syntax. | |
es-x/no-export-ns-from | disallow export * as ns . | |
es-x/no-global-this | disallow the globalThis variable. | |
es-x/no-import-meta | disallow import.meta meta property. | |
es-x/no-nullish-coalescing-operators | disallow nullish coalescing operators. | |
es-x/no-optional-chaining | disallow optional chaining. | |
es-x/no-promise-all-settled | disallow Promise.allSettled function. | |
es-x/no-regexp-unicode-property-escapes-2020 | disallow the new values of RegExp Unicode property escape sequences in ES2020. | |
es-x/no-string-prototype-matchall | disallow the String.prototype.matchAll method. |
ES2020 Intl API ​
There are multiple configs that enable all rules in this category: no-new-in-es2020-intl-api
, restrict-to-es-intl-api-1st-edition
, restrict-to-es2015-intl-api
, restrict-to-es2016-intl-api
, restrict-to-es2017-intl-api
, restrict-to-es2018-intl-api
, and restrict-to-es2019-intl-api
Rule ID | Description | |
---|---|---|
es-x/no-intl-locale | disallow the Intl.Locale object. | |
es-x/no-intl-relativetimeformat | disallow the Intl.RelativeTimeFormat object. |
ES2019 ​
There are multiple configs that enable all rules in this category: no-new-in-es2019
, restrict-to-es3
, restrict-to-es5
, restrict-to-es2015
, restrict-to-es2016
, restrict-to-es2017
, and restrict-to-es2018
Rule ID | Description | |
---|---|---|
es-x/no-array-prototype-flat | disallow the Array.prototype.{flat,flatMap} method. | |
es-x/no-json-superset | disallow \u2028 and \u2029 in string literals. | 🔧 |
es-x/no-object-fromentries | disallow the Object.fromEntries method. | |
es-x/no-optional-catch-binding | disallow optional catch binding. | |
es-x/no-regexp-unicode-property-escapes-2019 | disallow the new values of RegExp Unicode property escape sequences in ES2019. | |
es-x/no-string-prototype-trimstart-trimend | disallow the String.prototype.{trimStart,trimEnd} methods. | |
es-x/no-symbol-prototype-description | disallow the Symbol.prototype.description property. |
ES2018 ​
There are multiple configs that enable all rules in this category: no-new-in-es2018
, restrict-to-es3
, restrict-to-es5
, restrict-to-es2015
, restrict-to-es2016
, and restrict-to-es2017
Rule ID | Description | |
---|---|---|
es-x/no-async-iteration | disallow async iteration. | |
es-x/no-malformed-template-literals | disallow template literals with invalid escape sequences. | |
es-x/no-promise-prototype-finally | disallow the Promise.prototype.finally method. | |
es-x/no-regexp-lookbehind-assertions | disallow RegExp lookbehind assertions. | |
es-x/no-regexp-named-capture-groups | disallow RegExp named capture groups. | |
es-x/no-regexp-s-flag | disallow RegExp s flag. | |
es-x/no-regexp-unicode-property-escapes | disallow RegExp Unicode property escape sequences. | |
es-x/no-rest-spread-properties | disallow rest/spread properties. |
ES2018 Intl API ​
There are multiple configs that enable all rules in this category: no-new-in-es2018-intl-api
, restrict-to-es-intl-api-1st-edition
, restrict-to-es2015-intl-api
, restrict-to-es2016-intl-api
, and restrict-to-es2017-intl-api
Rule ID | Description | |
---|---|---|
es-x/no-intl-numberformat-prototype-formattoparts | disallow the NumberFormat.prototype.formatToParts method. | |
es-x/no-intl-pluralrules | disallow the Intl.PluralRules object. |
ES2017 ​
There are multiple configs that enable all rules in this category: no-new-in-es2017
, restrict-to-es3
, restrict-to-es5
, restrict-to-es2015
, and restrict-to-es2016
Rule ID | Description | |
---|---|---|
es-x/no-async-functions | disallow async function declarations. | |
es-x/no-atomics | disallow the Atomics class. | |
es-x/no-object-entries | disallow the Object.entries method. | |
es-x/no-object-getownpropertydescriptors | disallow the Object.getOwnPropertyDescriptors method. | |
es-x/no-object-values | disallow the Object.values method. | |
es-x/no-shared-array-buffer | disallow the SharedArrayBuffer class. | |
es-x/no-string-prototype-padstart-padend | disallow the String.prototype.{padStart,padEnd} methods. | |
es-x/no-trailing-function-commas | disallow trailing commas in parameter/argument lists. | 🔧 |
ES2017 Intl API ​
There are multiple configs that enable all rules in this category: no-new-in-es2017-intl-api
, restrict-to-es-intl-api-1st-edition
, restrict-to-es2015-intl-api
, and restrict-to-es2016-intl-api
Rule ID | Description | |
---|---|---|
es-x/no-intl-datetimeformat-prototype-formattoparts | disallow the DateTimeFormat.prototype.formatToParts method. |
ES2016 ​
There are multiple configs that enable all rules in this category: no-new-in-es2016
, restrict-to-es3
, restrict-to-es5
, and restrict-to-es2015
Rule ID | Description | |
---|---|---|
es-x/no-array-prototype-includes | disallow the Array.prototype.includes method. | |
es-x/no-exponential-operators | disallow exponential operators. |
ES2016 Intl API ​
There are multiple configs that enable all rules in this category: no-new-in-es2016-intl-api
, restrict-to-es-intl-api-1st-edition
, and restrict-to-es2015-intl-api
Rule ID | Description | |
---|---|---|
es-x/no-intl-getcanonicallocales | disallow the Intl.getCanonicalLocales method. |
ES2015 ​
There are multiple configs that enable all rules in this category: no-new-in-es2015
, restrict-to-es3
, and restrict-to-es5
Rule ID | Description | |
---|---|---|
es-x/no-array-from | disallow the Array.from method. | |
es-x/no-array-of | disallow the Array.of method. | |
es-x/no-array-prototype-copywithin | disallow the Array.prototype.copyWithin method. | |
es-x/no-array-prototype-entries | disallow the Array.prototype.entries method. | |
es-x/no-array-prototype-fill | disallow the Array.prototype.fill method. | |
es-x/no-array-prototype-find | disallow the Array.prototype.find method. | |
es-x/no-array-prototype-findindex | disallow the Array.prototype.findIndex method. | |
es-x/no-array-prototype-keys | disallow the Array.prototype.keys method. | |
es-x/no-array-prototype-values | disallow the Array.prototype.values method. | |
es-x/no-arrow-functions | disallow arrow function expressions. | 🔧 |
es-x/no-binary-numeric-literals | disallow binary numeric literals. | |
es-x/no-block-scoped-functions | disallow block-scoped function declarations. | |
es-x/no-block-scoped-variables | disallow block-scoped variable declarations. | |
es-x/no-classes | disallow class declarations. | |
es-x/no-computed-properties | disallow computed properties. | |
es-x/no-default-parameters | disallow default parameters. | |
es-x/no-destructuring | disallow destructuring. | |
es-x/no-for-of-loops | disallow for-of statements. | |
es-x/no-generators | disallow generator function declarations. | |
es-x/no-map | disallow the Map class. | |
es-x/no-math-acosh | disallow the Math.acosh method. | |
es-x/no-math-asinh | disallow the Math.asinh method. | |
es-x/no-math-atanh | disallow the Math.atanh method. | |
es-x/no-math-cbrt | disallow the Math.cbrt method. | |
es-x/no-math-clz32 | disallow the Math.clz32 method. | |
es-x/no-math-cosh | disallow the Math.cosh method. | |
es-x/no-math-expm1 | disallow the Math.expm1 method. | |
es-x/no-math-fround | disallow the Math.fround method. | |
es-x/no-math-hypot | disallow the Math.hypot method. | |
es-x/no-math-imul | disallow the Math.imul method. | |
es-x/no-math-log10 | disallow the Math.log10 method. | |
es-x/no-math-log1p | disallow the Math.log1p method. | |
es-x/no-math-log2 | disallow the Math.log2 method. | |
es-x/no-math-sign | disallow the Math.sign method. | |
es-x/no-math-sinh | disallow the Math.sinh method. | |
es-x/no-math-tanh | disallow the Math.tanh method. | |
es-x/no-math-trunc | disallow the Math.trunc method. | |
es-x/no-modules | disallow modules. | |
es-x/no-new-target | disallow new.target meta property. | |
es-x/no-number-epsilon | disallow the Number.EPSILON property. | |
es-x/no-number-isfinite | disallow the Number.isFinite method. | |
es-x/no-number-isinteger | disallow the Number.isInteger method. | |
es-x/no-number-isnan | disallow the Number.isNaN method. | |
es-x/no-number-issafeinteger | disallow the Number.isSafeInteger method. | |
es-x/no-number-maxsafeinteger | disallow the Number.MAX_SAFE_INTEGER property. | |
es-x/no-number-minsafeinteger | disallow the Number.MIN_SAFE_INTEGER property. | |
es-x/no-number-parsefloat | disallow the Number.parseFloat method. | |
es-x/no-number-parseint | disallow the Number.parseInt method. | |
es-x/no-object-assign | disallow the Object.assign method. | |
es-x/no-object-getownpropertysymbols | disallow the Object.getOwnPropertySymbols method. | |
es-x/no-object-is | disallow the Object.is method. | |
es-x/no-object-setprototypeof | disallow the Object.setPrototypeOf method. | |
es-x/no-object-super-properties | disallow super property accesses in object literals. | |
es-x/no-octal-numeric-literals | disallow octal numeric literals. | |
es-x/no-promise | disallow the Promise class. | |
es-x/no-property-shorthands | disallow property shorthands. | 🔧 |
es-x/no-proxy | disallow the Proxy class. | |
es-x/no-reflect | disallow the Reflect class. | |
es-x/no-regexp-prototype-flags | disallow the RegExp.prototype.flags property. | |
es-x/no-regexp-u-flag | disallow RegExp u flag. | |
es-x/no-regexp-y-flag | disallow RegExp y flag. | |
es-x/no-rest-parameters | disallow rest parameters. | |
es-x/no-set | disallow the Set class. | |
es-x/no-spread-elements | disallow spread elements. | |
es-x/no-string-fromcodepoint | disallow the String.fromCodePoint method. | |
es-x/no-string-prototype-codepointat | disallow the String.prototype.codePointAt method. | |
es-x/no-string-prototype-endswith | disallow the String.prototype.endsWith method. | |
es-x/no-string-prototype-includes | disallow the String.prototype.includes method. | |
es-x/no-string-prototype-normalize | disallow the String.prototype.normalize method. | |
es-x/no-string-prototype-repeat | disallow the String.prototype.repeat method. | |
es-x/no-string-prototype-startswith | disallow the String.prototype.startsWith method. | |
es-x/no-string-raw | disallow the String.raw method. | |
es-x/no-subclassing-builtins | disallow the subclassing of the built-in classes. | |
es-x/no-symbol | disallow the Symbol class. | |
es-x/no-template-literals | disallow template literals. | 🔧 |
es-x/no-typed-arrays | disallow ES2015 typed arrays. | |
es-x/no-unicode-codepoint-escapes | disallow Unicode code point escape sequences. | 🔧 |
es-x/no-weak-map | disallow the WeakMap class. | |
es-x/no-weak-set | disallow the WeakSet class. |
ES5 ​
There are multiple configs that enable all rules in this category: no-new-in-es5
and restrict-to-es3
Rule ID | Description | |
---|---|---|
es-x/no-accessor-properties | disallow accessor properties. | |
es-x/no-array-isarray | disallow the Array.isArray method. | |
es-x/no-array-prototype-every | disallow the Array.prototype.every method. | |
es-x/no-array-prototype-filter | disallow the Array.prototype.filter method. | |
es-x/no-array-prototype-foreach | disallow the Array.prototype.forEach method. | |
es-x/no-array-prototype-indexof | disallow the Array.prototype.indexOf method. | |
es-x/no-array-prototype-lastindexof | disallow the Array.prototype.lastIndexOf method. | |
es-x/no-array-prototype-map | disallow the Array.prototype.map method. | |
es-x/no-array-prototype-reduce | disallow the Array.prototype.reduce method. | |
es-x/no-array-prototype-reduceright | disallow the Array.prototype.reduceRight method. | |
es-x/no-array-prototype-some | disallow the Array.prototype.some method. | |
es-x/no-date-now | disallow the Date.now method. | |
es-x/no-function-prototype-bind | disallow the Function.prototype.bind method. | |
es-x/no-json | disallow the JSON class. | |
es-x/no-keyword-properties | disallow reserved words as property names. | |
es-x/no-object-create | disallow the Object.create method. | |
es-x/no-object-defineproperties | disallow the Object.defineProperties method. | |
es-x/no-object-defineproperty | disallow the Object.defineProperty method. | |
es-x/no-object-freeze | disallow the Object.freeze method. | |
es-x/no-object-getownpropertydescriptor | disallow the Object.getOwnPropertyDescriptor method. | |
es-x/no-object-getownpropertynames | disallow the Object.getOwnPropertyNames method. | |
es-x/no-object-getprototypeof | disallow the Object.getPrototypeOf method. | |
es-x/no-object-isextensible | disallow the Object.isExtensible method. | |
es-x/no-object-isfrozen | disallow the Object.isFrozen method. | |
es-x/no-object-issealed | disallow the Object.isSealed method. | |
es-x/no-object-keys | disallow the Object.keys method. | |
es-x/no-object-preventextensions | disallow the Object.preventExtensions method. | |
es-x/no-object-seal | disallow the Object.seal method. | |
es-x/no-string-prototype-trim | disallow the String.prototype.trim method. | |
es-x/no-trailing-commas | disallow trailing commas in array/object literals. |
Legacy ​
Rules in this category disallow the syntax contained in Annex B or Legacy.
Rules in this category are not included in any preset.
Rule ID | Description | |
---|---|---|
es-x/no-date-prototype-getyear-setyear | disallow the Date.prototype.{getYear,setYear} methods. | |
es-x/no-date-prototype-togmtstring | disallow the Date.prototype.toGMTString method. | 🔧 |
es-x/no-escape-unescape | disallow escape and unescape . | |
es-x/no-function-declarations-in-if-statement-clauses-without-block | disallow function declarations in if statement clauses without using blocks. | 🔧 |
es-x/no-initializers-in-for-in | disallow initializers in for-in heads. | |
es-x/no-labelled-function-declarations | disallow labelled function declarations. | |
es-x/no-legacy-object-prototype-accessor-methods | disallow legacy Object.prototype accessor methods. | |
es-x/no-regexp-prototype-compile | disallow the RegExp.prototype.compile method. | |
es-x/no-shadow-catch-param | disallow identifiers from shadowing catch parameter names. | |
es-x/no-string-create-html-methods | disallow HTML creation methods of string instances. | |
es-x/no-string-prototype-substr | disallow the String.prototype.substr method. | |
es-x/no-string-prototype-trimleft-trimright | disallow the String.prototype.{trimLeft,trimRight} methods. | 🔧 |