Drupal 8 Site using Vue
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.

174 lines
3.1 KiB

  1. # http://eslint.org/docs/rules/
  2. # =============================
  3. # By default, ESLint will look for configuration files in all parent
  4. # folders up to the root directory. Prevent this by telling ESLint
  5. # that this is the root of the project.
  6. root: true
  7. # Which environments your script is designed to run in.
  8. # Each environment brings with it a certain set of predefined global variables.
  9. env:
  10. # Define globals exposed by Node.js.
  11. node: true
  12. # Define globals exposed by modern browsers.
  13. browser: true
  14. # Define globals exposed by ES6 / ES2015 EXCEPT for modules.
  15. es6: true
  16. # Define globals exposed by jQuery.
  17. jquery: true
  18. parserOptions:
  19. ecmaVersion: 2018
  20. ecmaFeatures:
  21. spread: true
  22. # Let ESLint know about defined global variables.
  23. globals:
  24. Drupal: true
  25. drupalSettings: true
  26. # Inherit settings from ESLint Recommended config.
  27. # Rules above override any rules configured here.
  28. extends: 'eslint:recommended'
  29. # 0 - turn the rule off
  30. # 1 - turn the rule on as a warning (doesn't affect exit code)
  31. # 2 - turn the rule on as an error (exit code is 1 when triggered)
  32. rules:
  33. # Two space indentation.
  34. indent:
  35. - 2
  36. - 2
  37. - SwitchCase: 1
  38. # Prefer single quotes over double.
  39. quotes:
  40. - 2
  41. - single
  42. # Specify Unix line endings.
  43. linebreak-style:
  44. - 2
  45. - unix
  46. # Enforce using semicolons.
  47. semi:
  48. - 2
  49. - always
  50. # Enforce camelcase for variables.
  51. camelcase:
  52. - 2
  53. # Prohibit use of == and != in favor of === and !==.
  54. eqeqeq:
  55. - 2
  56. # Enforce placing 'use strict' at the top function scope
  57. strict:
  58. - 2
  59. - function
  60. # Prohibit use of a variable before it is defined.
  61. no-undef:
  62. - 1
  63. # Enforce line length to 90 characters
  64. max-len:
  65. - 2
  66. - 90
  67. - 2
  68. # Require capitalized names for constructor functions.
  69. new-cap:
  70. - 2
  71. # Warn when variables are defined but never used.
  72. no-unused-vars:
  73. - 1
  74. # Require one var declaration for each variable and
  75. # declare each variable on a newline.
  76. one-var:
  77. - 2
  78. - never
  79. # Enforce stroustrup style for braces.
  80. brace-style:
  81. - 2
  82. - stroustrup
  83. # Validates JSDoc comments are syntactically correct
  84. valid-jsdoc:
  85. - 2
  86. # Treat var as Block Scoped
  87. block-scoped-var:
  88. - 1
  89. # Require Following Curly Brace Conventions
  90. curly:
  91. - 2
  92. # Disallow Use of Alert
  93. no-alert:
  94. - 1
  95. # Disallow eval()
  96. no-eval:
  97. - 2
  98. # Disallow the type conversion with shorter notations
  99. no-implicit-coercion:
  100. - 2
  101. # Disallow Functions in Loops
  102. no-loop-func:
  103. - 2
  104. # Disallow Script URLs
  105. no-script-url:
  106. - 2
  107. # Disallow Use of the Comma Operator
  108. no-sequences:
  109. - 2
  110. # Disallow unnecessary concatenation of strings
  111. no-useless-concat:
  112. - 2
  113. # Disallow Yoda Conditions
  114. yoda:
  115. - 2
  116. # Disallow Early Use
  117. no-use-before-define:
  118. - 2
  119. # Require file to end with single newline
  120. eol-last:
  121. - 2
  122. # Disallow trailing spaces at the end of lines
  123. no-trailing-spaces:
  124. - 2
  125. # Disallow Dangling Underscores in Identifiers
  126. no-underscore-dangle:
  127. - 2
  128. # Require JSDoc comment
  129. require-jsdoc:
  130. - 1
  131. # Require Or Disallow Space Before Blocks
  132. space-before-blocks:
  133. - 2