From b1e06c7043efa8c126ce726bfd026de42b2cabcc Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:25:05 +0000 Subject: [PATCH 1/4] refactor: rename imported symbols --- eslint.config.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 7e953ca..e205ee1 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,15 +1,15 @@ -import ember from 'eslint-plugin-ember'; import globals from 'globals'; import babelParser from '@babel/eslint-parser'; -import js from '@eslint/js'; +import pluginEmber from 'eslint-plugin-ember'; import pluginEmberRecommended from 'eslint-plugin-ember/configs/recommended'; +import pluginEslintJs from '@eslint/js'; import pluginNode from 'eslint-plugin-n'; import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import pluginQunitRecommended from 'eslint-plugin-qunit/configs/recommended'; export default [ - js.configs.recommended, + pluginEslintJs.configs.recommended, ...pluginEmberRecommended, pluginPrettierRecommended, @@ -33,7 +33,7 @@ export default [ }, { plugins: { - ember, + ember: pluginEmber, }, languageOptions: { From 58af294acc3d46be96606d1372de6014c41b8c1c Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:32:44 +0000 Subject: [PATCH 2/4] refactor: merge configs for `eslint-plugin-n` --- eslint.config.mjs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e205ee1..2a42854 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -64,20 +64,10 @@ export default [ rules: {}, }, { + // Config for Node files + ...pluginNode.configs['flat/recommended-script'], - files: [ - '.prettierrc.js', - '.stylelintrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js', - ], - }, - { + files: [ '.prettierrc.js', '.stylelintrc.js', From 8905124c501e9ec1b27e5452b905e60114436810 Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:33:17 +0000 Subject: [PATCH 3/4] refactor: clarify configs --- eslint.config.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 2a42854..bab106f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -93,7 +93,10 @@ export default [ }, }, { + // Config for test files + ...pluginQunitRecommended, + files: ['tests/**/*-test.{js,ts}'], }, ]; From 69923f769a56d69d9736890c5117a1c05442ab9d Mon Sep 17 00:00:00 2001 From: MrChocolatine <47531779+MrChocolatine@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:33:59 +0000 Subject: [PATCH 4/4] refactor: remove empty `rules: {}` --- eslint.config.mjs | 2 -- 1 file changed, 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index bab106f..f56e98e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -60,8 +60,6 @@ export default [ }, }, }, - - rules: {}, }, { // Config for Node files