From dca7e68e3656f0a7ff6fba318cfdb7d1d0a08832 Mon Sep 17 00:00:00 2001 From: rei Date: Fri, 10 May 2024 19:47:20 +0900 Subject: [PATCH] fix cjs and esm errors --- .eslintrc.json | 2 +- ...vue-ts-recommended.js => eslint-vue-ts-recommended.cjs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) rename eslint-vue-ts-recommended.js => eslint-vue-ts-recommended.cjs (74%) diff --git a/.eslintrc.json b/.eslintrc.json index e6f27964..106ac3d0 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ }, "extends": [ "eslint:recommended", - "./eslint-vue-ts-recommended.js", + "./eslint-vue-ts-recommended.cjs", "plugin:@typescript-eslint/recommended", "plugin:vue/vue3-recommended", "prettier" diff --git a/eslint-vue-ts-recommended.js b/eslint-vue-ts-recommended.cjs similarity index 74% rename from eslint-vue-ts-recommended.js rename to eslint-vue-ts-recommended.cjs index ceab60ca..8d34ae96 100644 --- a/eslint-vue-ts-recommended.js +++ b/eslint-vue-ts-recommended.cjs @@ -9,14 +9,12 @@ */ // eslint-disable-next-line @typescript-eslint/no-var-requires, no-undef -import typescriptEslintEslintRecommended, { - overrides as _overrides -} from '@/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended' +const typescriptEslintEslintRecommended = require('./node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended') // eslint-disable-next-line no-undef -export default { +module.exports = { ...typescriptEslintEslintRecommended, - overrides: _overrides.map(override => { + overrides: typescriptEslintEslintRecommended.overrides.map(override => { if (override.files.includes('*.ts')) { return { ...override, files: [...override.files, '*.vue'] } }