From a8f15dc3a35fc6e6d774d8e766985772009862f0 Mon Sep 17 00:00:00 2001 From: Matthias Hecht Date: Fri, 17 Jan 2025 10:41:44 +0100 Subject: [PATCH 1/5] fix(base): turn off import/no-unused-modules for now this rule is currently not compatible with flat-configs. It should be reactivated ASAP --- configs/base.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/configs/base.js b/configs/base.js index 7d85c86..89f3899 100644 --- a/configs/base.js +++ b/configs/base.js @@ -74,14 +74,11 @@ module.exports = tseslint.config( // eslint-plugin-import: https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules 'import/no-cycle': 'error', - 'import/no-unused-modules': [ - 'error', - { - missingExports: true, - src: ['.'], - unusedExports: true, - }, - ], + // We have to deactive this rule (import/no-unused-modules) for now as it is not compatible with flat-configs (without adding an artifical .eslint file. + // See: https://github.com/import-js/eslint-plugin-import/issues/3079#issuecomment-2557191925 + // As soon this is resolved, we should activate this rule again as seen here: + // https://github.com/Boehringer-Ingelheim/eslint-config/blob/9f028ed43bb5db11082a2982f249ddfe7eaf5c13/configs/base.js#L77 + 'import/no-unused-modules': 'off', 'import/order': 'off', // disabled due to conflict with eslint-plugin-perfectionist 'import/prefer-default-export': 'off', From a410e8eed04e5bde28eb6aa14be19858bb685cc9 Mon Sep 17 00:00:00 2001 From: Matthias Hecht Date: Fri, 17 Jan 2025 11:00:20 +0100 Subject: [PATCH 2/5] fix: publishes type declarations --- index.d.ts | 2 +- package.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 35c8216..843e90b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,6 @@ import { Config } from 'typescript-eslint'; -type Configs = 'base' | 'local' | 'playwright' | 'prettier-disable' | 'react' | 'strict'; +type Configs = 'base' | 'local' | 'nextjs' | 'playwright' | 'prettierDisable' | 'react' | 'strict'; declare module './index' { const config: typeof import('typescript-eslint').config; diff --git a/package.json b/package.json index 600a9ff..2b5c8b3 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,12 @@ "license": "MIT", "files": [ "configs", - "lib" + "lib", + "index.js", + "index.d.ts" ], "main": "index.js", + "types": "index.d.ts", "scripts": { "prepare": "husky", "release": "dotenv -- semantic-release --no-ci", From dc2505824f2d108e09c08a67af80a4fe94563a35 Mon Sep 17 00:00:00 2001 From: Matthias Hecht Date: Fri, 17 Jan 2025 11:07:02 +0100 Subject: [PATCH 3/5] Update configs/base.js Co-authored-by: Simon Golms <17799657+SimonGolms@users.noreply.github.com> --- configs/base.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configs/base.js b/configs/base.js index 89f3899..4c0c90b 100644 --- a/configs/base.js +++ b/configs/base.js @@ -74,10 +74,12 @@ module.exports = tseslint.config( // eslint-plugin-import: https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules 'import/no-cycle': 'error', - // We have to deactive this rule (import/no-unused-modules) for now as it is not compatible with flat-configs (without adding an artifical .eslint file. - // See: https://github.com/import-js/eslint-plugin-import/issues/3079#issuecomment-2557191925 - // As soon this is resolved, we should activate this rule again as seen here: - // https://github.com/Boehringer-Ingelheim/eslint-config/blob/9f028ed43bb5db11082a2982f249ddfe7eaf5c13/configs/base.js#L77 + /** + * The rule is disabled for now as it is not compatible with flat-configs, without adding an artifical `.eslintrc` file. + * + * @see: https://github.com/import-js/eslint-plugin-import/issues/3079#issuecomment-2557191925 + * @todo Enable rule, as soon as fix is available: https://github.com/Boehringer-Ingelheim/eslint-config/blob/9f028ed43bb5db11082a2982f249ddfe7eaf5c13/configs/base.js#L77 + */ 'import/no-unused-modules': 'off', 'import/order': 'off', // disabled due to conflict with eslint-plugin-perfectionist 'import/prefer-default-export': 'off', From 1c89fb3c365f8b0a3e423187425995e0a2bf5299 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 17 Jan 2025 10:09:05 +0000 Subject: [PATCH 4/5] chore(release): 7.0.0-next.7 [skip ci] # [7.0.0-next.7](https://github.com/Boehringer-Ingelheim/eslint-config/compare/v7.0.0-next.6...v7.0.0-next.7) (2025-01-17) ### Bug Fixes * **base:** turn off import/no-unused-modules for now ([a8f15dc](https://github.com/Boehringer-Ingelheim/eslint-config/commit/a8f15dc3a35fc6e6d774d8e766985772009862f0)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64d9080..561da60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [7.0.0-next.7](https://github.com/Boehringer-Ingelheim/eslint-config/compare/v7.0.0-next.6...v7.0.0-next.7) (2025-01-17) + + +### Bug Fixes + +* **base:** turn off import/no-unused-modules for now ([a8f15dc](https://github.com/Boehringer-Ingelheim/eslint-config/commit/a8f15dc3a35fc6e6d774d8e766985772009862f0)) + # [7.0.0-next.6](https://github.com/Boehringer-Ingelheim/eslint-config/compare/v7.0.0-next.5...v7.0.0-next.6) (2025-01-15) diff --git a/package-lock.json b/package-lock.json index 6fce336..256d83c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@boehringer-ingelheim/eslint-config", - "version": "7.0.0-next.6", + "version": "7.0.0-next.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@boehringer-ingelheim/eslint-config", - "version": "7.0.0-next.6", + "version": "7.0.0-next.7", "license": "MIT", "dependencies": { "@eslint/js": "^9.18.0", diff --git a/package.json b/package.json index 600a9ff..cc656aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@boehringer-ingelheim/eslint-config", - "version": "7.0.0-next.6", + "version": "7.0.0-next.7", "description": "Shared eslint configuration used at Boehringer Ingelheim for code styling", "keywords": [ "boehringer", From e56ed6fb700bd309f2884c5f8149b32192a21905 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 17 Jan 2025 10:11:31 +0000 Subject: [PATCH 5/5] chore(release): 7.0.0-next.8 [skip ci] # [7.0.0-next.8](https://github.com/Boehringer-Ingelheim/eslint-config/compare/v7.0.0-next.7...v7.0.0-next.8) (2025-01-17) ### Bug Fixes * publishes type declarations ([a410e8e](https://github.com/Boehringer-Ingelheim/eslint-config/commit/a410e8eed04e5bde28eb6aa14be19858bb685cc9)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 561da60..3670a79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [7.0.0-next.8](https://github.com/Boehringer-Ingelheim/eslint-config/compare/v7.0.0-next.7...v7.0.0-next.8) (2025-01-17) + + +### Bug Fixes + +* publishes type declarations ([a410e8e](https://github.com/Boehringer-Ingelheim/eslint-config/commit/a410e8eed04e5bde28eb6aa14be19858bb685cc9)) + # [7.0.0-next.7](https://github.com/Boehringer-Ingelheim/eslint-config/compare/v7.0.0-next.6...v7.0.0-next.7) (2025-01-17) diff --git a/package-lock.json b/package-lock.json index 256d83c..a75fc07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@boehringer-ingelheim/eslint-config", - "version": "7.0.0-next.7", + "version": "7.0.0-next.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@boehringer-ingelheim/eslint-config", - "version": "7.0.0-next.7", + "version": "7.0.0-next.8", "license": "MIT", "dependencies": { "@eslint/js": "^9.18.0", diff --git a/package.json b/package.json index abb49a3..b8c7a84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@boehringer-ingelheim/eslint-config", - "version": "7.0.0-next.7", + "version": "7.0.0-next.8", "description": "Shared eslint configuration used at Boehringer Ingelheim for code styling", "keywords": [ "boehringer",