使用VScode打开项目时,避免项目路径过深。尽量做到开发a项目就打开a项目,如
dir/path/path/a
这样的路径,不要vscode打开
dir
来开发
a
。因为可能会导致eslint的一些提示出现不准确的现象。
关键词:ESLint配置+自动修复、TSLint配置+自动修复、stylelint配置+自动修复
ESLint
1. 首先安装eslint
,并增加相关配置
新建.eslintrc.js
和.eslintignore
// .eslintrc.js 此配置仅供参考
module.exports = {
root: true,
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
extends: [
],
parser: 'typescript-eslint-parser',
plugins: [
'react',
'typescript'
],
'settings': {},
rules: {
// 缩进为两个空
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)