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.js 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. module.exports = {
  2. 'env': {
  3. 'browser': true,
  4. 'commonjs': true,
  5. 'es6': true
  6. },
  7. 'extends': [
  8. 'eslint:recommended',
  9. 'plugin:flowtype/recommended'
  10. ],
  11. 'globals': {
  12. // The globals that (1) are accessed but not defined within many of our
  13. // files, (2) are certainly defined, and (3) we would like to use
  14. // without explicitly specifying them (using a comment) inside of our
  15. // files.
  16. '__filename': false
  17. },
  18. 'parser': 'babel-eslint',
  19. 'parserOptions': {
  20. 'ecmaFeatures': {
  21. 'experimentalObjectRestSpread': true
  22. },
  23. 'sourceType': 'module'
  24. },
  25. 'plugins': [
  26. 'flowtype'
  27. ],
  28. 'rules': {
  29. 'indent': [
  30. 'error',
  31. 4,
  32. {
  33. 'CallExpression': {
  34. arguments: 'off'
  35. },
  36. 'FunctionDeclaration': {
  37. parameters: 2
  38. },
  39. 'FunctionExpression': {
  40. parameters: 2
  41. },
  42. 'MemberExpression': 'off',
  43. 'SwitchCase': 0
  44. }
  45. ],
  46. 'new-cap': [
  47. 'error',
  48. {
  49. 'capIsNew': false // Behave like JSHint's newcap.
  50. }
  51. ],
  52. // While it is considered a best practice to avoid using methods on
  53. // console in JavaScript that is designed to be executed in the browser
  54. // and ESLint includes the rule among its set of recommended rules, (1)
  55. // the general practice is to strip such calls before pushing to
  56. // production and (2) we prefer to utilize console in lib-jitsi-meet
  57. // (and jitsi-meet).
  58. 'no-console': 'off',
  59. 'semi': 'error'
  60. }
  61. };