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.

60 lines
1.2 KiB

  1. /**
  2. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: AGPL-3.0-or-later
  4. */
  5. module.exports = {
  6. globals: {
  7. __webpack_nonce__: true,
  8. _: true,
  9. $: true,
  10. dayNames: true,
  11. escapeHTML: true,
  12. firstDay: true,
  13. moment: true,
  14. oc_userconfig: true,
  15. sinon: true,
  16. },
  17. plugins: [
  18. 'cypress',
  19. ],
  20. extends: [
  21. '@nextcloud/eslint-config/typescript',
  22. 'plugin:cypress/recommended',
  23. ],
  24. rules: {
  25. 'comma-dangle': 'error',
  26. 'no-tabs': 'warn',
  27. // TODO: make sure we fix this as this is bad vue coding style.
  28. // Use proper sync modifier
  29. 'vue/no-mutating-props': 'warn',
  30. 'vue/custom-event-name-casing': ['error', 'kebab-case', {
  31. // allows custom xxxx:xxx events formats
  32. ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'],
  33. }],
  34. 'vue/html-self-closing': 'error',
  35. },
  36. settings: {
  37. jsdoc: {
  38. mode: 'typescript',
  39. },
  40. 'import/resolver': {
  41. typescript: {}, // this loads <rootdir>/tsconfig.json to eslint
  42. },
  43. },
  44. overrides: [
  45. // Allow any in tests
  46. {
  47. files: ['**/*.spec.ts'],
  48. rules: {
  49. '@typescript-eslint/no-explicit-any': 'warn',
  50. },
  51. },
  52. {
  53. files: ['*.vue'],
  54. rules: {
  55. 'no-irregular-whitespace': 'off',
  56. 'vue/no-irregular-whitespace': 'error',
  57. },
  58. },
  59. ],
  60. }