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.

.eslintrc.json 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {
  2. "env": {
  3. "browser": true,
  4. "es6": true
  5. },
  6. "extends": [
  7. "eslint:all",
  8. "plugin:@stylistic/all-extends"
  9. ],
  10. "globals": {
  11. "define": false
  12. },
  13. "plugins": [
  14. "@stylistic"
  15. ],
  16. "rules": {
  17. "camelcase": "off",
  18. "capitalized-comments": "off",
  19. "curly": ["error", "multi-line"],
  20. "func-names": "off",
  21. // "func-style": ["error", "declaration"],
  22. "id-length": ["error", { "min": 1 }],
  23. // "@stylistic/key-spacing": ["error", {
  24. // "singleLine": { "afterColon": false }
  25. // }],
  26. "line-comment-position": "off",
  27. "logical-assignment-operators": ["error", "never"],
  28. "max-params": ["warn", 6],
  29. "max-statements": ["warn", 55],
  30. "multiline-comment-style": "off",
  31. "no-continue": "off",
  32. "no-inline-comments": "off",
  33. "no-magic-numbers": "off",
  34. "no-negated-condition": "off",
  35. "no-plusplus": "off",
  36. "no-ternary": "off",
  37. "object-shorthand": "off",
  38. "one-var": "off",
  39. "prefer-arrow-callback": "off",
  40. "prefer-destructuring": "off",
  41. "prefer-named-capture-group": "off",
  42. "prefer-object-has-own": "off",
  43. "prefer-spread": "off",
  44. "prefer-template": "off",
  45. "require-unicode-regexp": "off",
  46. "@stylistic/array-bracket-newline": ["error", "consistent"],
  47. "@stylistic/array-element-newline": "off",
  48. "@stylistic/brace-style": ["error", "1tbs", { "allowSingleLine": true }],
  49. "@stylistic/comma-dangle": ["error", "only-multiline"],
  50. "@stylistic/dot-location": ["error", "property"],
  51. "@stylistic/function-call-argument-newline": "off",
  52. "@stylistic/indent": ["error", 4, { "SwitchCase": 1 }],
  53. "@stylistic/max-len": ["error", { "code": 120 }],
  54. "@stylistic/max-statements-per-line": ["error", { "max": 2 }],
  55. "@stylistic/multiline-ternary": ["error", "always-multiline"],
  56. "@stylistic/newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
  57. "@stylistic/no-extra-parens": ["error", "functions"],
  58. "@stylistic/object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
  59. "@stylistic/padded-blocks": "off",
  60. "@stylistic/quote-props" : ["error", "consistent-as-needed"],
  61. "@stylistic/quotes": ["error", "double", { "avoidEscape": true }],
  62. "@stylistic/semi": ["error", "always"],
  63. "@stylistic/space-before-function-paren": ["error", {
  64. "anonymous": "always",
  65. "named": "never"
  66. }],
  67. // Temporarily disabled rules
  68. "func-style": "off",
  69. "max-lines": "off",
  70. "max-lines-per-function": "off",
  71. "no-invalid-this": "off",
  72. "prefer-exponentiation-operator": "off",
  73. "sort-keys": "off",
  74. "sort-vars": "off",
  75. "@stylistic/function-paren-newline": "off",
  76. "@stylistic/key-spacing": "off",
  77. "@stylistic/max-len": "off",
  78. "@stylistic/one-var-declaration-per-line": "off"
  79. }
  80. }