H
H
Hanry6542020-11-24 01:07:43
Node.js
Hanry654, 2020-11-24 01:07:43

Error '__dirname' is not defined, with eslint --fix what to do?

my config:

{
    "env": {
        "browser": true,
        "commonjs": true,
        "es2021": true
    },
    "extends": "eslint:recommended",
    "parserOptions": {
        "ecmaVersion": 12
    },
    "rules": {
        "indent": [
            "error",
            "tab"
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "double"
        ],
        "semi": [
            "error",
            "always"
        ]
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hanry654, 2020-11-24
@Hanry654

need to add to envnode: true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question