File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ void main({
1010 fileEndings : [ "talon" , "talon-list" ] ,
1111
1212 format : async ( text , options , fileName ) => {
13- if ( fileName . endsWith ( ".talon-list" ) ) {
13+ if ( isListFile ( text , fileName ) ) {
1414 const updated = talonListFormatter ( text , options ) ;
1515 return Promise . resolve ( updated ) ;
1616 }
@@ -19,3 +19,13 @@ void main({
1919 return talonFormatter ( node , options ) ;
2020 } ,
2121} ) ;
22+
23+ function isListFile ( text : string , fileName : string ) : boolean {
24+ if ( fileName . endsWith ( ".talon-list" ) ) {
25+ return true ;
26+ }
27+ if ( fileName . endsWith ( ".talon" ) ) {
28+ return false ;
29+ }
30+ return text . startsWith ( "list:" ) ;
31+ }
Original file line number Diff line number Diff line change 1515 "forceConsistentCasingInFileNames" : true ,
1616 "noImplicitReturns" : true
1717 },
18- "include" : [" src" ],
19- "exclude" : [" src/test" , " src/cli" , " src/build.ts" ]
18+ "include" : [" src" ]
2019}
You can’t perform that action at this time.
0 commit comments