.eslintrc.json 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {
  2. "root": true,
  3. "extends": "standard",
  4. "parser": "@typescript-eslint/parser",
  5. "plugins": ["@typescript-eslint"],
  6. "env": {
  7. "browser": true
  8. },
  9. "rules": {
  10. "semi": ["error", "always"],
  11. "no-var": "error",
  12. "no-unused-vars": "off",
  13. "no-global-assign": "off",
  14. "guard-for-in": "error",
  15. "@typescript-eslint/no-unused-vars": ["error", {
  16. "vars": "all",
  17. "args": "after-used",
  18. "ignoreRestSiblings": true
  19. }],
  20. "prefer-const": ["error", {
  21. "destructuring": "all"
  22. }],
  23. "standard/no-callback-literal": "off",
  24. "node/no-deprecated-api": "off"
  25. },
  26. "parserOptions": {
  27. "ecmaVersion": 6,
  28. "sourceType": "module"
  29. },
  30. "overrides": [
  31. {
  32. "files": "*.js",
  33. "rules": {
  34. "@typescript-eslint/no-unused-vars": "off"
  35. }
  36. },
  37. {
  38. "files": "*.ts",
  39. "rules": {
  40. "no-undef": "off",
  41. "no-redeclare": "off",
  42. "@typescript-eslint/no-redeclare": ["error"],
  43. "no-use-before-define": "off"
  44. }
  45. },
  46. {
  47. "files": "*.d.ts",
  48. "rules": {
  49. "no-useless-constructor": "off",
  50. "@typescript-eslint/no-unused-vars": "off"
  51. }
  52. }
  53. ]
  54. }