Skip to content

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 IDDescription
es-x/no-arraybuffer-prototype-transferdisallow the ArrayBuffer.prototype.transfer method.
es-x/no-atomics-waitasyncdisallow the Atomics.waitAsync method.
es-x/no-object-map-groupbydisallow the {Object,Map}.groupBy() function (array grouping).
es-x/no-promise-withresolversdisallow the Promise.withResolvers() method.
es-x/no-regexp-v-flagdisallow RegExp v flag.
es-x/no-resizable-and-growable-arraybuffersdisallow resizable and growable ArrayBuffers.
es-x/no-string-prototype-iswellformed-towellformeddisallow 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 IDDescription
es-x/no-array-prototype-findlast-findlastindexdisallow the Array.prototype.{findLast,findLastIndex} methods.
es-x/no-array-prototype-toreverseddisallow the Array.prototype.toReversed method.
es-x/no-array-prototype-tosorteddisallow the Array.prototype.toSorted method.
es-x/no-array-prototype-tospliceddisallow the Array.prototype.toSpliced method.
es-x/no-array-prototype-withdisallow the Array.prototype.with method.
es-x/no-hashbangdisallow Hashbang comments.
es-x/no-regexp-unicode-property-escapes-2023disallow 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 IDDescription
es-x/no-intl-numberformat-prototype-formatrangedisallow the NumberFormat.prototype.formatRange method.
es-x/no-intl-numberformat-prototype-formatrangetopartsdisallow the NumberFormat.prototype.formatRangeToParts method.
es-x/no-intl-pluralrules-prototype-selectrangedisallow 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 IDDescription
es-x/no-arbitrary-module-namespace-namesdisallow arbitrary module namespace names.
es-x/no-array-string-prototype-atdisallow the {Array,String}.prototype.at() methods.
es-x/no-class-fieldsdisallow class fields.
es-x/no-class-static-blockdisallow class static block.
es-x/no-error-causedisallow Error Cause.
es-x/no-object-hasowndisallow the Object.hasOwn method.
es-x/no-private-indisallow #x in obj.
es-x/no-regexp-d-flagdisallow RegExp d flag.
es-x/no-regexp-unicode-property-escapes-2022disallow the new values of RegExp Unicode property escape sequences in ES2022.
es-x/no-top-level-awaitdisallow 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 IDDescription
es-x/no-intl-segmenterdisallow the Intl.Segmenter object.
es-x/no-intl-supportedvaluesofdisallow 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 IDDescription
es-x/no-logical-assignment-operatorsdisallow logical assignment operators.🔧
es-x/no-numeric-separatorsdisallow numeric separators.🔧
es-x/no-promise-anydisallow Promise.any function and AggregateError class.
es-x/no-regexp-unicode-property-escapes-2021disallow the new values of RegExp Unicode property escape sequences in ES2021.
es-x/no-string-prototype-replacealldisallow the String.prototype.replaceAll method.
es-x/no-weakrefsdisallow 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 IDDescription
es-x/no-intl-datetimeformat-prototype-formatrangedisallow the Intl.DateTimeFormat.prototype.formatRange method.
es-x/no-intl-displaynamesdisallow the Intl.DisplayNames object.
es-x/no-intl-listformatdisallow 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 IDDescription
es-x/no-bigintdisallow bigint syntax and built-ins.
es-x/no-dynamic-importdisallow import() syntax.
es-x/no-export-ns-fromdisallow export * as ns.
es-x/no-global-thisdisallow the globalThis variable.
es-x/no-import-metadisallow import.meta meta property.
es-x/no-nullish-coalescing-operatorsdisallow nullish coalescing operators.
es-x/no-optional-chainingdisallow optional chaining.
es-x/no-promise-all-settleddisallow Promise.allSettled function.
es-x/no-regexp-unicode-property-escapes-2020disallow the new values of RegExp Unicode property escape sequences in ES2020.
es-x/no-string-prototype-matchalldisallow 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 IDDescription
es-x/no-intl-localedisallow the Intl.Locale object.
es-x/no-intl-relativetimeformatdisallow 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 IDDescription
es-x/no-array-prototype-flatdisallow the Array.prototype.{flat,flatMap} method.
es-x/no-json-supersetdisallow \u2028 and \u2029 in string literals.🔧
es-x/no-object-fromentriesdisallow the Object.fromEntries method.
es-x/no-optional-catch-bindingdisallow optional catch binding.
es-x/no-regexp-unicode-property-escapes-2019disallow the new values of RegExp Unicode property escape sequences in ES2019.
es-x/no-string-prototype-trimstart-trimenddisallow the String.prototype.{trimStart,trimEnd} methods.
es-x/no-symbol-prototype-descriptiondisallow 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 IDDescription
es-x/no-async-iterationdisallow async iteration.
es-x/no-malformed-template-literalsdisallow template literals with invalid escape sequences.
es-x/no-promise-prototype-finallydisallow the Promise.prototype.finally method.
es-x/no-regexp-lookbehind-assertionsdisallow RegExp lookbehind assertions.
es-x/no-regexp-named-capture-groupsdisallow RegExp named capture groups.
es-x/no-regexp-s-flagdisallow RegExp s flag.
es-x/no-regexp-unicode-property-escapesdisallow RegExp Unicode property escape sequences.
es-x/no-rest-spread-propertiesdisallow 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 IDDescription
es-x/no-intl-numberformat-prototype-formattopartsdisallow the NumberFormat.prototype.formatToParts method.
es-x/no-intl-pluralrulesdisallow 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 IDDescription
es-x/no-async-functionsdisallow async function declarations.
es-x/no-atomicsdisallow the Atomics class.
es-x/no-object-entriesdisallow the Object.entries method.
es-x/no-object-getownpropertydescriptorsdisallow the Object.getOwnPropertyDescriptors method.
es-x/no-object-valuesdisallow the Object.values method.
es-x/no-shared-array-bufferdisallow the SharedArrayBuffer class.
es-x/no-string-prototype-padstart-padenddisallow the String.prototype.{padStart,padEnd} methods.
es-x/no-trailing-function-commasdisallow 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 IDDescription
es-x/no-intl-datetimeformat-prototype-formattopartsdisallow 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 IDDescription
es-x/no-array-prototype-includesdisallow the Array.prototype.includes method.
es-x/no-exponential-operatorsdisallow 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 IDDescription
es-x/no-intl-getcanonicallocalesdisallow 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 IDDescription
es-x/no-array-fromdisallow the Array.from method.
es-x/no-array-ofdisallow the Array.of method.
es-x/no-array-prototype-copywithindisallow the Array.prototype.copyWithin method.
es-x/no-array-prototype-entriesdisallow the Array.prototype.entries method.
es-x/no-array-prototype-filldisallow the Array.prototype.fill method.
es-x/no-array-prototype-finddisallow the Array.prototype.find method.
es-x/no-array-prototype-findindexdisallow the Array.prototype.findIndex method.
es-x/no-array-prototype-keysdisallow the Array.prototype.keys method.
es-x/no-array-prototype-valuesdisallow the Array.prototype.values method.
es-x/no-arrow-functionsdisallow arrow function expressions.🔧
es-x/no-binary-numeric-literalsdisallow binary numeric literals.
es-x/no-block-scoped-functionsdisallow block-scoped function declarations.
es-x/no-block-scoped-variablesdisallow block-scoped variable declarations.
es-x/no-classesdisallow class declarations.
es-x/no-computed-propertiesdisallow computed properties.
es-x/no-default-parametersdisallow default parameters.
es-x/no-destructuringdisallow destructuring.
es-x/no-for-of-loopsdisallow for-of statements.
es-x/no-generatorsdisallow generator function declarations.
es-x/no-mapdisallow the Map class.
es-x/no-math-acoshdisallow the Math.acosh method.
es-x/no-math-asinhdisallow the Math.asinh method.
es-x/no-math-atanhdisallow the Math.atanh method.
es-x/no-math-cbrtdisallow the Math.cbrt method.
es-x/no-math-clz32disallow the Math.clz32 method.
es-x/no-math-coshdisallow the Math.cosh method.
es-x/no-math-expm1disallow the Math.expm1 method.
es-x/no-math-frounddisallow the Math.fround method.
es-x/no-math-hypotdisallow the Math.hypot method.
es-x/no-math-imuldisallow the Math.imul method.
es-x/no-math-log10disallow the Math.log10 method.
es-x/no-math-log1pdisallow the Math.log1p method.
es-x/no-math-log2disallow the Math.log2 method.
es-x/no-math-signdisallow the Math.sign method.
es-x/no-math-sinhdisallow the Math.sinh method.
es-x/no-math-tanhdisallow the Math.tanh method.
es-x/no-math-truncdisallow the Math.trunc method.
es-x/no-modulesdisallow modules.
es-x/no-new-targetdisallow new.target meta property.
es-x/no-number-epsilondisallow the Number.EPSILON property.
es-x/no-number-isfinitedisallow the Number.isFinite method.
es-x/no-number-isintegerdisallow the Number.isInteger method.
es-x/no-number-isnandisallow the Number.isNaN method.
es-x/no-number-issafeintegerdisallow the Number.isSafeInteger method.
es-x/no-number-maxsafeintegerdisallow the Number.MAX_SAFE_INTEGER property.
es-x/no-number-minsafeintegerdisallow the Number.MIN_SAFE_INTEGER property.
es-x/no-number-parsefloatdisallow the Number.parseFloat method.
es-x/no-number-parseintdisallow the Number.parseInt method.
es-x/no-object-assigndisallow the Object.assign method.
es-x/no-object-getownpropertysymbolsdisallow the Object.getOwnPropertySymbols method.
es-x/no-object-isdisallow the Object.is method.
es-x/no-object-setprototypeofdisallow the Object.setPrototypeOf method.
es-x/no-object-super-propertiesdisallow super property accesses in object literals.
es-x/no-octal-numeric-literalsdisallow octal numeric literals.
es-x/no-promisedisallow the Promise class.
es-x/no-property-shorthandsdisallow property shorthands.🔧
es-x/no-proxydisallow the Proxy class.
es-x/no-reflectdisallow the Reflect class.
es-x/no-regexp-prototype-flagsdisallow the RegExp.prototype.flags property.
es-x/no-regexp-u-flagdisallow RegExp u flag.
es-x/no-regexp-y-flagdisallow RegExp y flag.
es-x/no-rest-parametersdisallow rest parameters.
es-x/no-setdisallow the Set class.
es-x/no-spread-elementsdisallow spread elements.
es-x/no-string-fromcodepointdisallow the String.fromCodePoint method.
es-x/no-string-prototype-codepointatdisallow the String.prototype.codePointAt method.
es-x/no-string-prototype-endswithdisallow the String.prototype.endsWith method.
es-x/no-string-prototype-includesdisallow the String.prototype.includes method.
es-x/no-string-prototype-normalizedisallow the String.prototype.normalize method.
es-x/no-string-prototype-repeatdisallow the String.prototype.repeat method.
es-x/no-string-prototype-startswithdisallow the String.prototype.startsWith method.
es-x/no-string-rawdisallow the String.raw method.
es-x/no-subclassing-builtinsdisallow the subclassing of the built-in classes.
es-x/no-symboldisallow the Symbol class.
es-x/no-template-literalsdisallow template literals.🔧
es-x/no-typed-arraysdisallow ES2015 typed arrays.
es-x/no-unicode-codepoint-escapesdisallow Unicode code point escape sequences.🔧
es-x/no-weak-mapdisallow the WeakMap class.
es-x/no-weak-setdisallow the WeakSet class.

