.eslintrc.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. module.exports = {
  2. root: true,
  3. parser: "@typescript-eslint/parser",
  4. extends: [
  5. "plugin:@typescript-eslint/recommended",
  6. "prettier/@typescript-eslint",
  7. "plugin:prettier/recommended",
  8. "plugin:import/errors",
  9. "plugin:import/warnings",
  10. "plugin:import/typescript",
  11. ],
  12. settings: {
  13. "import/parsers": {
  14. "@typescript-eslint/parser": [".ts", ".d.ts"],
  15. },
  16. },
  17. parserOptions: {
  18. ecmaVersion: 2018,
  19. sourceType: "module",
  20. },
  21. rules: {
  22. "prettier/prettier": [1, { trailingComma: "all", endOfLine: "auto" }],
  23. "@typescript-eslint/no-unused-vars": [1, { argsIgnorePattern: "^_" }],
  24. "@typescript-eslint/no-unused-vars": [1, { argsIgnorePattern: "^_" }],
  25. "@typescript-eslint/naming-convention": [
  26. "error",
  27. {
  28. selector: "interface",
  29. format: ["PascalCase"],
  30. prefix: ["I"],
  31. },
  32. {
  33. selector: "variableLike",
  34. format: ["strictCamelCase", "UPPER_CASE"],
  35. leadingUnderscore: "allow",
  36. },
  37. ],
  38. "@typescript-eslint/explicit-function-return-type": [
  39. 1,
  40. {
  41. allowExpressions: true,
  42. allowTypedFunctionExpressions: true,
  43. },
  44. ],
  45. "import/order": [
  46. 1,
  47. {
  48. groups: [
  49. "builtin",
  50. "external",
  51. "internal",
  52. "parent",
  53. "sibling",
  54. "index",
  55. ],
  56. "newlines-between": "always",
  57. },
  58. ],
  59. },
  60. };