eslint-config-airbnbでFailed to compileエラー

eslintの設定でextendsにairbnb記述があるとReact実行時にエラーとなる場合がある

{
    "env": {
        "browser": true,
        "es2021": true
    },
    "extends": [
        "plugin:react/recommended",
        "airbnb"
    ],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": 12,
        "sourceType": "module"
    },
    "plugins": [
        "react",
        "@typescript-eslint"
    ],
    "rules": {
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *