File tree Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " astro-eslint-parser " : minor
3+ ---
4+
5+ feat: to parse using ` project: true ` instead if ` projectService ` is specified
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function isActive(path) {
3232 baseUrl: { JSON .stringify (baseUrl )}
3333 </div >
3434 <><SnsBar client:only =" svelte" /></>
35- <a href =" https://github.com/ota-meshi/astro-eslint-parser" class = " github-link "
35+ <a class = " github-link " href =" https://github.com/ota-meshi/astro-eslint-parser"
3636 >View on GitHub
3737 </a >
3838</header >
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ const { title } = Astro.props as Props;
1111<html lang =" en" >
1212 <head >
1313 <meta charset =" UTF-8" />
14- <meta name = " viewport " content =" width=device-width" />
15- <link rel =" icon" type =" image/x-icon" href = " /favicon.ico " />
14+ <meta content =" width=device-width" name = " viewport " />
15+ <link href = " /favicon.ico " rel =" icon" type =" image/x-icon" />
1616 <title >{ title } </title >
17- <meta name = " description " content =" Astro component parser for ESLint" />
17+ <meta content =" Astro component parser for ESLint" name = " description " />
1818 </head >
1919 <body >
2020 <Header />
Original file line number Diff line number Diff line change @@ -98,7 +98,20 @@ function parseScriptInternal(
9898 parserOptions . project
9999 ) {
100100 patchResult = tsPatch ( parserOptions , parserOptionsCtx . getTSParserName ( ) ! ) ;
101+ } else if (
102+ parserOptionsCtx . isTypeScript ( ) &&
103+ parserOptions . filePath &&
104+ parserOptions . projectService
105+ ) {
106+ console . warn (
107+ "`astro-eslint-parser` does not support the `projectService` option, it will parse it as `project: true` instead." ,
108+ ) ;
109+ patchResult = tsPatch (
110+ { ...parserOptions , project : true } ,
111+ parserOptionsCtx . getTSParserName ( ) ! ,
112+ ) ;
101113 }
114+
102115 const result = isEnhancedParserObject ( parser )
103116 ? patchResult ?. parse
104117 ? patchResult . parse ( code , parser )
You can’t perform that action at this time.
0 commit comments