File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,15 +3,17 @@ import pluginReact from "eslint-plugin-react";
33import pluginReactHooks from "eslint-plugin-react-hooks" ;
44import pluginReactRefresh from "eslint-plugin-react-refresh" ;
55import reactYouMightNotNeedAnEffect from "eslint-plugin-react-you-might-not-need-an-effect" ;
6- import { isPackageExists } from "local-pkg" ;
6+ import { isPackageListedSync } from "local-pkg" ;
77import type { ConfigWithExtends } from "typescript-eslint" ;
88
99const nextJsPackages = [ "next" ] ;
1010const vitePackages = [ "vite" ] ;
1111
1212export async function react ( ) : Promise < ConfigWithExtends [ ] > {
13- const isUsingNext = nextJsPackages . some ( ( index ) => isPackageExists ( index ) ) ;
14- const isUsingVite = vitePackages . some ( ( index ) => isPackageExists ( index ) ) ;
13+ const isUsingNext = nextJsPackages . some ( ( index ) =>
14+ isPackageListedSync ( index ) ,
15+ ) ;
16+ const isUsingVite = vitePackages . some ( ( index ) => isPackageListedSync ( index ) ) ;
1517
1618 const nextjsConfig : ConfigWithExtends [ ] = [ ] ;
1719
You can’t perform that action at this time.
0 commit comments