.eslintrc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {
  2. "extends": ["react-app", "plugin:jsx-a11y/recommended"],
  3. "plugins": ["jsx-a11y"],
  4. "parser": "babel-eslint",
  5. "parserOptions": {
  6. "ecmaVersion": 6,
  7. "sourceType": "module"
  8. },
  9. "env": {
  10. "browser": true,
  11. "jest": true
  12. },
  13. "settings": {
  14. "import/extensions": [".js", ".jsx"],
  15. },
  16. "rules": {
  17. "semi": ["warn", "always"],
  18. "comma-dangle": ["warn", "always-multiline"],
  19. "function-paren-newline": ["error", "consistent"],
  20. "jsx-a11y/anchor-is-valid": [ "error", {
  21. "components": [ "Link" ],
  22. "specialLink": [ "to" ]
  23. }],
  24. "jsx-a11y/label-has-for": [ 2, {
  25. "components": [ "Label" ],
  26. "required": {
  27. "every": [ "id" ]
  28. },
  29. "allowChildren": false
  30. }],
  31. "jsx-a11y/label-has-associated-control": [ 2, {
  32. "labelComponents": ["label"],
  33. "labelAttributes": ["htmlFor"],
  34. "controlComponents": ["input"],
  35. "depth": 3
  36. }],
  37. "max-len": ["warn", { "code": 120 }],
  38. "object-curly-newline": ["error", { "consistent": true }],
  39. "object-curly-spacing": [2, "always"],
  40. "react/jsx-filename-extension": [1, {
  41. "extensions": [".js", ".jsx"]
  42. }],
  43. "react/jsx-one-expression-per-line": "off",
  44. "react/jsx-indent": [2, 2],
  45. "quotes": ["warn", "single"],
  46. "jsx-quotes": ["warn", "prefer-double"],
  47. "eol-last": ["warn", "always"]
  48. }
  49. }