Skip to content
Snippets Groups Projects
.eslintrc 2.31 KiB
Newer Older
  "rules": {
    "strict": [2, "never"],
    "no-undef": 2,
    "no-var": 1,
    "no-unused-vars": [
      1,
      { "vars": "all", "args": "none", "varsIgnorePattern": "^_" }
    ],
    "no-empty": [1, { "allowEmptyCatch": true }],
    "curly": [1, "all"],
    "eqeqeq": [1, "smart"],
    "import/no-commonjs": 1,
    "no-console": 0,
    "react/no-is-mounted": 2,
    "react/prefer-es6-class": 2,
    "react/display-name": 1,
    "react/no-did-mount-set-state": 0,
    "react/no-did-update-set-state": 0,
    "react/no-find-dom-node": 0,
    "react/no-children-prop": 2,
    "react/no-unescaped-entities": 2,
    "react/jsx-no-target-blank": 2,
    "react/jsx-key": 2,
    "react/forbid-component-props": [2, { "forbid": ["w", "h"] }],
    "react-hooks/exhaustive-deps": [
      "warn",
      { "additionalHooks": "(useSyncedQueryString|useAsyncFunction)" }
    "prefer-const": [1, { "destructuring": "all" }],
    "no-useless-escape": 0,
    "no-only-tests/no-only-tests": "error",
    "complexity": ["error", { "max": 54 }]
  },
  "globals": {
    "cy": true,
    "Cypress": true
  },
  "env": {
    "browser": true,
    "es6": true,
    "commonjs": true,
    "jest": true
  },
  "parser": "babel-eslint",
  "plugins": ["react", "no-only-tests"],
  "extends": [
    "eslint:recommended",
    "plugin:react/recommended",
    "plugin:react-hooks/recommended",
    "plugin:import/errors",
    "plugin:import/warnings"
  ],
  "settings": {
    "import/resolver": "webpack",
    "import/ignore": ["\\.css$"],
    "react": {
      "version": "detect"
    }
  },
  "parserOptions": {
    "ecmaFeatures": {
      "legacyDecorators": true
    }
  },
  "overrides": [
    {
      "extends": ["plugin:@typescript-eslint/recommended"],
      "files": ["*.ts", "*.tsx"],
      "parser": "@typescript-eslint/parser",
      "parserOptions": {
        "project": "./tsconfig.json"
      },
      "plugins": ["@typescript-eslint"],
      "rules": {
        "prefer-rest-params": "off",
        "@typescript-eslint/explicit-module-boundary-types": "off",
        "@typescript-eslint/no-inferrable-types": "off",
        "@typescript-eslint/no-explicit-any": "off",
        "@typescript-eslint/no-this-alias": "off",
        "@typescript-eslint/no-unused-vars": "off"