From 2ad63aa1c46bf9140a0b30e26cd7597dd3a3c640 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 28 Jun 2024 17:15:45 +1000 Subject: [PATCH] fix(eslint): Add excluded paths --- integrations/solid/src/App.tsx | 2 +- src/eslint/index.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/integrations/solid/src/App.tsx b/integrations/solid/src/App.tsx index a167f3a..8d415e9 100644 --- a/integrations/solid/src/App.tsx +++ b/integrations/solid/src/App.tsx @@ -7,7 +7,7 @@ function App() { <>

Vite + Solid

-

diff --git a/src/eslint/index.js b/src/eslint/index.js index 850aa25..3b915da 100644 --- a/src/eslint/index.js +++ b/src/eslint/index.js @@ -5,11 +5,23 @@ import { javascriptRules } from './javascript.js' import { importRules } from './import.js' import { typescriptRules } from './typescript.js' +const GLOB_INCLUDE = ['**/*.{js,svelte,ts,tsx,vue}'] + +const GLOB_EXCLUDE = [ + '**/.nx/**', + '**/.svelte-kit/**', + '**/build/**', + '**/coverage/**', + '**/dist/**', + '**/snap/**', +] + /** @type {import('eslint').Linter.FlatConfig[]} */ export const tanstackConfig = [ { name: 'tanstack/setup', - files: ['**/*.{js,svelte,ts,tsx,vue}'], + files: GLOB_INCLUDE, + ignores: GLOB_EXCLUDE, languageOptions: { sourceType: 'module', ecmaVersion: 2020,