From 99bb95755ea09cfc3e08b5352be1773d186c6e6c Mon Sep 17 00:00:00 2001 From: Matthias Hecht Date: Fri, 17 Jan 2025 13:28:36 +0100 Subject: [PATCH] refactor: mark naming convention config as experimental --- README.md | 4 ++-- ...convention.js => experimental-naming-convention.js} | 0 index.d.ts | 10 +++++++++- index.js | 4 ++-- 4 files changed, 13 insertions(+), 5 deletions(-) rename configs/{naming-convention.js => experimental-naming-convention.js} (100%) diff --git a/README.md b/README.md index 6a635b6..781529d 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ This shared ESLint configuration is designed to enforce best practices and recom - [`playwright/prefer-to-have-length`](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-to-have-length.md): enforces the use of `.toHaveLength()` instead of `.toEqual(n)` when testing the length of an object. - [`playwright/require-top-level-describe`](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/require-top-level-describe.md): requires tests to be organized into top-level `describe()` blocks. -### Naming Convention +### (experimental) Naming Convention ```js import boehringer from '@boehringer-ingelheim/eslint-config'; @@ -184,7 +184,7 @@ import boehringer from '@boehringer-ingelheim/eslint-config'; export default boehringer.config( boehringer.configs.strict, // possibly other configs, - boehringer.configs.namingConvention + boehringer.configs.experimentalNamingConvention ); ``` diff --git a/configs/naming-convention.js b/configs/experimental-naming-convention.js similarity index 100% rename from configs/naming-convention.js rename to configs/experimental-naming-convention.js diff --git a/index.d.ts b/index.d.ts index 843e90b..9801cc9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,14 @@ import { Config } from 'typescript-eslint'; -type Configs = 'base' | 'local' | 'nextjs' | 'playwright' | 'prettierDisable' | 'react' | 'strict'; +type Configs = + | 'base' + | 'experimentalNamingConvention' + | 'local' + | 'nextjs' + | 'playwright' + | 'prettierDisable' + | 'react' + | 'strict'; declare module './index' { const config: typeof import('typescript-eslint').config; diff --git a/index.js b/index.js index ef3d0cf..4be0309 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ const tseslint = require('typescript-eslint'); const base = require('./configs/base.js'); +const experimentalNamingConvention = require('./configs/experimental-naming-convention.js'); const local = require('./configs/local.js'); -const namingConvention = require('./configs/naming-convention.js'); const nextjs = require('./configs/nextjs.js'); const playwright = require('./configs/playwright.js'); const prettierDisable = require('./configs/prettier-disable.js'); @@ -13,8 +13,8 @@ module.exports = { config: tseslint.config, configs: { base, + experimentalNamingConvention, local, - namingConvention, nextjs, playwright, prettierDisable,