R
R
romaro2022-04-10 00:26:05
JavaScript
romaro, 2022-04-10 00:26:05

Why does ESLint swear on document despite setting env?

My config:

module.exports = {
    parserOptions: {
        sourceType: 'module',
        ecmaVersion: 2021,
    },
    extends: [
        'eslint:recommended',
        'plugin:node/recommended'
    ],
    env: {
        browser: true,
        node: true,
    },
    ignorePatterns: ['node_modules/'],
    rules: {
        semi: ['error', 'always'],
        quotes: ['error', 'single']
    }
};


I still get the 'document' is not defined error.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question