埃斯林特配置
这个 可共享配置 页:1 ESLint 语录 用于所有 Devoxa 项目
安装 二. 支助 使用量 二. 支助 扩展 二. 支助 贡献者 二. 支助 许可证
安装
yarn add --dev eslint @devoxa/eslint-config
配置还依赖于对等关系 typescript@^3.9.2。 。 。 .
使用量
为启用规则,增加: eslint.config.js 文件到您的项目。 见
ESLint 配置文件 更多细节.
const config = require('@devoxa/eslint-config')
module.exports = config({
// (Recommended) Files (in gitignore syntax) that will be transformed into ignore configs
ignoreFiles: ['.gitignore'],
// (Optional) Additional configs that will be spread into the main config
// See https://typescript-eslint.io/packages/typescript-eslint#config
configs: [
/* ... */
],
})
由于 ESLint 配置是用于 TypeScript 工程,因此还需要您有一个
tsconfig.json 文件已配置.
也建议在您 package.json 方便地使用.
"lint": "eslint '{src,tests}/**/*.{ts,tsx}'"
此外,建议安装 VS 代码扩展 改为 得到编辑警告.
扩展
此配置无意被更改, 但如果您有修改所在的设置
要求,这是可能的。 要扩展配置, 您可以使用 configs 选项
见上文.
贡献者
感谢这些伟大的人emoji 密钥:
大卫·瑞斯 💻 📖 ⚠️ |
本项目遵循 全部贡献者 规格。 任何捐款都欢迎!
许可证
麻省理工学院