Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

125 linhas
4.6 KiB

  1. {
  2. "env": {
  3. "es6": true,
  4. "node": true
  5. },
  6. "extends": [
  7. "eslint:recommended",
  8. "plugin:@typescript-eslint/recommended",
  9. "plugin:import/errors",
  10. "plugin:import/warnings",
  11. "plugin:import/typescript",
  12. "prettier",
  13. "prettier/@typescript-eslint"
  14. ],
  15. "parser": "@typescript-eslint/parser",
  16. "parserOptions": {
  17. "ecmaVersion": 2018,
  18. "sourceType": "module",
  19. "ecmaFeatures": {
  20. "impliedStrict": true
  21. }
  22. },
  23. "plugins": ["import", "prettiest", "@typescript-eslint"],
  24. "rules": {
  25. "arrow-parens": ["off"],
  26. "brace-style": ["off", "stroustrup"],
  27. "consistent-return": "error",
  28. "eol-last": "error",
  29. "linebreak-style": ["error", "unix"],
  30. "new-parens": "error",
  31. "no-console": "off",
  32. "no-constant-condition": ["warn", { "checkLoops": false }],
  33. "no-caller": "error",
  34. "no-debugger": "warn",
  35. "no-dupe-class-members": "off",
  36. "no-duplicate-imports": "error",
  37. "no-else-return": "warn",
  38. "no-empty": ["warn", { "allowEmptyCatch": true }],
  39. "no-empty-function": ["warn", { "allow": ["constructors"] }],
  40. "no-eval": "error",
  41. "no-ex-assign": "warn",
  42. "no-extend-native": "error",
  43. "no-extra-bind": "error",
  44. "no-floating-decimal": "error",
  45. "no-implicit-coercion": "error",
  46. "no-implied-eval": "error",
  47. // Turn off until fix for: https://github.com/typescript-eslint/typescript-eslint/issues/239
  48. "no-inner-declarations": "off",
  49. "no-lone-blocks": "error",
  50. "no-lonely-if": "error",
  51. "no-loop-func": "error",
  52. "no-multi-spaces": "error",
  53. "no-return-assign": "error",
  54. "no-return-await": "warn",
  55. "no-self-compare": "error",
  56. "no-sequences": "error",
  57. "no-template-curly-in-string": "warn",
  58. "no-throw-literal": "error",
  59. "no-unmodified-loop-condition": "warn",
  60. "no-unneeded-ternary": "error",
  61. "no-unused-expressions": ["warn", { "allowShortCircuit": true }],
  62. "no-use-before-define": "off",
  63. "no-useless-call": "error",
  64. "no-useless-catch": "error",
  65. "no-useless-computed-key": "error",
  66. "no-useless-concat": "error",
  67. "no-useless-rename": "error",
  68. "no-useless-return": "error",
  69. "no-var": "error",
  70. "no-with": "error",
  71. "object-shorthand": ["error", "never"],
  72. "one-var": ["error", "never"],
  73. "prefer-arrow-callback": "error",
  74. "prefer-const": "error",
  75. "prefer-numeric-literals": "error",
  76. "prefer-object-spread": "error",
  77. "prefer-rest-params": "error",
  78. "prefer-spread": "error",
  79. "prefer-template": "error",
  80. "quotes": ["error", "single", { "avoidEscape": true }],
  81. // Turn off until fix for: https://github.com/eslint/eslint/issues/11899
  82. "require-atomic-updates": "off",
  83. "require-await": "error",
  84. "semi": ["error", "always"],
  85. "semi-style": ["error", "last"],
  86. "sort-imports": [
  87. "error",
  88. {
  89. "ignoreCase": true,
  90. "ignoreDeclarationSort": true,
  91. "ignoreMemberSort": false,
  92. "memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
  93. }
  94. ],
  95. "yoda": "error",
  96. "import/export": "off",
  97. "import/extensions": ["error", "never"],
  98. "import/named": "off",
  99. "import/namespace": "off",
  100. "import/newline-after-import": "warn",
  101. "import/no-cycle": "off",
  102. "import/no-dynamic-require": "error",
  103. "import/no-default-export": "error",
  104. "import/no-duplicates": "error",
  105. "import/no-self-import": "error",
  106. "import/no-unresolved": ["warn", { "ignore": ["vscode"] }],
  107. "import/order": [
  108. "warn",
  109. {
  110. "groups": ["builtin", "external", "internal", ["index", "sibling", "parent"]],
  111. "newlines-between": "never"
  112. }
  113. ],
  114. "prettiest/no-block-after-closing": "error",
  115. "@typescript-eslint/explicit-function-return-type": "off",
  116. "@typescript-eslint/explicit-member-accessibility": "off",
  117. "@typescript-eslint/no-empty-interface": "off",
  118. "@typescript-eslint/no-explicit-any": "off",
  119. "@typescript-eslint/no-namespace": "off",
  120. "@typescript-eslint/no-non-null-assertion": "off",
  121. "@typescript-eslint/no-parameter-properties": "off",
  122. "@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }],
  123. "@typescript-eslint/no-use-before-define": "off"
  124. }
  125. }