Skip to content

Commit

Permalink
Refactor and clarify ESLint config file (#249)
Browse files Browse the repository at this point in the history
* refactor: rename imported symbols

* refactor: merge configs for `eslint-plugin-n`

* refactor: clarify configs

* refactor: remove empty `rules: {}`
  • Loading branch information
MrChocolatine authored Dec 3, 2024
1 parent f2baa7c commit 0fcd258
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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,

Expand All @@ -33,7 +33,7 @@ export default [
},
{
plugins: {
ember,
ember: pluginEmber,
},

languageOptions: {
Expand All @@ -60,24 +60,12 @@ 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',
Expand All @@ -103,7 +91,10 @@ export default [
},
},
{
// Config for test files

...pluginQunitRecommended,

files: ['tests/**/*-test.{js,ts}'],
},
];

0 comments on commit 0fcd258

Please sign in to comment.