ESLint似乎无法解析".eslintrc.js“文件。
复制步骤:我设置了一个新的"hello world“TypeScript项目,如下所示:
# Make a new directory for our new project
mkdir test
# Go into the new directory
cd test
# Create a "package.json" file
npm init --yes
# Install TypeScript
npm install typescript --save-dev
# Install ESLint (
我有一个角10的应用程序设置了更漂亮的,这是迄今为止的工作很好的衣片打印文件。我现在正在尝试将我的组件模板文件和链接到一起。
但是当我用eslint . --ext .js,.ts,.component.html --fix运行它的时候
Error while loading rule '@typescript-eslint/dot-notation': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the
我正在使用create app+ typescript + eslint应用程序,在构建过程中有这样的错误:
Line 1:8: 'React' was used before it was defined @typescript-eslint/no-use-before-define
组件中的代码以以下代码开头:
import React from "react";
Eslint设置:
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
当我试图通过npm start运行应用程序时
Failed to load plugin '@typescript-eslint' declared in '.eslintrc.json': Class extends value undefined is not a constructor or null
为什么会发生这种情况,我该如何解决呢?
eslintrc.json
{
"env": {
"browser": true,
"es2021": true
},
"extend