0.4.1 • Published 2 days ago
@dhzh/eslint-config v0.4.1
@dhzh/eslint-config
Special Statement
: This project comes from@antfu/eslint-config
. The two are almost the same, with only some differences to meet personal needs. In order to seek convenience and prevent some conflicts between the upstream branch and my own changes after forking, I chose to copy instead of fork.
Differences from @antfu/eslint-config:
- With semi:
semi: true
. - Always arrow parens:
arrowParens: true
. - Explicitly use
1tbs
as brace style:braceStyle: '1tbs'
. - Disabled antfu's top level function rule:
'antfu/top-level-function': 'off'
. - Always curly:
'curly': ['error', 'all']
.
Usage
Starter Wizard
We provided a CLI tool to help you set up your project, or migrate from the legacy config to the new flat config with one command.
pnpm dlx @dhzh/eslint-config@latest
Manual Install
If you prefer to set up manually:
pnpm i -D eslint @dhzh/eslint-config
And create eslint.config.mjs
in your project root:
// eslint.config.mjs
import dhzh from '@dhzh/eslint-config';
export default dhzh();
License
MIT License © 2022-PRESENT Easton Zheng