Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

.eslintrc.json 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. "parserOptions": {
  14. "ecmaVersion": 2016
  15. },
  16. "plugins": [
  17. "@stylistic"
  18. ],
  19. "rules": {
  20. "camelcase": "off",
  21. "capitalized-comments": "off",
  22. "curly": ["error", "multi-line"],
  23. "func-names": "off",
  24. "func-style": ["error", "declaration"],
  25. "id-length": ["error", { "min": 1 }],
  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": ["error", { "initialized": "never" }],
  39. "prefer-named-capture-group": "off",
  40. "prefer-object-has-own": "off",
  41. "prefer-spread": "off",
  42. "prefer-template": "off",
  43. "require-unicode-regexp": "off",
  44. "@stylistic/array-bracket-newline": ["error", "consistent"],
  45. "@stylistic/array-element-newline": "off",
  46. "@stylistic/brace-style": ["error", "1tbs", { "allowSingleLine": true }],
  47. "@stylistic/comma-dangle": ["error", "only-multiline"],
  48. "@stylistic/dot-location": ["error", "property"],
  49. "@stylistic/function-call-argument-newline": "off",
  50. "@stylistic/max-len": ["error", { "code": 128 }],
  51. "@stylistic/max-statements-per-line": ["error", { "max": 2 }],
  52. "@stylistic/multiline-ternary": ["error", "always-multiline"],
  53. "@stylistic/newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
  54. "@stylistic/no-extra-parens": ["error", "functions"],
  55. "@stylistic/object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
  56. "@stylistic/padded-blocks": ["error", "never"],
  57. "@stylistic/quote-props" : ["error", "consistent-as-needed"],
  58. "@stylistic/quotes": ["error", "double", { "avoidEscape": true }],
  59. "@stylistic/semi": ["error", "always"],
  60. "@stylistic/space-before-function-paren": ["error", {
  61. "anonymous": "always",
  62. "named": "never"
  63. }],
  64. // Temporarily disabled rules
  65. "max-lines": "off",
  66. "max-lines-per-function": "off",
  67. "no-invalid-this": "off",
  68. "sort-keys": "off",
  69. "@stylistic/function-paren-newline": "off",
  70. "@stylistic/indent-binary-ops": "off"
  71. }
  72. }