.eslintrc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {
  2. "extends": [
  3. "airbnb",
  4. "airbnb-typescript"
  5. ],
  6. "parser": "@typescript-eslint/parser",
  7. "overrides": [
  8. {
  9. "files": [
  10. "*.ts",
  11. "*.tsx"
  12. ],
  13. "parserOptions": {
  14. "project": "./tsconfig.json"
  15. }
  16. }
  17. ],
  18. "plugins": [
  19. "import",
  20. "react",
  21. "coriolis-web"
  22. ],
  23. "env": {
  24. "browser": true,
  25. "node": true
  26. },
  27. "globals": {},
  28. "ignorePatterns": [
  29. "*.svg",
  30. "*.png",
  31. "*.bash",
  32. "*.log",
  33. "*.jpg",
  34. "*.woff",
  35. "*.js",
  36. "*.snap",
  37. "src/**/test.tsx",
  38. "src/**/package.json"
  39. ],
  40. "rules": {
  41. "max-params": [
  42. "error",
  43. 3
  44. ],
  45. "coriolis-web/import-no-duplicate-name": "error",
  46. "react/function-component-definition": "off",
  47. "react/sort-comp": "off",
  48. "react/jsx-one-expression-per-line": "off",
  49. "@typescript-eslint/semi": [
  50. 2,
  51. "never"
  52. ],
  53. "arrow-parens": [
  54. 2,
  55. "as-needed"
  56. ],
  57. "no-console": "off",
  58. "react/require-default-props": "off",
  59. "class-methods-use-this": "off",
  60. "no-underscore-dangle": "off",
  61. "jsx-a11y/mouse-events-have-key-events": "off",
  62. "react/jsx-no-duplicate-props": "off",
  63. "no-nested-ternary": "off",
  64. "no-dupe-class-members": "off",
  65. "object-curly-spacing": [
  66. "error",
  67. "always"
  68. ],
  69. "no-throw-literal": "off",
  70. "@typescript-eslint/type-annotation-spacing": [
  71. "error",
  72. {
  73. "after": true
  74. }
  75. ],
  76. "react/state-in-constructor": "off",
  77. "react/destructuring-assignment": "off",
  78. "import/no-extraneous-dependencies": "off",
  79. "react/static-property-placement": "off",
  80. "react/no-danger": "off",
  81. "prefer-destructuring": "off",
  82. "import/no-cycle": "off",
  83. "@typescript-eslint/camelcase": "off",
  84. "react/jsx-props-no-spreading": "off",
  85. "max-classes-per-file": "off",
  86. "prefer-promise-reject-errors": "off",
  87. "import/prefer-default-export": "off",
  88. "no-param-reassign": "off",
  89. "max-len": [
  90. "error",
  91. {
  92. "code": 150,
  93. "ignoreTemplateLiterals": true,
  94. "ignoreStrings": true
  95. }
  96. ]
  97. }
  98. }