From cc11f95348d92f78b8d6527430b944b68758f78e Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Sun, 7 Jul 2024 20:26:03 +0100 Subject: [PATCH] lint: use cache for perf improvement Reduces from ~8s to ~2s --- eslint.config.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 1ac023f4..3fc385bf 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -7,7 +7,10 @@ import solid from 'eslint-plugin-solid/configs/typescript.js' import stylistic from '@stylistic/eslint-plugin' export default [ - { languageOptions: { globals: globals.browser } }, + { + languageOptions: { globals: globals.browser }, + ignores: ['.github', '.husky', '.vscode', 'node_modules', 'dist'], + }, js.configs.recommended, ...ts.configs.recommendedTypeChecked, { @@ -46,6 +49,5 @@ export default [ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }], '@stylistic/semi': ['error', 'never'], }, - ignores: ['node_modules', 'dist'], }, ] diff --git a/package.json b/package.json index 9fd663e0..39ed0974 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build": "vite build", "dev": "vite", "serve": "vite prefix", - "lint": "eslint", + "lint": "eslint --cache --cache-location node_modules/.eslintcache", "prepare": "husky", "pre-commit": "bun lint", "test": "vitest run"