小编Anu*_*rai的帖子

错误:--config 中的 ESLint 配置无效

我在使用命令npm run start时遇到错误:

错误:--config 中的 ESLint 配置无效:- 意外的顶级属性“compilerOptions”。

我无法找出错误的原因。我尝试添加root:true和我偶然发现的许多其他解决方案。

我的 package.json 文件:

{
  "name": "discord-bot",
  "version": "1.0.0",
  "description": "",
  "main": "dist/WebServer.js",
  "scripts": {
    "prebuild": "eslint . --ext .js,.jsx,.ts,.tsx -c tsconfig.json --fix",
    "lint": "eslint . --ext .ts,.tsx",
    "lint-and-fix": "eslint . --ext .ts,.tsx --fix",
    "build": "tsc",
    "prestart": "npm run build",
    "start": "node .",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Anup",
  "license": "ISC",
  "dependencies": {
    "express": "^4.17.2"
  },
  "devDependencies": {
    "@types/express": "^4.17.13",
    "@types/node": "^17.0.9",
    "@typescript-eslint/eslint-plugin": …
Run Code Online (Sandbox Code Playgroud)

json formatter typescript eslintrc

6
推荐指数
0
解决办法
4105
查看次数

标签 统计

eslintrc ×1

formatter ×1

json ×1

typescript ×1