牛林配置
以克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克.
使用量
// oxlint.config.ts
import { defineConfig } from "oxlint";
import reactTypescript from "@cybozu/oxlint-config/presets/react-typescript";
export default defineConfig({ extends: [reactTypescript] });
预设
presets/basepresets/kintone-customizepresets/kintone-devpresets/nodepresets/node-typescriptpresets/reactpresets/react-compilerpresets/react-typescriptpresets/typescript
这个 *-typescript 预设启用类型意识规则,其中需要 oxlint-tsgolint 将安装.
反应编译器规则( opt- in)
presets/react-compiler 是一个添加的预设, 允许 React 编译器规则
(单位:千美元) recommended 一组 eslint-plugin-react-hooks) (中文(简体) ). 将其与反应预设合并 :
import { defineConfig } from "oxlint";
import reactTypescript from "@cybozu/oxlint-config/presets/react-typescript";
import reactCompiler from "@cybozu/oxlint-config/presets/react-compiler";
export default defineConfig({ extends: [reactTypescript, reactCompiler] });
动通发展规则(选入)
presets/kintone-dev 是一个附加的预设,它允许开发相通的自定义规则.
其中不包括 base,因此结合到另一个预设中:
import { defineConfig } from "oxlint";
import reactTypescript from "@cybozu/oxlint-config/presets/react-typescript";
import kintoneDev from "@cybozu/oxlint-config/presets/kintone-dev";
export default defineConfig({ extends: [reactTypescript, kintoneDev] });
见 src/plugins/kintone/README.md 互联网档案馆的存檔,存档日期2013-12-02 为了规则.
发展
pnpm build # build into dist
pnpm typecheck # type check including tests
pnpm test # run the plugin rule tests
规则测试放在每条规则的旁边(*.test.ts)和使用 RuleTester 从 oxlint/plugins-dev
与Node.js测试跑者.