From 76c7a965d76fd4b5b4466fd26a1a56425c394de8 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Mon, 14 Oct 2024 22:26:27 +0800 Subject: [PATCH 1/3] docs: keep the line length short to avoid scrollbars on GitHub --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 182c330..273b6fb 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ export default [ ...vueTsEslintConfig({ // Optional: extend additional configurations from `typescript-eslint`. - // Supports all the configurations in https://typescript-eslint.io/users/configs#recommended-configurations + // Supports all the configurations in + // https://typescript-eslint.io/users/configs#recommended-configurations extends: [ // By default, only the recommended rules are enabled. "recommended", From d414c99b6e325a2be1073f63cb5836f51f6cb853 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Tue, 15 Oct 2024 15:54:23 +0800 Subject: [PATCH 2/3] fix: if no matching files found, skip setting the corresponding config ESLint config's schema requires the `files` key to be a non-empty array Fixes https://github.com/neanes/neanes/pull/1030#pullrequestreview-2367528558 --- src/index.ts | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/index.ts b/src/index.ts index 812037d..c8d887e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,7 +51,10 @@ export default function createConfig({ files: ['**/*.js', '**/*.jsx'], ...tseslint.configs.disableTypeChecked, }, - { + ] + + if (otherVueFiles.length > 0) { + projectServiceConfigs.push({ name: 'vue-typescript/skip-type-checking-for-vue-files-without-ts', files: otherVueFiles, ...tseslint.configs.disableTypeChecked, @@ -63,9 +66,9 @@ export default function createConfig({ // https://github.com/typescript-eslint/typescript-eslint/issues/4755#issuecomment-1080961338 '@typescript-eslint/consistent-type-imports': 'off', '@typescript-eslint/prefer-optional-chain': 'off', - } - }, - ] + }, + }) + } const mayHaveJsxInSfc = supportedScriptLangs.jsx || supportedScriptLangs.tsx const needsTypeAwareLinting = configNamesToExtend.some( @@ -87,18 +90,20 @@ export default function createConfig({ }, }) - projectServiceConfigs.push({ - name: 'vue-typescript/default-project-service-for-vue-files', - files: vueFilesWithScriptTs, - languageOptions: { - parser: vueParser, - parserOptions: { - projectService: true, - parser: tseslint.parser, - extraFileExtensions, + if (vueFilesWithScriptTs.length > 0) { + projectServiceConfigs.push({ + name: 'vue-typescript/default-project-service-for-vue-files', + files: vueFilesWithScriptTs, + languageOptions: { + parser: vueParser, + parserOptions: { + projectService: true, + parser: tseslint.parser, + extraFileExtensions, + }, }, - }, - }) + }) + } // Vue's own typing inevitably contains some `any`s, so some of the `no-unsafe-*` rules can't be used. projectServiceConfigs.push({ From 3bca91e5c83a0de8f3213ba28888dcc67b08cd23 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Tue, 15 Oct 2024 15:56:09 +0800 Subject: [PATCH 3/3] 14.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5e2180..f1b75d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vue/eslint-config-typescript", - "version": "14.1.0", + "version": "14.1.1", "description": "ESLint config for TypeScript + Vue.js projects", "main": "./dist/index.mjs", "type": "module", pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy