.eslintrc.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {
  2. "root": true,
  3. "extends": [
  4. "plugin:import/errors",
  5. "plugin:import/warnings",
  6. "plugin:unicorn/recommended",
  7. "xo",
  8. "xo/browser"
  9. ],
  10. "rules": {
  11. "arrow-body-style": "off",
  12. "capitalized-comments": "off",
  13. "comma-dangle": [
  14. "error",
  15. "never"
  16. ],
  17. "indent": [
  18. "error",
  19. 2,
  20. {
  21. "MemberExpression": "off",
  22. "SwitchCase": 1
  23. }
  24. ],
  25. "max-params": [
  26. "warn",
  27. 5
  28. ],
  29. "multiline-ternary": [
  30. "error",
  31. "always-multiline"
  32. ],
  33. "new-cap": [
  34. "error",
  35. {
  36. "properties": false
  37. }
  38. ],
  39. "no-console": "error",
  40. "no-negated-condition": "off",
  41. "object-curly-spacing": [
  42. "error",
  43. "always"
  44. ],
  45. "operator-linebreak": [
  46. "error",
  47. "after"
  48. ],
  49. "semi": [
  50. "error",
  51. "never"
  52. ],
  53. "unicorn/explicit-length-check": "off",
  54. "unicorn/no-array-callback-reference": "off",
  55. "unicorn/no-array-method-this-argument": "off",
  56. "unicorn/no-null": "off",
  57. "unicorn/no-unused-properties": "error",
  58. "unicorn/prefer-array-flat": "off",
  59. "unicorn/prefer-dom-node-dataset": "off",
  60. "unicorn/prefer-module": "off",
  61. "unicorn/prefer-query-selector": "off",
  62. "unicorn/prefer-spread": "off",
  63. "unicorn/prevent-abbreviations": "off"
  64. },
  65. "overrides": [
  66. {
  67. "files": ["*.ts", "*.tsx"],
  68. "extends": [
  69. "plugin:import/typescript",
  70. "xo-typescript"
  71. ],
  72. "rules": {
  73. "@typescript-eslint/comma-dangle": [
  74. "error",
  75. "never"
  76. ],
  77. "@typescript-eslint/indent": [
  78. "error",
  79. 2,
  80. {
  81. "MemberExpression": "off",
  82. "SwitchCase": 1
  83. }
  84. ],
  85. "@typescript-eslint/naming-convention": [
  86. "error",
  87. {
  88. "selector": "variable",
  89. "format": ["camelCase", "StrictPascalCase", "UPPER_CASE"]
  90. }
  91. ],
  92. "@typescript-eslint/object-curly-spacing": [
  93. "error",
  94. "always"
  95. ],
  96. "@typescript-eslint/semi": [
  97. "error",
  98. "never"
  99. ]
  100. }
  101. }
  102. ]
  103. }