相关文档资料
rules
https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules
安装
npm install typescript -D
npm install eslint -D
npx eslint --init
报错
no-this-alias
.eslintrc.js
rules新增
'@typescript-eslint/no-this-alias': [
'error',
{
allowDestructuring: true, // Allow `const { props, state } = this`; false by default
allowedNames: ['self'], // Allow `const self = this`; `[]` by default
},
],
## CRLF/LF的linebreak错误
```json
rules: {
//换行符问题
'linebreak-style': [0, 'error', 'windows'],
},