File tree 3 files changed +20
-1
lines changed
packages/eslint-plugin-svelte
3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 60
60
"@jridgewell/sourcemap-codec" : " ^1.5.0" ,
61
61
"eslint-compat-utils" : " ^0.6.4" ,
62
62
"esutils" : " ^2.0.3" ,
63
+ "globals" : " ^15.14.0" ,
63
64
"known-css-properties" : " ^0.35.0" ,
64
65
"postcss" : " ^8.4.49" ,
65
66
"postcss-load-config" : " ^3.1.4" ,
Original file line number Diff line number Diff line change 2
2
// This file has been automatically generated,
3
3
// in order to update its content execute "pnpm run update"
4
4
import type { ESLint , Linter } from 'eslint' ;
5
+ import globals from 'globals' ;
5
6
import * as parser from 'svelte-eslint-parser' ;
6
7
let pluginObject : ESLint . Plugin | null = null ;
7
8
export function setPluginObject ( plugin : ESLint . Plugin ) : void {
@@ -14,13 +15,21 @@ const config: Linter.Config[] = [
14
15
get svelte ( ) : ESLint . Plugin {
15
16
return pluginObject ! ;
16
17
}
18
+ } ,
19
+ languageOptions : {
20
+ globals : {
21
+ ...globals . browser
22
+ }
17
23
}
18
24
} ,
19
25
{
20
26
name : 'svelte:base:setup-for-svelte' ,
21
27
files : [ '*.svelte' , '**/*.svelte' ] ,
22
28
languageOptions : {
23
- parser
29
+ parser,
30
+ globals : {
31
+ ...globals . browser
32
+ }
24
33
} ,
25
34
rules : {
26
35
// ESLint core rules known to cause problems with `.svelte`.
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const baseContent = `/*
14
14
* in order to update its content execute "pnpm run update"
15
15
*/
16
16
import type { ESLint, Linter } from 'eslint';
17
+ import globals from 'globals';
17
18
import * as parser from 'svelte-eslint-parser';
18
19
let pluginObject: ESLint.Plugin | null = null;
19
20
export function setPluginObject(plugin: ESLint.Plugin): void {
@@ -27,12 +28,20 @@ const config: Linter.Config[] = [
27
28
return pluginObject!;
28
29
}
29
30
},
31
+ languageOptions: {
32
+ globals: {
33
+ ...globals.browser
34
+ },
35
+ },
30
36
},
31
37
{
32
38
name: 'svelte:base:setup-for-svelte',
33
39
files: ["*.svelte", "**/*.svelte"],
34
40
languageOptions: {
35
41
parser: parser,
42
+ globals: {
43
+ ...globals.browser
44
+ },
36
45
},
37
46
rules: {
38
47
// ESLint core rules known to cause problems with \`.svelte\`.
You can’t perform that action at this time.
0 commit comments