From 79574b59461d060b5980edef20beca9d2265cdce Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Fri, 2 Jul 2021 11:27:03 +0900 Subject: [PATCH] Revert default option for `sourceType: module` on `` + const config = { + parser: "vue-eslint-parser", + parserOptions: {}, + rules: { + "vue/valid-template-root": "error", + }, + } + const messages = linter.verify(code, config, "test.vue") + + assert.strictEqual(messages.length, 1) + assert.strictEqual(messages[0].fatal, true) + }) }) }) diff --git a/typings/eslint-scope/index.d.ts b/typings/eslint-scope/index.d.ts index 45c4af98..5e904df2 100644 --- a/typings/eslint-scope/index.d.ts +++ b/typings/eslint-scope/index.d.ts @@ -4,6 +4,7 @@ * See LICENSE file in root directory for full license. */ import type * as estree from "estree" +import type { VisitorKeys } from "eslint-visitor-keys" export interface AnalysisOptions { optimistic?: boolean @@ -14,6 +15,7 @@ export interface AnalysisOptions { fallback?: string | Function sourceType?: "script" | "module" ecmaVersion?: number + childVisitorKeys?: VisitorKeys } export interface ScopeManager {