File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/qwik-nx/src/utils Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,12 @@ export function configureEslint(
19
19
cfg . root ,
20
20
'.eslintrc.json'
21
21
) ;
22
- const existingLibEslintConfig = tree . read ( existingLibEslintConfigPath ) ;
22
+
23
+ let existingLibEslintConfig : Buffer | undefined ;
24
+
25
+ if ( tree . exists ( existingLibEslintConfigPath ) ) {
26
+ existingLibEslintConfig = tree . read ( existingLibEslintConfigPath ) ;
27
+ }
23
28
24
29
lintProjectGenerator ( tree , {
25
30
project : project ,
@@ -34,7 +39,10 @@ export function configureEslint(
34
39
35
40
const viteConfigFileName = 'vite.config.ts' ;
36
41
const eslintIgnorePath = './.eslintignore' ;
37
- const eslintIgnore = tree . read ( eslintIgnorePath ) ?. toString ( ) ?? '' ;
42
+ let eslintIgnore = '' ;
43
+ if ( tree . exists ( eslintIgnorePath ) ) {
44
+ eslintIgnore = tree . read ( eslintIgnorePath ) ?. toString ( ) ?? '' ;
45
+ }
38
46
if ( ! eslintIgnore . includes ( viteConfigFileName ) ) {
39
47
tree . write (
40
48
eslintIgnorePath ,
You can’t perform that action at this time.
0 commit comments