My configuration files
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.

116 lines
4.0 KiB

2 years ago
  1. {
  2. "env": {
  3. "browser": true,
  4. "node": true,
  5. "es6": true
  6. },
  7. "parserOptions": {
  8. "ecmaFeatures": {"jsx": true},
  9. "ecmaVersion": 9,
  10. "sourceType": "script"
  11. },
  12. "rules": {
  13. "accessor-pairs": ["warn", {"setWithoutGet": true}],
  14. "array-bracket-spacing": ["warn", "never"],
  15. "arrow-spacing": ["warn", {"after": true, "before": true}],
  16. "block-scoped-var": "warn",
  17. "brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
  18. "comma-dangle": ["warn", "never"],
  19. "comma-spacing": ["warn", {"after": true}],
  20. "comma-style": ["warn", "last"],
  21. "complexity": ["warn", 20],
  22. "consistent-this": ["warn", "self"],
  23. "constructor-super": "warn",
  24. "dot-location": ["warn", "property"],
  25. "dot-notation": "warn",
  26. "eol-last": "warn",
  27. "indent": ["warn", 2, {"SwitchCase": 1}],
  28. "key-spacing": ["warn", {"afterColon": true}],
  29. "linebreak-style": ["warn", "unix"],
  30. "max-nested-callbacks": ["warn", 10],
  31. "new-cap": "warn",
  32. "new-parens": "warn",
  33. "no-catch-shadow": "warn",
  34. "no-cond-assign": ["warn", "except-parens"],
  35. "no-const-assign": "error",
  36. "no-delete-var": "warn",
  37. "no-div-regex": "warn",
  38. "no-dupe-args": "warn",
  39. "no-dupe-keys": "warn",
  40. "no-duplicate-case": "error",
  41. "no-empty-character-class": "warn",
  42. "no-eq-null": "warn",
  43. "no-ex-assign": "warn",
  44. "no-extra-boolean-cast": "warn",
  45. "no-extra-parens": ["warn", "functions"],
  46. "no-extra-semi": "warn",
  47. "no-fallthrough": "error",
  48. "no-floating-decimal": "warn",
  49. "no-func-assign": "warn",
  50. "no-implicit-coercion": ["warn", {"boolean": true, "number": true}],
  51. "no-inner-declarations": ["warn", "functions"],
  52. "no-invalid-regexp": "error",
  53. "no-irregular-whitespace": "warn",
  54. "no-labels": "error",
  55. "no-lone-blocks": "warn",
  56. "no-lonely-if": "warn",
  57. "no-loop-func": "warn",
  58. "no-mixed-spaces-and-tabs": "warn",
  59. "no-multi-spaces": "warn",
  60. "no-multi-str": "warn",
  61. "no-multiple-empty-lines": ["warn", {"max": 2, "maxBOF": 0, "maxEOF": 1}],
  62. "no-negated-in-lhs": "warn",
  63. "no-nested-ternary": "warn",
  64. "no-new": "warn",
  65. "no-new-func": "warn",
  66. "no-new-object": "warn",
  67. "no-new-require": "warn",
  68. "no-new-wrappers": "warn",
  69. "no-obj-calls": "warn",
  70. "no-octal": "warn",
  71. "no-octal-escape": "warn",
  72. "no-path-concat": "warn",
  73. "no-redeclare": ["warn", {"builtinGlobals": true}],
  74. "no-regex-spaces": "warn",
  75. "no-return-assign": ["warn", "except-parens"],
  76. "no-script-url": "warn",
  77. "no-self-compare": "warn",
  78. "no-sequences": "warn",
  79. "no-shadow": ["warn", {"builtinGlobals": true, "hoist": "functions", "allow": ["self"]}],
  80. "no-shadow-restricted-names": "warn",
  81. "no-spaced-func": "warn",
  82. "no-throw-literal": "error",
  83. "no-trailing-spaces": "warn",
  84. "no-undef": "warn",
  85. "no-undefined": "warn",
  86. "no-unexpected-multiline": "warn",
  87. "no-unneeded-ternary": "warn",
  88. "no-unreachable": "warn",
  89. "no-unused-expressions": "warn",
  90. "no-use-before-define": "warn",
  91. "no-var": "warn",
  92. "no-void": "warn",
  93. "no-warning-comments": ["warn", {"location": "anywhere", "terms": ["TODO", " FIXME", " BUG"]}],
  94. "object-curly-spacing": ["warn", "never", {}],
  95. "object-shorthand": ["warn", "always"],
  96. "one-var": ["warn", {"const": "never", "let": "consecutive", "var": "consecutive", "separateRequires": true}],
  97. "operator-assignment": ["warn", "always"],
  98. "operator-linebreak": ["warn", "after"],
  99. "prefer-const": "warn",
  100. "quote-props": ["warn", "consistent"],
  101. "quotes": ["warn", "single", "avoid-escape"],
  102. "semi": ["warn", "always", {"omitLastInOneLineBlock": true}],
  103. "space-in-parens": ["warn", "never", {}],
  104. "spaced-comment": ["warn", "always", {}],
  105. "valid-typeof": "error",
  106. "wrap-iife": ["warn", "inside", {"functionPrototypeMethods": true}],
  107. "wrap-regex": "warn",
  108. "yoda": ["warn", "never", {"exceptRange": true}]
  109. },
  110. "overrides": [
  111. {
  112. "files": "**/*.babel.js",
  113. "parserOptions": {"sourceType": "module"}
  114. }
  115. ]
  116. }