ES5 ​

There are multiple configs that enable all rules in this category: no-new-in-es5 and restrict-to-es3

Rule IDDescription
es-x/no-accessor-propertiesdisallow accessor properties.
es-x/no-array-isarraydisallow the Array.isArray method.
es-x/no-array-prototype-everydisallow the Array.prototype.every method.
es-x/no-array-prototype-filterdisallow the Array.prototype.filter method.
es-x/no-array-prototype-foreachdisallow the Array.prototype.forEach method.
es-x/no-array-prototype-indexofdisallow the Array.prototype.indexOf method.
es-x/no-array-prototype-lastindexofdisallow the Array.prototype.lastIndexOf method.
es-x/no-array-prototype-mapdisallow the Array.prototype.map method.
es-x/no-array-prototype-reducedisallow the Array.prototype.reduce method.
es-x/no-array-prototype-reducerightdisallow the Array.prototype.reduceRight method.
es-x/no-array-prototype-somedisallow the Array.prototype.some method.
es-x/no-date-nowdisallow the Date.now method.
es-x/no-function-prototype-binddisallow the Function.prototype.bind method.
es-x/no-jsondisallow the JSON class.
es-x/no-keyword-propertiesdisallow reserved words as property names.
es-x/no-object-createdisallow the Object.create method.
es-x/no-object-definepropertiesdisallow the Object.defineProperties method.
es-x/no-object-definepropertydisallow the Object.defineProperty method.
es-x/no-object-freezedisallow the Object.freeze method.
es-x/no-object-getownpropertydescriptordisallow the Object.getOwnPropertyDescriptor method.
es-x/no-object-getownpropertynamesdisallow the Object.getOwnPropertyNames method.
es-x/no-object-getprototypeofdisallow the Object.getPrototypeOf method.
es-x/no-object-isextensibledisallow the Object.isExtensible method.
es-x/no-object-isfrozendisallow the Object.isFrozen method.
es-x/no-object-issealeddisallow the Object.isSealed method.
es-x/no-object-keysdisallow the Object.keys method.
es-x/no-object-preventextensionsdisallow the Object.preventExtensions method.
es-x/no-object-sealdisallow the Object.seal method.
es-x/no-string-prototype-trimdisallow the String.prototype.trim method.
es-x/no-trailing-commasdisallow 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 IDDescription
es-x/no-date-prototype-getyear-setyeardisallow the Date.prototype.{getYear,setYear} methods.
es-x/no-date-prototype-togmtstringdisallow the Date.prototype.toGMTString method.🔧
es-x/no-escape-unescapedisallow escape and unescape.
es-x/no-function-declarations-in-if-statement-clauses-without-blockdisallow function declarations in if statement clauses without using blocks.🔧
es-x/no-initializers-in-for-indisallow initializers in for-in heads.
es-x/no-labelled-function-declarationsdisallow labelled function declarations.
es-x/no-legacy-object-prototype-accessor-methodsdisallow legacy Object.prototype accessor methods.
es-x/no-regexp-prototype-compiledisallow the RegExp.prototype.compile method.
es-x/no-shadow-catch-paramdisallow identifiers from shadowing catch parameter names.
es-x/no-string-create-html-methodsdisallow HTML creation methods of string instances.
es-x/no-string-prototype-substrdisallow the String.prototype.substr method.
es-x/no-string-prototype-trimleft-trimrightdisallow the String.prototype.{trimLeft,trimRight} methods.🔧