File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { ACTIVATION } from "./config";
10
10
export const execCommand = async (
11
11
cmd : string ,
12
12
args : string [ ] ,
13
- options ?: Options
13
+ options ?: Options ,
14
14
) => {
15
15
try {
16
16
const res = await execa ( cmd , args , options ) ;
@@ -63,7 +63,7 @@ export const loggerError = (content: string | unknown) => {
63
63
64
64
export function filterFiles (
65
65
fileList : string [ ] ,
66
- allowedExtensions : string [ ]
66
+ allowedExtensions : string [ ] ,
67
67
) : string [ ] {
68
68
const filteredFiles : string [ ] = [ ] ;
69
69
@@ -113,13 +113,14 @@ export const getLintFiles = async (
113
113
cwd : string ,
114
114
staged : boolean ,
115
115
paths : string [ ] ,
116
- suffix : string [ ]
116
+ suffix : string [ ] ,
117
117
) => {
118
118
let files : string [ ] = [ ] ;
119
119
if ( staged ) {
120
120
const result = await execCommand ( "git" , [
121
121
"diff" ,
122
122
"--name-only" ,
123
+ "--diff-filter=d" ,
123
124
"--cached" ,
124
125
] ) ;
125
126
files = result ?. split ( "\n" ) . map ( ( path ) => `${ cwd } /${ path } ` ) || [ ] ;
You can’t perform that action at this time.
0 commit comments