This makes assumptions about the way you prefer to develop software and gives you configurations that will actually help you in your development.
npm install @ivosabev/config
yarn add @ivosabev/config
pnpm add @ivosabev/config
Create an .oxfmtrc.json file in your project root that extends the shared config:
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 140,
"singleQuote": true,
"bracketSpacing": false
}Or copy the config from @ivosabev/config/oxfmt and customize as needed.
Customizing Oxfmt
Copy node_modules/@ivosabev/config/oxfmt.json to your project root as .oxfmtrc.json and modify it. See the Oxfmt config reference for all available options.
Create an .oxlintrc.json file in your project root:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"extends": ["@ivosabev/config/oxlint"]
}Or copy the config from @ivosabev/config/oxlint and customize as needed.
Customizing Oxlint
Copy node_modules/@ivosabev/config/oxlint.json to your project root as .oxlintrc.json and modify it. See the Oxlint config reference for all available options.
Create a tsconfig.json file in your project root with the following content:
{
"extends": "@ivosabev/config/typescript",
"include": ["@ivosabev/config/reset.d.ts", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
"compilerOptions": {
"paths": {
"#app/*": ["./app/*"],
"#tests/*": ["./tests/*"]
}
}
}If you want to build with tsc create a tsconfig.build.json file in your project root with the following content:
{
"extends": "@ivosabev/config/typescript/build",
"include": ["@ivosabev/config/reset.d.ts", "src", "tailwind.config.ts"],
"compilerOptions": {
"declarationDir": "dist/dts",
"outDir": "dist/esm",
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo"
}
}Customizing TypeScript
Learn more from the TypeScript docs here.
You may want to add the following scripts to your project:
{
"fmt": "oxfmt",
"fmt:check": "oxfmt --check",
"lint": "oxlint",
"lint-check": "oxlint",
"typecheck": "tsc",
"validate": "run-p -l lint fmt:check typecheck"
}This package previously used ESLint and Prettier. It now uses Oxlint and Oxfmt from the Oxc project.
See unsupported.md for a list of rules and features that could not be directly migrated.
- https://github.com/epicweb-dev/config
- https://github.com/remix-run/remix/tree/main/packages/remix-eslint-config
- https://github.com/total-typescript/tsconfig
- https://github.com/mattpocock/ts-reset
- https://oxc.rs
MIT