1.0.0 • Published 3 months ago

@tarsiidae/eslint-config v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

ESLint Config

自定义 ESLint 配置,支持 TypeScript 和 React。

安装

npm install --save-dev @tarsiidae/eslint-config

使用方法

在你的项目根目录创建 .eslintrc.js 文件:

module.exports = {
  extends: ['@tarsiidae/eslint-config']
};

或者在 package.json 中添加:

{
  "eslintConfig": {
    "extends": ["@tarsiidae/eslint-config"]
  }
}

特性

  • TypeScript 支持
  • React 支持
  • React Hooks 规则
  • Import/Export 规则
  • 常用的代码质量规则

规则说明

本配置包含以下主要规则:

  • 禁止使用 console(除了 warn 和 error)
  • 禁止使用 debugger
  • 未使用的变量检查
  • React 相关规则优化
  • TypeScript 类型检查

发布到 npm

  1. 确保你已经登录到 npm:
npm login
  1. 发布包:
npm publish

License

ISC