From 8388e2763e48ff13fa6967d57f9e06f5a8102521 Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Sun, 13 Oct 2024 20:29:44 -0300 Subject: [PATCH] fix(dev): ignore json files from linting --- eslint.config.js | 17 +++++++++++++---- tsconfig.json | 8 +++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index feedea6..3b18fcb 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -24,6 +24,9 @@ const config = [ ignores: [ 'node_modules', 'package-lock.json', + 'package.json', + 'tsconfig.json', + '.vscode', 'dist', ], }, @@ -32,6 +35,16 @@ const config = [ js.configs.recommended, (/** @type {Config} */ (ts.configs.eslintRecommended)), ...(/** @type {Config[]} */ (ts.configs.strictTypeChecked)), + { + languageOptions: { + parserOptions: { + projectService: true, + // @ts-expect-error import.meta.dirname is not defined but works in NodeJS + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + tsconfigRootDir: import.meta.dirname, + }, + }, + }, // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (/** @type {Config} */ (imports.flatConfigs.recommended)), { @@ -70,10 +83,6 @@ const config = [ ecmaFeatures: { impliedStrict: true, }, - projectService: true, - // @ts-expect-error import.meta.dirname is not defined but works in NodeJS - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - tsconfigRootDir: import.meta.dirname, }, sourceType: 'module', }, diff --git a/tsconfig.json b/tsconfig.json index 0d1135c..f050fde 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,18 +11,16 @@ "skipLibCheck": true, "sourceMap": true, "strict": true, - "target": "ESNext", + "target": "ESNext" }, "include": [ "./assets/**/*", "./eslint.config.js", "./uno.config.js", - "./package.json", - "./tsconfig.json", - "./.vscode/*.json", + "**/*.json" ], "exclude": [ "./node_modules/**", - "./dist", + "./dist" ] }