Skip to content

Warning: React version not specified in eslint-plugin-react settings #2128

Closed
@idahogurl

Description

@idahogurl

I am using the airbnb configuration and "settings" => "react" => "version" is set to 16 in their configuration file.

Packages
"eslint": "^5.12.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.12.3",

.eslintrc Configuration

{
  "root": true,
  "extends": "airbnb",
  "globals": {
    "window": true
  },
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaVersion": 2018,
    "ecmaFeatures": {
      "jsx": true,
      "modules": true
    }
  },
  "plugins": ["react"],
  "rules": {
    "brace-style": [
      "error",
      "1tbs",
      {
        "allowSingleLine": false
      }
    ],
    "consistent-return": "off",
    "curly": ["error", "all"],
    "import/extensions": "off",
    "import/no-extraneous-dependencies": "off",
    "import/no-unresolved": "off",
    "import/prefer-default-export": "off",
    "import/no-mutable-exports": "off",
    "max-len": "off",
    "no-await-in-loop": "error",
    "no-compare-neg-zero": "error",
    "no-confusing-arrow": "off",
    "no-mixed-operators": "off",
    "no-multi-assign": "off",
    "no-plusplus": "off",
    "no-use-before-define": ["error", { "functions": false, "classes": true }],
    "nonblock-statement-body-position": "error",
    "operator-linebreak": [
      "error",
      "before",
      {
        "overrides": {
          "+=": "after",
          "=": "after"
        }
      }
    ],
    "prefer-arrow-callback": [
      "error",
      {
        "allowNamedFunctions": true,
        "allowUnboundThis": true
      }
    ],
    "prefer-destructuring": "off",
    "prefer-promise-reject-errors": "error",
    "react/jsx-sort-props": "off",
    "react/sort-comp": "off",
    "react/prop-types": ["error", { "skipUndeclared": true }],
    "react/forbid-prop-types": "off",
    "react/jsx-filename-extension": [
      "error",
      {
        "extensions": [".js", ".jsx"]
      }
    ],
    "react/no-array-index-key": "off",
    "react/no-danger": "off",
    "react/prefer-stateless-function": "off",
    "react/react-in-jsx-scope": "off",
    "react/require-default-props": "off",
    "template-tag-spacing": "error"
  },
  "overrides": [
    {
      "files": ["**/__tests__/**/*.js", "**/__mocks__/**/*.js"],
      "env": {
        "jest": true
      },

      "globals": {
        "page": true,
        "browser": true,
        "context": true,
        "jestPuppeteer": true
      }
    },
    {
      "files": [
        "autotest/**/**/*.js"
      ],
      "rules": {
        "no-underscore-dangle": "off"
      }
    },
    {
      "files": ["server/**"],
      "rules": {
        "no-restricted-syntax": [
          "error",
          "ForInStatement",
          "LabeledStatement",
          "WithStatement"
        ]
      }
    }
  ]
}

Expected: Warning should not show

Actual: Warning remains

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions