名称: eslint 描述: ESLint配置、自定义规则与插件开发。 允许工具: 读取、写入、编辑、Bash、Glob、Grep
ESLint 技能
提供ESLint配置的专家级协助。
能力
- 配置ESLint
- 设置插件
- 创建自定义规则
- 处理TypeScript
- 为React/Vue配置
配置示例
// eslint.config.js (扁平化配置)
import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import react from 'eslint-plugin-react';
export default [
js.configs.recommended,
{
plugins: { '@typescript-eslint': typescript, react },
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
},
];
目标流程
- 代码质量
- 代码检查设置
- 团队规范