.eslintrc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. {
  2. "parserOptions": {
  3. "ecmaVersion": 2018
  4. },
  5. "env": {
  6. "browser": true,
  7. "es6": true
  8. },
  9. "plugins": [
  10. "security"
  11. ],
  12. "extends": [
  13. "eslint:all",
  14. "plugin:security/recommended"
  15. ],
  16. "rules": {
  17. "no-undef": "error",
  18. "complexity": [
  19. "error",
  20. 6
  21. ],
  22. "require-unicode-regexp": 0,
  23. "require-jsdoc": [
  24. "error",
  25. {
  26. "require": {
  27. "FunctionDeclaration": true,
  28. "MethodDefinition": true,
  29. "ClassDeclaration": true,
  30. "ArrowFunctionExpression": true,
  31. "FunctionExpression": true
  32. }
  33. }
  34. ],
  35. "no-template-curly-in-string": 2,
  36. "prefer-template": 0,
  37. "wrap-iife": 1,
  38. "max-lines": 0,
  39. "max-lines-per-function": 0,
  40. "max-len": [
  41. 1,
  42. {
  43. "ignoreStrings": true,
  44. "ignoreTemplateLiterals": true
  45. }
  46. ],
  47. "max-statements": 0,
  48. "space-before-function-paren": [
  49. 1,
  50. {
  51. "anonymous": "always",
  52. "named": "never",
  53. "asyncArrow": "never"
  54. }
  55. ],
  56. "padded-blocks": [
  57. 1,
  58. "never"
  59. ],
  60. "id-length": [
  61. 1,
  62. {
  63. "min": 1
  64. }
  65. ],
  66. "one-var": 0,
  67. "func-names": [
  68. 1,
  69. "as-needed"
  70. ],
  71. "func-style": [
  72. 1,
  73. "declaration"
  74. ],
  75. "object-shorthand": 0,
  76. "prefer-arrow-callback": 0,
  77. "no-param-reassign": 0,
  78. "no-extra-parens": 0,
  79. "array-element-newline": [
  80. 1,
  81. {
  82. "multiline": true,
  83. "minItems": 12
  84. }
  85. ],
  86. "no-magic-numbers": 0,
  87. "function-paren-newline": [
  88. 1,
  89. "consistent"
  90. ],
  91. "function-call-argument-newline": [
  92. 1,
  93. "consistent"
  94. ],
  95. "no-ternary": 0,
  96. "no-nested-ternary": 0,
  97. "prefer-destructuring": 0,
  98. "max-params": [
  99. 1,
  100. 5
  101. ],
  102. "lines-around-comment": [
  103. 1,
  104. {
  105. "allowBlockStart": true
  106. }
  107. ],
  108. "sort-keys": [
  109. 1,
  110. "asc",
  111. {
  112. "caseSensitive": false
  113. }
  114. ]
  115. },
  116. "reportUnusedDisableDirectives": true
  117. }