diff --git a/src/common/ast-utils.ts b/src/common/ast-utils.ts index e87b836..2ea8da7 100644 --- a/src/common/ast-utils.ts +++ b/src/common/ast-utils.ts @@ -14,7 +14,10 @@ import type { * @returns `true` if the node is a ` + + + + + const testi18n = { + en: 'hello World', + de: 'Hallo Welt' +} + diff --git a/test/index.js b/test/index.js index 8f8c9a1..26d6f4c 100644 --- a/test/index.js +++ b/test/index.js @@ -539,6 +539,36 @@ describe("Basic tests", () => { }) }) + describe("About fixtures/lang-ts", () => { + it('Should parse lang="ts" blocks as script blocks', () => { + const ast = parse( + [ + "", + '', + '', + 'const testCustom = {}', + ].join("\n"), + ) + const body = ast + }) + it('Should treat lang="ts" blocks as script tags', async () => { + const cli = new ESLint({ + cwd: FIXTURE_DIR, + overrideConfig: { + env: { browser: true, node: true }, + parser: PARSER_PATH, + parserOptions: { + ...BABEL_PARSER_OPTIONS, + sourceType: "module", + ecmaVersion: 2017, + }, + }, + useEslintrc: false, + }) + const report = await cli.lintFiles(["lang-ts.vue"]) + }) + }) + describe("About unexpected-null-character errors", () => { it("should keep NULL in DATA state.", () => { const ast = parse("") 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