From efcc48cd144f0561b5e0f76c30f40a25b03b4c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 22 Sep 2022 03:39:30 +0200 Subject: [PATCH] feat: add ES2022 config --- README.md | 1 + lib/configs.js | 1 + lib/configs/_override-2022.js | 7 +++++++ lib/configs/es2022.js | 19 +++++++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 lib/configs/_override-2022.js create mode 100644 lib/configs/es2022.js diff --git a/README.md b/README.md index c8fe0dc..e74a547 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Write in your ESLint configurations: http://eslint.org/docs/user-guide/configuri ### Configs +- `plugin:@eslint-community/mysticatea/es2022` ... Basic configuration for ES2022. - `plugin:@eslint-community/mysticatea/es2021` ... Basic configuration for ES2021. - `plugin:@eslint-community/mysticatea/es2020` ... Basic configuration for ES2020. - `plugin:@eslint-community/mysticatea/es2019` ... Basic configuration for ES2019. diff --git a/lib/configs.js b/lib/configs.js index 9d9e8ab..b4e8ab1 100644 --- a/lib/configs.js +++ b/lib/configs.js @@ -15,5 +15,6 @@ module.exports = { es2019: require("./configs/es2019"), es2020: require("./configs/es2020"), es2021: require("./configs/es2021"), + es2022: require("./configs/es2022"), es5: require("./configs/es5"), } diff --git a/lib/configs/_override-2022.js b/lib/configs/_override-2022.js new file mode 100644 index 0000000..21e2aa2 --- /dev/null +++ b/lib/configs/_override-2022.js @@ -0,0 +1,7 @@ +"use strict" + +module.exports = { + parserOptions: { + ecmaVersion: 2022, + }, +} diff --git a/lib/configs/es2022.js b/lib/configs/es2022.js new file mode 100644 index 0000000..a6e5367 --- /dev/null +++ b/lib/configs/es2022.js @@ -0,0 +1,19 @@ +"use strict" + +module.exports = { + extends: [ + require.resolve("./_base.js"), + require.resolve("./_override-2015.js"), + require.resolve("./_override-2016.js"), + require.resolve("./_override-2017.js"), + require.resolve("./_override-2018.js"), + require.resolve("./_override-2019.js"), + require.resolve("./_override-2020.js"), + require.resolve("./_override-2021.js"), + require.resolve("./_override-2022.js"), + require.resolve("./_override-ts.js"), + require.resolve("./_override-vue.js"), + require.resolve("./_override-mocha.js"), + require.resolve("./_override-special.js"), + ], +}