0.1.2 • Published 11 months ago
@configurajs/eslint v0.1.2
功能
- 📦 支持 javascript 预设
- 📦 支持 typescript 预设
- 📦 支持 vue(2 和 3) 预设
- 📦 支持 react 预设
- 📦 支持 vitest 预设
- 📦 支持 jsx 预设
- 📦 支持 eslint comments 预设
- 📦 支持覆盖 eslint 配置
快速开始
安装
# npm
npm i @configurajs/eslint -D
# yarn
yarn add @configurajs/eslint -D
# pnpm
pnpm add @configurajs/eslint -D用法
// eslint.config.js
import { defineConfig } from '@configurajs/eslint'
export default defineConfig()或
// eslint.config.js
const { defineConfig } = require('@configurajs/eslint')
module.exports = defineConfig()切换框架预设
切换框架预设需要通过手动设置。
Vue2
// eslint.config.js
import { defineConfig } from '@configurajs/eslint'
export default defineConfig({
vue: { version: 2 },
})React
// eslint.config.js
import { defineConfig } from '@configurajs/eslint'
export default defineConfig({
vue: false,
react: true,
})更多选项
// prettier.config.js
import { defineConfig } from '@configurajs/eslint'
export default defineConfig({ ... })export interface DefineConfigOptions {
/**
* 启用 TypeScript 支持
* @default true
*/
ts?: boolean
/**
* 启用 JSX 支持
* @default true
*/
jsx?: boolean
/**
* 启用 Vue 支持,默认为版本 3
* @default true
*/
vue?: boolean | { version: 2 | 3 }
/**
* 启用 React 支持
* @default false
*/
react?: boolean
/**
* 启用 Vitest 支持
* @default true
*/
vitest?: boolean
/**
* 启用 eslint 注释支持
* @default true
*/
comments?: boolean
/**
* 自定义规则
*/
rules?: Linter.RulesRecord
/**
* 忽略文件
*/
ignores?: string[]
/**
* 覆盖 eslint 配置
*/
overrides?: Linter.Config[]
}贡献者
更新日志
协议
项目参考
本项目架构参考自 antfu-eslint-config。
0.1.2
11 months ago
0.1.1
11 months ago
0.1.1-alpha.1737089812329
11 months ago
0.1.0
11 months ago
0.0.14
11 months ago
0.0.13
11 months ago
0.0.12
11 months ago
0.0.11
11 months ago
0.0.11-alpha.1736268281589
11 months ago
0.0.11-alpha.1736267504522
11 months ago
0.0.11-alpha.1736267206310
11 months ago
0.0.11-alpha.1736266867704
11 months ago
0.0.11-alpha.1736266309972
11 months ago
0.0.11-alpha.1736265002970
11 months ago
0.0.11-alpha.1736264534608
11 months ago
0.0.10
11 months ago
0.0.9
11 months ago
0.0.9-alpha.1736263561966
11 months ago
0.0.8
11 months ago
0.0.7
11 months ago
0.0.6
11 months ago
0.0.5
11 months ago
0.0.4
11 months ago
0.0.3
11 months ago
0.0.2
11 months ago
0.0.1
11 months ago