Skip to content

Available Configs

This plugin provides the following configs.

no-new-in-esnext

disallow the new stuff to be planned for the next yearly ECMAScript snapshot.
⚠️ This config will be changed in the minor versions of this plugin.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-esnext']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-esnext"],
}

no-new-in-es2024

disallow new stuff in ES2024.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2024']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2024"],
}

no-new-in-es2023

disallow new stuff in ES2023.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2023']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2023"],
}

no-new-in-es2023-intl-api

disallow new stuff in ES2023 Intl API (ECMA-402).

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2023-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2023-intl-api"],
}

no-new-in-es2022

disallow new stuff in ES2022.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2022']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2022"],
}

no-new-in-es2022-intl-api

disallow new stuff in ES2022 Intl API (ECMA-402).

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2022-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2022-intl-api"],
}

no-new-in-es2021

disallow new stuff in ES2021.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2021']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2021"],
}

no-new-in-es2021-intl-api

disallow new stuff in ES2021 Intl API (ECMA-402).

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2021-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2021-intl-api"],
}

no-new-in-es2020

disallow new stuff in ES2020.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2020']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2020"],
}

no-new-in-es2020-intl-api

disallow new stuff in ES2020 Intl API (ECMA-402).

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2020-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2020-intl-api"],
}

no-new-in-es2019

disallow new stuff in ES2019.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2019']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2019"],
}

no-new-in-es2018

disallow new stuff in ES2018.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2018']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2018"],
}

no-new-in-es2018-intl-api

disallow new stuff in ES2018 Intl API (ECMA-402).

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2018-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2018-intl-api"],
}

no-new-in-es2017

disallow new stuff in ES2017.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2017']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2017"],
}

no-new-in-es2017-intl-api

disallow new stuff in ES2017 Intl API (ECMA-402).

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2017-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2017-intl-api"],
}

no-new-in-es2016

disallow new stuff in ES2016.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2016']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2016"],
}

no-new-in-es2016-intl-api

disallow new stuff in ES2016 Intl API (ECMA-402).

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2016-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2016-intl-api"],
}

no-new-in-es2015

disallow new stuff in ES2015.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es2015']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es2015"],
}

no-new-in-es5

disallow new stuff in ES5.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-new-in-es5']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-new-in-es5"],
}

restrict-to-es2023

disallow new stuff that ES2024 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2023']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2023"],
}

restrict-to-es2023-intl-api

disallow new stuff that ES2024 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2023-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2023-intl-api"],
}

restrict-to-es2022

disallow new stuff that ES2023 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2022']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2022"],
}

restrict-to-es2022-intl-api

disallow new stuff that ES2023 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2022-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2022-intl-api"],
}

restrict-to-es2021

disallow new stuff that ES2022 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2021']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2021"],
}

restrict-to-es2021-intl-api

disallow new stuff that ES2022 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2021-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2021-intl-api"],
}

restrict-to-es2020

disallow new stuff that ES2021 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2020']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2020"],
}

restrict-to-es2020-intl-api

disallow new stuff that ES2021 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2020-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2020-intl-api"],
}

restrict-to-es2019

disallow new stuff that ES2020 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2019']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2019"],
}

restrict-to-es2019-intl-api

disallow new stuff that ES2020 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2019-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2019-intl-api"],
}

restrict-to-es2018

disallow new stuff that ES2019 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2018']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2018"],
}

restrict-to-es2018-intl-api

disallow new stuff that ES2019 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2018-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2018-intl-api"],
}

restrict-to-es2017

disallow new stuff that ES2018 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2017']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2017"],
}

restrict-to-es2017-intl-api

disallow new stuff that ES2018 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2017-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2017-intl-api"],
}

restrict-to-es2016

disallow new stuff that ES2017 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2016']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2016"],
}

restrict-to-es2016-intl-api

disallow new stuff that ES2017 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2016-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2016-intl-api"],
}

restrict-to-es2015

disallow new stuff that ES2016 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2015']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2015"],
}

