@@ -15,7 +15,6 @@ import Table from "#core/text/table";
1515import * as utils from "#core/utils" ;
1616import uuid from "#core/uuid" ;
1717import Markdown from "#lib/markdown" ;
18- import { getCliConfig } from "#lib/utils" ;
1918
2019// NOTE: status codes:
2120const STATUSES = {
@@ -412,7 +411,6 @@ export class LintFile {
412411 // private
413412 async #lint ( ) {
414413 const configs = await this . #getConfigs( this . #cwd ) ,
415- cliConfig = this . #getCliConfig( configs . cli ) ,
416414 editorConfig = await this . #getEditorConfig( {
417415 "fallbackToDefault" : configs . package
418416 ? Boolean ( configs . cli )
@@ -479,7 +477,7 @@ export class LintFile {
479477 }
480478
481479 // trim
482- if ( cliConfig ?. lint . trim ) {
480+ if ( editorConfig . trim ) {
483481 this . #data = this . #data. trim ( ) ;
484482 }
485483
@@ -600,9 +598,7 @@ export class LintFile {
600598 if ( editorConfig ) {
601599 prettierConfig . useTabs ??= editorConfig . indent_style === "tab" ;
602600 prettierConfig . tabWidth ??= editorConfig . tab_width ;
603- prettierConfig . printWidth ??= editorConfig . max_line_length === "off"
604- ? Infinity
605- : editorConfig . max_line_length ;
601+ prettierConfig . printWidth ??= editorConfig . max_line_length ?? Infinity ;
606602 prettierConfig . endOfLine ??= editorConfig . end_of_line ;
607603 }
608604
@@ -861,7 +857,12 @@ export class LintFile {
861857 "width" : 100 ,
862858 "columns" : {
863859 "severity" : { "title" : "Severity" , "width" : 10 , "margin" : [ 1 , 0 ] } ,
864- "line" : { "title" : "Line" , "width" : 10 , "align" : "end" , "margin" : [ 0 , 1 ] } ,
860+ "line" : {
861+ "title" : "Line" ,
862+ "width" : 10 ,
863+ "align" : "end" ,
864+ "margin" : [ 0 , 1 ] ,
865+ } ,
865866 "description" : { "title" : "Desctiption" , "margin" : [ 1 , 0 ] } ,
866867 } ,
867868 } ) ;
@@ -995,7 +996,9 @@ export class LintFile {
995996 POSTCSS_CACHE [ preset ] = postcss ( [ cssnano ( { "preset" : CSSNANO_PRESETS [ preset ] } ) ] ) ;
996997 }
997998
998- const res = await POSTCSS_CACHE [ preset ] . process ( this . #data, { "from" : null } ) ;
999+ const res = await POSTCSS_CACHE [ preset ] . process ( this . #data, {
1000+ "from" : null ,
1001+ } ) ;
9991002
10001003 this . #data = res . toString ( ) ;
10011004
@@ -1183,18 +1186,6 @@ export class LintFile {
11831186 }
11841187 }
11851188
1186- #getCliConfig ( path ) {
1187- if ( ! path ) return ;
1188-
1189- this . #cache. cliConfigs ||= new Map ( ) ;
1190-
1191- if ( ! this . #cache. cliConfigs . has ( path ) ) {
1192- this . #cache. cliConfigs . set ( path , getCliConfig ( path ) ) ;
1193- }
1194-
1195- return this . #cache. cliConfigs . get ( path ) ;
1196- }
1197-
11981189 async #getEditorConfig ( { fallbackToDefault } = { } ) {
11991190 this . #cache. editorConfigs ||= new Map ( ) ;
12001191
0 commit comments