GladysProject/Gladys

View on GitHub
front/.eslintrc.json

Summary

Maintainability
Test Coverage
{
  "extends": ["preact", "prettier", "plugin:cypress/recommended", "plugin:compat/recommended"],
  "rules": {
    "react/jsx-indent-props": ["error", 2],
    "brace-style": ["error", "1tbs"],
    "no-useless-concat": "error",
    "prefer-template": "error",
    "jest/expect-expect": "off",
    "jest/valid-expect": "off",
    "no-async-promise-executor": "off",
    "react/jsx-key": "off",
    "promise/prefer-await-to-then": "warn",
    "react/forbid-dom-props": [
      "warn",
      {
        "forbid": [{ "propName": "style", "message": "Using inline style is not recommended. Please use a .css file." }]
      }
    ],
    "no-restricted-syntax": [
      "error",
      {
        "selector": "Decorator[expression.callee.name='connect']",
        "message": "The @connect decorator is not allowed anymore. Please use connect() function instead. See doc: https://github.com/developit/unistore"
      }
      /* { FOR LATER
        "selector": "CallExpression[callee.object.name='store'][callee.property.name='setState']",
        "message": "Usage of unistore is not recommended anymore, please use local states instead."
      } */
    ],
    "no-console": ["error", { "allow": ["error"] }]
  },
  "env": {
    "browser": true
  },
  "plugins": ["json", "cypress", "promise", "react"],
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "settings": {
    "targets": null
  },
  "overrides": [
    {
      "files": ["cypress/**/*.js"],
      "rules": {
        "promise/prefer-await-to-then": "off"
      }
    }
  ]
}