From a63e0762097f511a8750eb2e093152d3c48ca8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Exbrayat?= Date: Fri, 11 Oct 2024 16:11:46 +0200 Subject: [PATCH] refactor: use js extension for eslint config (#28) --- bin/create-eslint-config.js | 2 +- index.js | 4 ++-- templates/{eslint.config.mjs.ejs => eslint.config.js.ejs} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename templates/{eslint.config.mjs.ejs => eslint.config.js.ejs} (100%) diff --git a/bin/create-eslint-config.js b/bin/create-eslint-config.js index 3dc6bfe..a6cc50c 100644 --- a/bin/create-eslint-config.js +++ b/bin/create-eslint-config.js @@ -205,7 +205,7 @@ const lintCommand = packageManager === 'npm' ? 'npm run lint' : `${packageManage console.info( '\n' + - `${bold(yellow('package.json'))} and ${bold(blue('eslint.config.mjs'))} have been updated.\n` + + `${bold(yellow('package.json'))} and ${bold(blue('eslint.config.js'))} have been updated.\n` + `Now please run ${bold(green(installCommand))} to re-install the dependencies.\n` + `Then you can run ${bold(green(lintCommand))} to lint your files.` ) diff --git a/index.js b/index.js index 694ef3c..e31ecc1 100644 --- a/index.js +++ b/index.js @@ -83,8 +83,8 @@ export default function createConfig({ } const files = { - 'eslint.config.mjs': renderEjsFile( - './templates/eslint.config.mjs.ejs', + 'eslint.config.js': renderEjsFile( + './templates/eslint.config.js.ejs', templateData, ), '.editorconfig': renderEjsFile( diff --git a/templates/eslint.config.mjs.ejs b/templates/eslint.config.js.ejs similarity index 100% rename from templates/eslint.config.mjs.ejs rename to templates/eslint.config.js.ejs