From c7d9e9d62afb56f3ef02a7f744372156d98570e8 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Tue, 24 Sep 2024 12:50:02 -0400 Subject: [PATCH] Globally apply `ignores` patterns - if an ignores key is used without any other keys in the configuration object, then the patterns act as global ignores. > https://eslint.org/docs/latest/use/configure/ignore#ignoring-files --- eslint.config.mjs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 029ede62e5..d58b29dd77 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -5,17 +5,21 @@ import typescript from '@metamask/eslint-config-typescript'; import tseslint from 'typescript-eslint'; const config = tseslint.config({ - extends: [...base, ...nodejs], ignores: [ - '!.eslintrc.js', + '!.eslint.config.mjs', '!jest.config.js', - 'node_modules', - '**/dist', - '**/docs', - '**/coverage', - 'merged-packages', - 'scripts/create-package/package-template', + 'yarn.lock', + '**/*.d.ts', + '**/**.map', + '**/dist/**', + '**/docs/**', + '**/coverage/**', + 'merged-packages/**', + 'scripts/create-package/package-template/**', ], +}, +{ + extends: [...base, ...nodejs], rules: { // Left disabled because various properties throughough this repo are snake_case because the // names come from external sources or must comply with standards