一、安装react+ts
npx create-react-app my-app --template typescript
二、安装eslint代码检测
yarn eslint
npx eslint...(选择1)
React
Vue.js
None of these
4、项目使用Ts?(Yes)
Does your project use TypeScript?...tsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'react...',
'@typescript-eslint',
],
rules: {
'react/jsx-filename-extension': [
2,
{ '...0,
'no-new': 0,
// 不能使用自增
'no-plusplus': 0,
// button必须是静态type
'react