Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and clarify ESLint config file #249

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}'],
},
];