restrict-to-es2015-intl-api

disallow new stuff that ES2016 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es2015-intl-api']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es2015-intl-api"],
}

restrict-to-es5

disallow new stuff that ES2015 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es5']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es5"],
}

restrict-to-es-intl-api-1st-edition

disallow new stuff that ES2015 Intl API (ECMA-402) doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es-intl-api-1st-edition']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es-intl-api-1st-edition"],
}

restrict-to-es3

disallow new stuff that ES5 doesn't include

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/restrict-to-es3']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/restrict-to-es3"],
}

no-import-attributes

disallow proposal ES2025 Import Attributes
⚠️ This config will be changed in the minor versions of this plugin.

This configs includes rules for es-x/no-dynamic-import-options, es-x/no-import-attributes, and es-x/no-trailing-dynamic-import-commas.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-import-attributes']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-import-attributes"],
}

no-iterator-helpers

disallow proposal ES2025 Iterator Helpers
⚠️ This config will be changed in the minor versions of this plugin.

This configs includes rules for es-x/no-iterator-prototype-drop, es-x/no-iterator-prototype-every, es-x/no-iterator-prototype-filter, es-x/no-iterator-prototype-find, es-x/no-iterator-prototype-flatmap, es-x/no-iterator-prototype-foreach, es-x/no-iterator-prototype-map, es-x/no-iterator-prototype-reduce, es-x/no-iterator-prototype-some, es-x/no-iterator-prototype-take, es-x/no-iterator-prototype-toarray, and es-x/no-iterator.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-iterator-helpers']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-iterator-helpers"],
}

no-set-methods

disallow proposal ES2025 Set Methods for JavaScript
⚠️ This config will be changed in the minor versions of this plugin.

This configs includes rules for es-x/no-set-prototype-difference, es-x/no-set-prototype-intersection, es-x/no-set-prototype-isdisjointfrom, es-x/no-set-prototype-issubsetof, es-x/no-set-prototype-issupersetof, es-x/no-set-prototype-symmetricdifference, and es-x/no-set-prototype-union.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-set-methods']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-set-methods"],
}

no-array-grouping

disallow proposal ES2024 Array Grouping

This configs includes rules for es-x/no-map-groupby and es-x/no-object-groupby.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-array-grouping']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-array-grouping"],
}

no-is-usv-string

disallow proposal ES2024 Well-Formed Unicode Strings

This configs includes rules for es-x/no-string-prototype-iswellformed and es-x/no-string-prototype-towellformed.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-is-usv-string']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-is-usv-string"],
}

no-change-array-by-copy

disallow proposal ES2023 Change Array by Copy

This configs includes rules for es-x/no-array-prototype-toreversed, es-x/no-array-prototype-tosorted, es-x/no-array-prototype-tospliced, and es-x/no-array-prototype-with.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-change-array-by-copy']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-change-array-by-copy"],
}

no-intl-numberformat-v3

disallow proposal ES2023 Intl API Intl.NumberFormat V3

This configs includes rules for es-x/no-intl-numberformat-prototype-formatrange, es-x/no-intl-numberformat-prototype-formatrangetoparts, and es-x/no-intl-pluralrules-prototype-selectrange.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-intl-numberformat-v3']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-intl-numberformat-v3"],
}

no-class-fields

disallow proposal ES2022 Class Fields

This configs includes rules for es-x/no-class-instance-fields, es-x/no-class-private-fields, es-x/no-class-private-methods, and es-x/no-class-static-fields.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-class-fields']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-class-fields"],
}

no-relative-indexing-method

disallow proposal ES2022 An .at() method on all the built-in indexables

This configs includes rules for es-x/no-array-prototype-at and es-x/no-string-prototype-at.

Config (Flat Config)

eslint.config.js:

js
import pluginESx from "eslint-plugin-es-x"
export default [
    pluginESx.configs['flat/no-relative-indexing-method']
]

Legacy Config

.eslintrc.*:

json
{
    "extends": ["plugin:es-x/no-relative-indexing-method"],
}