File tree Expand file tree Collapse file tree 5 files changed +25
-13
lines changed
Expand file tree Collapse file tree 5 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ const content = "hi!";
1414
1515
1616<script >
17+ let { log: logger } = console
1718 document.querySelector('h1')?.addEventListener('click', () => {
18- alert('hi! ');
19+ logger('clicked ');
1920 });
20-
2121</script >
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ const content = 'hi!';
1414
1515
1616<script >
17- document.querySelector('h1')?.addEventListener('click', () => {
18- alert('hi!');
19- });
20-
17+ const { log: logger } = console
18+ document.querySelector('h1')?.addEventListener('click', () => {
19+ logger('clicked')
20+ })
2121</script >
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ const content = 'hi!';
1414
1515
1616<script >
17- document.querySelector('h1')?.addEventListener('click', () => {
18- alert('hi!');
19- });
20-
17+ const { log: logger } = console
18+ document.querySelector('h1')?.addEventListener('click', () => {
19+ logger('clicked')
20+ })
2121</script >
Original file line number Diff line number Diff line change 4242 "@eslint-react/eslint-plugin" : " ^1.5.8" ,
4343 "@prettier/plugin-xml" : " ^3.4.1" ,
4444 "@unocss/eslint-plugin" : " >=0.50.0" ,
45- "astro-eslint-parser" : " ^0.16.3 " ,
45+ "astro-eslint-parser" : " ^1.0.2 " ,
4646 "eslint" : " >=8.40.0" ,
47- "eslint-plugin-astro" : " ^0.31.4 " ,
47+ "eslint-plugin-astro" : " ^1.2.0 " ,
4848 "eslint-plugin-format" : " >=0.1.0" ,
4949 "eslint-plugin-react-hooks" : " ^4.6.0" ,
5050 "eslint-plugin-react-refresh" : " ^0.4.4" ,
Original file line number Diff line number Diff line change @@ -31,16 +31,28 @@ export async function astro(
3131 {
3232 files,
3333 languageOptions : {
34+ globals : pluginAstro . environments . astro . globals ,
3435 parser : parserAstro ,
3536 parserOptions : {
3637 extraFileExtensions : [ '.astro' ] ,
37- parser : parserTs as any ,
38+ parser : parserTs ,
3839 } ,
40+ sourceType : 'module' ,
3941 } ,
4042 name : 'antfu/astro/rules' ,
43+ processor : 'astro/client-side-ts' ,
4144 rules : {
45+ // use recommended rules
46+ 'astro/missing-client-only-directive-value' : 'error' ,
47+ 'astro/no-conflict-set-directives' : 'error' ,
48+ 'astro/no-deprecated-astro-canonicalurl' : 'error' ,
49+ 'astro/no-deprecated-astro-fetchcontent' : 'error' ,
50+ 'astro/no-deprecated-astro-resolve' : 'error' ,
51+ 'astro/no-deprecated-getentrybyslug' : 'error' ,
4252 'astro/no-set-html-directive' : 'off' ,
53+ 'astro/no-unused-define-vars-in-style' : 'error' ,
4354 'astro/semi' : 'off' ,
55+ 'astro/valid-compile' : 'error' ,
4456
4557 ...stylistic
4658 ? {
You can’t perform that action at this time.
0 commit comments