-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: prisis <[email protected]>
- Loading branch information
Showing
13 changed files
with
230 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/eslint-config/src/config/plugins/react-refresh.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { TypedFlatConfigItem } from "../../types"; | ||
import interopDefault from "../../utils/interop-default"; | ||
|
||
const reactRefresh = async ({ hasVite }: { hasVite: boolean }): Promise<TypedFlatConfigItem[]> => { | ||
const reactRefreshPlugin = await interopDefault(import("eslint-plugin-react-refresh")); | ||
|
||
return [ | ||
hasVite ? reactRefreshPlugin.configs.vite : reactRefreshPlugin.configs.recommended, | ||
]; | ||
}; | ||
|
||
export default reactRefresh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/eslint-config/src/config/plugins/tanstack-router.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { OptionsFiles, OptionsOverrides } from "../../types"; | ||
import { createConfig } from "../../utils/create-config"; | ||
import interopDefault from "../../utils/interop-default"; | ||
|
||
export default createConfig<OptionsFiles & OptionsOverrides>("all", async (config, oFiles) => { | ||
const { files = oFiles, overrides } = config; | ||
|
||
const pluginTanstackRouter = await interopDefault(import("@tanstack/eslint-plugin-router")); | ||
|
||
return [{ | ||
files, | ||
plugins: { | ||
"@tanstack/router": pluginTanstackRouter, | ||
}, | ||
rules: { | ||
...pluginTanstackRouter.configs["recommended"].rules, | ||
...overrides, | ||
}, | ||
}]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.