@m-social/oxlint-config
v0.8.0
Published
Shared oxlint configs for projects used at M-Social
Readme
@m-social/oxlint-config
A shareable oxlint configuration used at M-Social
📦 Installation
Install the package using pnpm (recommended):
pnpm add -D oxlint oxlint-tsgolint @m-social/oxlint-configOr with other package managers:
# npm
npm install --save-dev oxlint oxlint-tsgolint @m-social/oxlint-config
# yarn
yarn add -D oxlint oxlint-tsgolint @m-social/oxlint-config🚀 Usage
Create a oxlint.config.ts file in your project root and extend the appropriate configuration:
Base Configuration
import typescriptConfig from "@m-social/oxlint-config/typescript";
export default typescriptConfig;React Configuration
import reactConfig from "@m-social/oxlint-config/react";
import { mergeConfigs } from "@m-social/oxlint-config/utils";
export default mergeConfigs([
reactConfig,
{
settings: {
react: {
version: "19.2",
},
},
},
]);Next.js Configuration
import nextConfig from "@m-social/oxlint-config/next";
import { mergeConfigs } from "@m-social/oxlint-config/utils";
export default mergeConfigs([
nextConfig,
{
settings: {
react: {
version: "19.2",
},
},
},
]);🧩 Extending the Config
To customize any of the provided configurations, use the mergeConfigs utility from @m-social/oxlint-config/utils. It deep-merges an array of config objects, so your overrides are applied on top of the base config without losing any of its defaults.
import typescriptConfig from "@m-social/oxlint-config/typescript";
import { mergeConfigs } from "@m-social/oxlint-config/utils";
export default mergeConfigs([
typescriptConfig,
{
rules: {
// override or add rules here
"no-console": "warn",
},
},
]);The same pattern works with any of the provided configs (/typescript, /react, /next). Simply pass your partial config object as the last element of the array and it will be merged with the base.
🔍 Type-aware Linting
To enable type-aware linting, set options: { typeAware: true } in your oxlint.config.ts via mergeConfigs:
import typescriptConfig from "@m-social/oxlint-config/typescript";
import { mergeConfigs } from "@m-social/oxlint-config/utils";
export default mergeConfigs([
typescriptConfig,
{
options: {
typeAware: true,
},
},
]);📄 License
MIT © M-Social
