mirror of
https://github.com/theoludwig/theoludwig.git
synced 2026-02-20 03:09:20 +01:00
chore: migrate from ESLint/Prettier to Oxc
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
import nextPlugin from "@next/eslint-plugin-next"
|
||||
import configConventions from "eslint-config-conventions"
|
||||
import importXPlugin from "eslint-plugin-import-x"
|
||||
import reactPlugin from "eslint-plugin-react"
|
||||
import reactHooks from "eslint-plugin-react-hooks"
|
||||
import { defineConfig, globalIgnores } from "eslint/config"
|
||||
|
||||
export default defineConfig(
|
||||
...configConventions,
|
||||
reactPlugin.configs.flat.recommended,
|
||||
globalIgnores(["**/kysely.config.ts"]),
|
||||
{
|
||||
name: "config-eslint",
|
||||
settings: {
|
||||
react: {
|
||||
version: "19.2.0",
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
"@next/next": nextPlugin,
|
||||
"import-x": importXPlugin,
|
||||
"react-hooks": reactHooks,
|
||||
},
|
||||
rules: {
|
||||
...nextPlugin.configs.recommended.rules,
|
||||
...nextPlugin.configs["core-web-vitals"].rules,
|
||||
...reactHooks.configs.recommended.rules,
|
||||
"@next/next/no-html-link-for-pages": "off",
|
||||
"@next/next/no-img-element": "off",
|
||||
|
||||
"react/jsx-no-target-blank": "off",
|
||||
"react/no-unknown-property": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/prop-types": "off",
|
||||
"react/self-closing-comp": [
|
||||
"error",
|
||||
{
|
||||
component: true,
|
||||
html: true,
|
||||
},
|
||||
],
|
||||
"react/void-dom-elements-no-children": "error",
|
||||
"react/jsx-boolean-value": "error",
|
||||
"react/iframe-missing-sandbox": "off",
|
||||
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
paths: [
|
||||
{
|
||||
name: "next/navigation",
|
||||
importNames: [
|
||||
"redirect",
|
||||
"permanentRedirect",
|
||||
"useRouter",
|
||||
"usePathname",
|
||||
],
|
||||
message: "Please import from `@repo/i18n/routing` instead.",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"import-x/extensions": [
|
||||
"error",
|
||||
"ignorePackages",
|
||||
{
|
||||
ts: "always",
|
||||
tsx: "always",
|
||||
js: "never",
|
||||
jsx: "never",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
)
|
||||
5
configs/config-eslint/index.d.ts
vendored
5
configs/config-eslint/index.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
import type { defineConfig } from "eslint/config"
|
||||
|
||||
declare const eslintConfig: ReturnType<typeof defineConfig>
|
||||
|
||||
export default eslintConfig
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "@repo/config-eslint",
|
||||
"version": "0.0.0-develop",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"import": "./eslint.config.js",
|
||||
"require": "./eslint.config.js",
|
||||
"default": "./eslint.config.js"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript-eslint": "catalog:",
|
||||
"eslint": "catalog:",
|
||||
"eslint-config-conventions": "catalog:",
|
||||
"eslint-plugin-promise": "catalog:",
|
||||
"eslint-plugin-unicorn": "catalog:",
|
||||
"eslint-plugin-import-x": "catalog:",
|
||||
"@next/eslint-plugin-next": "catalog:",
|
||||
"eslint-plugin-react": "catalog:",
|
||||
"eslint-plugin-react-hooks": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
"globals": "catalog:"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import config from "@repo/config-eslint"
|
||||
|
||||
export default defineConfig(...config, {
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: typescriptESLint.parser,
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -21,13 +21,10 @@
|
||||
"tailwind-merge": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/config-eslint": "workspace:*",
|
||||
"@repo/config-typescript": "workspace:*",
|
||||
"@tailwindcss/postcss": "catalog:",
|
||||
"@tailwindcss/typography": "catalog:",
|
||||
"typescript-eslint": "catalog:",
|
||||
"eslint": "catalog:",
|
||||
"postcss": "catalog:",
|
||||
"tailwindcss": "catalog:",
|
||||
"@tailwindcss/postcss": "catalog:"
|
||||
"tailwindcss": "catalog:"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
@source "../../packages/ui/src";
|
||||
@source "../../packages/blog/src";
|
||||
|
||||
@import "@fontsource/montserrat/400.css" layer(base);
|
||||
@import "@fontsource/montserrat/500.css" layer(base);
|
||||
@import "@fontsource/montserrat/600.css" layer(base);
|
||||
@import "@fontsource/montserrat/700.css" layer(base);
|
||||
@import "@fontsource/montserrat/800.css" layer(base);
|
||||
@import "@fontsource/montserrat/400.css";
|
||||
@import "@fontsource/montserrat/500.css";
|
||||
@import "@fontsource/montserrat/600.css";
|
||||
@import "@fontsource/montserrat/700.css";
|
||||
@import "@fontsource/montserrat/800.css";
|
||||
|
||||
@layer base {
|
||||
[type="search"]::-webkit-search-decoration,
|
||||
|
||||
Reference in New Issue
Block a user