.eslintrc.json 1.1 KB

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