From 1cb56214de54d077773720fb01cc29ac392f904a Mon Sep 17 00:00:00 2001 From: Roman Gusev Date: Mon, 3 Jun 2024 16:34:00 +0200 Subject: [PATCH 1/2] Migrate to the flat ESLint config Closes #235 --- .eslintrc.yml | 14 -------------- eslint.config.mjs | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 .eslintrc.yml create mode 100644 eslint.config.mjs diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index ace6a85..0000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,14 +0,0 @@ -env: - node: true -plugins: - - prettier - - eslint-plugin -extends: - - prettier - - plugin:eslint-plugin/recommended -parserOptions: - ecmaVersion: 8 - sourceType: module -rules: - prettier/prettier: error - global-require: off diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..6ad9ddb --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,19 @@ +import prettierConfig from "eslint-config-prettier"; +import eslintPluginConfig from "eslint-plugin-eslint-plugin/configs/recommended"; +import prettier from "eslint-plugin-prettier"; +import eslintPlugin from "eslint-plugin-eslint-plugin"; + +export default [ + { + files: ["**/*.{m,}js"], + plugins: { + prettier, + eslintPlugin, + }, + rules: { + "prettier/prettier": "error", + }, + }, + prettierConfig, + eslintPluginConfig, +]; From b1e1b05582c86957de22aa3ba370ad144d88c9f3 Mon Sep 17 00:00:00 2001 From: Roman Gusev Date: Mon, 3 Jun 2024 16:35:19 +0200 Subject: [PATCH 2/2] Remove legacy config env variable --- .github/workflows/nodejs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 6b2ea8d..bd0608f 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -23,4 +23,3 @@ jobs: npm test env: CI: true - ESLINT_USE_FLAT_CONFIG: false