aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2024-11-05 13:23:06 +0100
committerGitHub <[email protected]>2024-11-05 12:23:06 +0000
commitdf87d6083daf402c828fbbf25ce9a0b1639a20c0 (patch)
tree1d9e0c1c0ad6c3fdc306f510c3c0300a76a1f62a
parentae10d9a47e0bf8c71fcc5a920160a18b3a6bfc44 (diff)
downloadfaker-df87d6083daf402c828fbbf25ce9a0b1639a20c0.tar.xz
faker-df87d6083daf402c828fbbf25ce9a0b1639a20c0.zip
infra: name eslint config groups for inspection (#3249)
-rw-r--r--eslint.config.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/eslint.config.ts b/eslint.config.ts
index a9ffc372..2c80c005 100644
--- a/eslint.config.ts
+++ b/eslint.config.ts
@@ -18,6 +18,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region global
includeIgnoreFile(gitignorePath),
{
+ name: 'manual ignores',
ignores: [
// Skip some files that don't need linting right now
'.github/workflows/commentCodeGeneration.ts',
@@ -29,6 +30,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
],
},
{
+ name: 'linter options',
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
@@ -38,6 +40,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region eslint (js)
eslint.configs.recommended,
{
+ name: 'eslint overrides',
rules: {
eqeqeq: ['error', 'always', { null: 'ignore' }],
'logical-assignment-operators': 'error',
@@ -52,9 +55,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region typescript-eslint
...tseslint.configs.strictTypeChecked,
{
- plugins: {
- '@typescript-eslint': tseslint.plugin,
- },
+ name: 'typescript-eslint overrides',
languageOptions: {
parserOptions: {
project: true,
@@ -129,6 +130,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region stylistic
{
+ name: 'stylistic overrides',
plugins: {
'@stylistic': stylistic,
},
@@ -144,6 +146,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region unicorn
eslintPluginUnicorn.configs['flat/recommended'],
{
+ name: 'unicorn overrides',
rules: {
'unicorn/import-style': 'off', // subjective & doesn't do anything for us
'unicorn/no-array-callback-reference': 'off', // reduces readability
@@ -169,6 +172,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region jsdoc
eslintPluginJsdoc.configs['flat/recommended-typescript-error'],
{
+ name: 'jsdoc overrides',
rules: {
'jsdoc/require-jsdoc': 'off', // Enabled only for src/**/*.ts
'jsdoc/require-returns': 'off',
@@ -209,6 +213,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
//#region overrides
{
+ name: 'src/**/*.ts overrides',
files: ['src/**/*.ts'],
rules: {
'no-undef': 'error', // Must override the config from typescript-eslint
@@ -220,12 +225,14 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
},
},
{
+ name: 'src/locale/**/*.ts overrides',
files: ['src/locale/**/*.ts'],
rules: {
'unicorn/filename-case': 'off', // our locale files have a custom naming scheme
},
},
{
+ name: 'src/{definitions,locales}/**/*.ts overrides',
files: ['src/definitions/**/*.ts', 'src/locales/**/*.ts'],
rules: {
'unicorn/filename-case': [
@@ -238,6 +245,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
},
},
{
+ name: 'test/**/*.ts overrides',
files: ['test/**/*.spec.ts', 'test/**/*.spec.d.ts'],
plugins: {
vitest: eslintPluginVitest,