imba-config
v2.0.4
Published
eslint-config cz-config commitlint-config
Downloads
101
Maintainers
Readme
安装
eslint cz commitlint 三个常用配置
# pnpm
pnpm i imba-config @antfu/eslint-config -D
.cz-config.js
const { czConfig } = require('imba-config')
module.exports = czConfig
commitlint.config.js
const { commitlintConfig } = require('imba-config')
module.exports = commitlintConfig
.eslintrc.js
"typescript": "^5.1.6",
"imba-config": "^1.0.8",
"@antfu/eslint-config": "^0.34.2",
const { eslintConfig } = require('imba-config')
module.exports = eslintConfig
.eslintrc.js
@antfu/eslint-config版本0.34.2
"typescript": "^5.1.6",
"imba-config": "^2.0.2",
"@antfu/eslint-config": "^0.34.2",
const { eslintConfig } = require('imba-config')
module.exports = {
root: true,
extends: ['@antfu'],
parserOptions: {
project: {},
},
rules: eslintConfig,
}
eslint.config.mjs
# 第二种 @antfu/eslint-config版本2.21.1
"typescript": "^5.1.6",
"imba-config": "^2.0.2",
"@antfu/eslint-config": "^2.21.1",
const { antfu } = require('@antfu/eslint-config')
const { eslintConfig, ignoresConfig } = require('imba-config')
module.exports = antfu({
typescript: true,
vue: false,
// Disable jsonc and yaml support
jsonc: false,
yaml: false,
ignores: ignoresConfig,
}, {
rules: eslintConfig,
ignores: ignoresConfig,
})