From 8d3ff6118b32f0101eb5c442917681d60ea4991e Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Mon, 16 Dec 2024 15:30:13 +0000 Subject: [PATCH] eslint ignores needs to be the lone key to act globally --- files-override/js/eslint.config.mjs | 9 +++++++++ files-override/ts/eslint.config.mjs | 26 ++++++++++++++++---------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/files-override/js/eslint.config.mjs b/files-override/js/eslint.config.mjs index 0d67eb3..518e50d 100644 --- a/files-override/js/eslint.config.mjs +++ b/files-override/js/eslint.config.mjs @@ -21,7 +21,16 @@ export default [ js.configs.recommended, prettier, { + /** + * Ignores must be in their own object + * https://eslint.org/docs/latest/use/configure/ignore + */ ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'], + }, + { + /** + * https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options + */ linterOptions: { reportUnusedDisableDirectives: 'error', }, diff --git a/files-override/ts/eslint.config.mjs b/files-override/ts/eslint.config.mjs index 4fbe283..03a8377 100644 --- a/files-override/ts/eslint.config.mjs +++ b/files-override/ts/eslint.config.mjs @@ -31,6 +31,21 @@ const parserOptions = { export default ts.config( js.configs.recommended, prettier, + { + /** + * Ignores must be in their own object + * https://eslint.org/docs/latest/use/configure/ignore + */ + ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'], + }, + { + /** + * https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options + */ + linterOptions: { + reportUnusedDisableDirectives: 'error', + }, + }, { files: ['**/*.js'], languageOptions: { @@ -133,14 +148,5 @@ export default ts.config( ...globals.node, }, }, - }, - /** - * Settings - */ - { - ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'], - linterOptions: { - reportUnusedDisableDirectives: 'error', - }, - }, + } );