File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,19 @@ export default (api: IApi) => {
11
11
api ?. config ?. esm ?. input || api ?. config ?. esm ?. input || 'src/' ;
12
12
13
13
const { execSync } = require ( 'child_process' ) ;
14
- execSync (
15
- `npx eslint ${ inputFolder } --ext .tsx,.ts --rule '@typescript-eslint/consistent-type-exports: error'` ,
16
- {
17
- cwd : process . cwd ( ) ,
18
- env : process . env ,
19
- stdio : [ process . stdin , process . stdout , process . stderr ] ,
20
- encoding : 'utf-8' ,
21
- } ,
22
- ) ;
14
+ try {
15
+ execSync (
16
+ `npx eslint ${ inputFolder } --ext .tsx,.ts --rule '@typescript-eslint/consistent-type-exports: error'` ,
17
+ {
18
+ cwd : process . cwd ( ) ,
19
+ env : process . env ,
20
+ stdio : [ process . stdin , process . stdout , process . stderr ] ,
21
+ encoding : 'utf-8' ,
22
+ } ,
23
+ ) ;
24
+ } catch ( error ) {
25
+ console . log ( 'ESLint is not installed, skip.' ) ;
26
+ }
23
27
} ) ;
24
28
25
29
// modify default build config for all rc projects
You can’t perform that action at this time.
0 commit comments