Skip to content

Commit 7cd74dd

Browse files
fix(ci): give demo files browser globals in ESLint
The query-string work uses location in App.vue; only src/** had browser globals. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 56fcb55 commit 7cd74dd

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎eslint.config.js‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@ export default ts.config(
4242
'vue/one-component-per-file': 'off',
4343
},
4444
},
45-
// The demo builds a copy-pasteable SFC snippet inside a template literal. That
46-
// string contains a closing script tag, which must stay escaped as `<\/script>`
47-
// — unescaped, it would terminate the demo's own <script setup> block when the
48-
// SFC is parsed. The rule reads the escape as redundant; it is load-bearing.
45+
// Demo runs in the browser (Vite dev server + GitHub Pages).
4946
{
50-
files: ['demo/**/*.vue'],
47+
files: ['demo/**/*.{ts,vue}'],
48+
languageOptions: {
49+
globals: globals.browser,
50+
},
5151
rules: {
52+
// The demo builds a copy-pasteable SFC snippet inside a template literal. That
53+
// string contains a closing script tag, which must stay escaped as `<\/script>`
54+
// — unescaped, it would terminate the demo's own <script setup> block when the
55+
// SFC is parsed. The rule reads the escape as redundant; it is load-bearing.
5256
'no-useless-escape': 'off',
5357
},
5458
},

0 commit comments

Comments
 (0)