Skip to content

Commit b899d91

Browse files
committed
feat: add globals to js config
1 parent 2de70bf commit b899d91

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"eslint": "^9.21.0",
4747
"eslint-plugin-oxlint": "^0.15.13",
4848
"eslint-plugin-vue": "~10.0.0",
49+
"globals": "^16.0.0",
4950
"jiti": "^2.4.2",
5051
"npm-run-all2": "^7.0.2",
5152
"oxlint": "^0.15.13",

pnpm-lock.yaml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/eslint.config.js.ejs

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<%_ } _%>
44
import js from '@eslint/js'
55
import pluginVue from 'eslint-plugin-vue'
6+
import globals from 'globals'
67
<%_ for (const { importer } of configsAfterVuePlugin) { _%>
78
<%- importer %>
89
<%_ } _%>
@@ -18,6 +19,12 @@ export default [
1819
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
1920
},
2021

22+
languageOptions: {
23+
globals: {
24+
...globals.browser,
25+
},
26+
},
27+
2128
<%_ for (const { content } of configsBeforeVuePlugin) { _%>
2229
<%- content %><%# TODO: auto-indent if content's multi-line %>
2330
<%_ } _%>

0 commit comments

Comments
 (0)