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.

125 rivejä
4.6 KiB

5 vuotta sitten
  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-debugger": "warn",
  36. "no-dupe-class-members": "off",
  37. "no-duplicate-imports": "error",
  38. "no-else-return": "warn",
  39. "no-empty": ["warn", { "allowEmptyCatch": true }],
  40. "no-empty-function": ["warn", { "allow": ["constructors"] }],
  41. "no-eval": "error",
  42. "no-ex-assign": "warn",
  43. "no-extend-native": "error",
  44. "no-extra-bind": "error",
  45. "no-floating-decimal": "error",
  46. "no-implicit-coercion": "error",
  47. "no-implied-eval": "error",
  48. // Turn off until https://github.com/typescript-eslint/typescript-eslint/issues/239 is fixed
  49. "no-inner-declarations": "off",
  50. "no-lone-blocks": "error",
  51. "no-lonely-if": "error",
  52. "no-loop-func": "error",
  53. "no-multi-spaces": "error",
  54. "no-return-assign": "error",
  55. "no-return-await": "warn",
  56. "no-self-compare": "error",
  57. "no-sequences": "error",
  58. "no-template-curly-in-string": "warn",
  59. "no-throw-literal": "error",
  60. "no-unmodified-loop-condition": "warn",
  61. "no-unneeded-ternary": "error",
  62. "no-unused-expressions": ["warn", { "allowShortCircuit": true }],
  63. "no-use-before-define": "off",
  64. "no-useless-call": "error",
  65. "no-useless-catch": "error",
  66. "no-useless-computed-key": "error",
  67. "no-useless-concat": "error",
  68. "no-useless-rename": "error",
  69. "no-useless-return": "error",
  70. "no-var": "error",
  71. "no-with": "error",
  72. "object-shorthand": ["error", "never"],
  73. "one-var": ["error", "never"],
  74. "prefer-arrow-callback": "error",
  75. "prefer-const": "error",
  76. "prefer-numeric-literals": "error",
  77. "prefer-object-spread": "error",
  78. "prefer-rest-params": "error",
  79. "prefer-spread": "error",
  80. "prefer-template": "error",
  81. "quotes": ["error", "single", { "avoidEscape": true }],
  82. "require-atomic-updates": "error",
  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. }