You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 line
4.5 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. "jsx": true
  22. }
  23. },
  24. "plugins": ["import", "prettiest", "@typescript-eslint"],
  25. "rules": {
  26. "arrow-parens": ["off"],
  27. "brace-style": ["off", "stroustrup"],
  28. "consistent-return": "error",
  29. "eol-last": "error",
  30. "linebreak-style": ["error", "unix"],
  31. "new-parens": "error",
  32. "no-console": "off",
  33. "no-constant-condition": ["warn", { "checkLoops": false }],
  34. "no-caller": "error",
  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 https://github.com/typescript-eslint/typescript-eslint/issues/239 is fixed
  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. "require-atomic-updates": "error",
  82. "require-await": "error",
  83. "semi": ["error", "always"],
  84. "semi-style": ["error", "last"],
  85. "sort-imports": [
  86. "error",
  87. {
  88. "ignoreCase": true,
  89. "ignoreDeclarationSort": true,
  90. "ignoreMemberSort": false,
  91. "memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
  92. }
  93. ],
  94. "yoda": "error",
  95. "import/export": "off",
  96. "import/extensions": ["error", "never"],
  97. "import/named": "off",
  98. "import/namespace": "off",
  99. "import/newline-after-import": "warn",
  100. "import/no-cycle": "off",
  101. "import/no-dynamic-require": "error",
  102. "import/no-default-export": "error",
  103. "import/no-duplicates": "error",
  104. "import/no-self-import": "error",
  105. "import/no-unresolved": ["warn", { "ignore": ["vscode"] }],
  106. "import/order": [
  107. "warn",
  108. {
  109. "groups": ["builtin", "external", "internal", ["index", "sibling", "parent"]],
  110. "newlines-between": "never"
  111. }
  112. ],
  113. "prettiest/no-block-after-closing": "error",
  114. "@typescript-eslint/explicit-function-return-type": "off",
  115. "@typescript-eslint/explicit-member-accessibility": "off",
  116. "@typescript-eslint/no-empty-interface": "off",
  117. "@typescript-eslint/no-explicit-any": "off",
  118. "@typescript-eslint/no-namespace": "off",
  119. "@typescript-eslint/no-non-null-assertion": "off",
  120. "@typescript-eslint/no-parameter-properties": "off",
  121. "@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }],
  122. "@typescript-eslint/no-use-before-define": "off"
  123. }
  124. }