From 27b4da7d1f844b1c798d4aec3fcc2b27d0841cd3 Mon Sep 17 00:00:00 2001 From: hieu-w Date: Tue, 31 Dec 2024 15:17:29 +0700 Subject: [PATCH] Eslint 9 flat config migration --- .eslintignore | 24 ------------------------ .eslintrc.js | 22 ---------------------- eslint.config.mjs | 3 +++ 3 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 7a3a815..0000000 --- a/.eslintignore +++ /dev/null @@ -1,24 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -#production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* -examples/ -types/ -dist/ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 3d52b26..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,22 +0,0 @@ -require("@rushstack/eslint-patch/modern-module-resolution"); - -module.exports = { - root: true, - extends: ["@toruslabs/eslint-config-node"], - parser: "@typescript-eslint/parser", - ignorePatterns: ["*.config.js", ".eslintrc.js"], - parserOptions: { - sourceType: "module", - ecmaVersion: 11, - project: "./tsconfig.json", - }, - globals: { - document: true, - fetch: true, - jest: true, - it: true, - beforeEach: true, - afterEach: true, - describe: true, - }, -}; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..bd92612 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,3 @@ +import torusLabsEslintConfigNode from "@toruslabs/eslint-config-node"; + +export default [...torusLabsEslintConfigNode];