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 @@ import { ACTIVATION } from "./config";
1010export const execCommand = async (
1111 cmd : string ,
1212 args : string [ ] ,
13- options ?: Options
13+ options ?: Options ,
1414) => {
1515 try {
1616 const res = await execa ( cmd , args , options ) ;
@@ -63,7 +63,7 @@ export const loggerError = (content: string | unknown) => {
6363
6464export function filterFiles (
6565 fileList : string [ ] ,
66- allowedExtensions : string [ ]
66+ allowedExtensions : string [ ] ,
6767) : string [ ] {
6868 const filteredFiles : string [ ] = [ ] ;
6969
@@ -113,13 +113,14 @@ export const getLintFiles = async (
113113 cwd : string ,
114114 staged : boolean ,
115115 paths : string [ ] ,
116- suffix : string [ ]
116+ suffix : string [ ] ,
117117) => {
118118 let files : string [ ] = [ ] ;
119119 if ( staged ) {
120120 const result = await execCommand ( "git" , [
121121 "diff" ,
122122 "--name-only" ,
123+ "--diff-filter=d" ,
123124 "--cached" ,
124125 ] ) ;
125126 files = result ?. split ( "\n" ) . map ( ( path ) => `${ cwd } /${ path } ` ) || [ ] ;
You can’t perform that action at this time.
0 commit comments