首页 > 解决方案 > “职位”是什么意思以及如何找到职位

问题描述

今天当我npx eslint --fix ./在powershell中运行时,它会登录Unexpected token } in JSON at position 93.eslintrc.json。所以我在这里完全有问题:1.'位置93'是什么意思以及如何在我的代码中找到确切的位置,因为我不知道93,我曾经在控制台记录错误位于哪一行(列)时找到位置。2.我的.eslintrc.json好像没有语法错误,大家能帮我看看问题吗?

{
    "env": {
        "node": true,
        "commonjs": true,
        "es6": true,
    },
    "extends": "eslint:recommended",
    "globals": {
        "Atomics": "readonly",
        "SharedArrayBuffer": "readonly"
    },
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": 2018
    },
    "plugins": [
        "react"
    ],
    "rules": {
        "indent": [
            "error",
            4
        ],
        "linebreak-style": [
            "error",
            "windows"
        ],
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "always"
        ]
    }
}

标签: javascriptjsoneslint

解决方案


comma请按顺序删除"es6": true,

您应该将您的 json 粘贴到工具检查验证 json 格式中。

例如:https ://jsoneditoronline.org/是在线工具json格式


推荐阅读