Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create React App + TypeScript,ESLint 不生效解决 #54

Open
shuangmianxiaoQ opened this issue Oct 11, 2019 · 0 comments
Open

Create React App + TypeScript,ESLint 不生效解决 #54

shuangmianxiaoQ opened this issue Oct 11, 2019 · 0 comments
Labels
React 系列 React使用及采坑小集 工作相关 记录工作中遇到的问题或收获

Comments

@shuangmianxiaoQ
Copy link
Owner

参考:
设置编辑器 · Create React App 中文文档
Creating a React and TypeScript Project with CRA3 - Carl's Blog

问题不再详细阐述,主要记录下解决办法:

  1. 添加.eslintrc.json文件
{
  "extends": "react-app"
}
  1. 配置VSCode,建立.vscode文件夹,添加setting.json文件
{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "typescript",
      "autoFix": true
    },
    {
      "language": "typescriptreact",
      "autoFix": true
    }
  ]
}
@shuangmianxiaoQ shuangmianxiaoQ added 工作相关 记录工作中遇到的问题或收获 React 系列 React使用及采坑小集 labels Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
React 系列 React使用及采坑小集 工作相关 记录工作中遇到的问题或收获
Projects
None yet
Development

No branches or pull requests

1 participant