From 6e360b68480e0c6aa74232f92d6e0e5e594782dc Mon Sep 17 00:00:00 2001 From: Sysix Date: Mon, 4 Nov 2024 18:58:23 +0100 Subject: [PATCH] fix: cji build --- README.md | 8 ++++---- eslint.config.ts | 4 ++-- src/index.ts | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a9b784f..e649c70 100644 --- a/README.md +++ b/README.md @@ -53,10 +53,10 @@ If you are using flat configuration (eslint >= 9.0), you can use the following c ```js // eslint.config.js -import { buildFromOxlintConfigFile } from 'eslint-plugin-oxlint'; +import oxlint from 'eslint-plugin-oxlint'; export default [ ..., // other plugins - ...buildFromOxlintConfigFile('./oxlint.json'), + ...oxlint.buildFromOxlintConfigFile('./oxlint.json'), ]; ``` @@ -64,10 +64,10 @@ Or build it by an `oxlint.json`-like object: ```js // eslint.config.js -import { buildFromOxlintConfig } from 'eslint-plugin-oxlint'; +import oxlint from 'eslint-plugin-oxlint'; export default [ ..., // other plugins - ...buildFromOxlintConfig({ + ...oxlint.buildFromOxlintConfig({ categories: { correctness: 'warn' }, diff --git a/eslint.config.ts b/eslint.config.ts index d0c71e8..18679a1 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -1,4 +1,4 @@ -import { buildFromOxlintConfigFile } from './src/index.js'; +import oxlint from './src/index.js'; import unicorn from 'eslint-plugin-unicorn'; import eslint from '@eslint/js'; import eslintConfigPrettier from 'eslint-config-prettier'; @@ -12,5 +12,5 @@ export default [ unicorn.configs['flat/recommended'], ...tseslint.configs.recommended, eslintConfigPrettier, - ...buildFromOxlintConfigFile('oxlint.json'), + ...oxlint.buildFromOxlintConfigFile('oxlint.json'), ]; diff --git a/src/index.ts b/src/index.ts index 5c0ba5a..5bd1879 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ import * as ruleMapsByCategory from './rules-by-category.js'; import configByScope from './configs-by-scope.js'; import configByCategory from './configs-by-category.js'; -export { +import { buildFromOxlintConfig, buildFromOxlintConfigFile, } from './build-from-oxlint-config.js'; @@ -43,4 +43,6 @@ export default { ...configByScope, ...configByCategory, }, + buildFromOxlintConfig, + buildFromOxlintConfigFile, };