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.

83 lines
2.6 KiB

  1. /**
  2. * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: AGPL-3.0-or-later
  4. */
  5. import { recommended } from '@nextcloud/eslint-config'
  6. import globals from 'globals'
  7. export default [
  8. ...recommended,
  9. {
  10. name: 'talk/ignores',
  11. ignores: [
  12. // Generated files
  13. 'src/types/openapi/*',
  14. 'js/*',
  15. // Vendor code
  16. 'src/utils/**/vendor/*',
  17. // Temporary ignore code in documentation examples
  18. 'docs',
  19. // TODO: upstream
  20. 'openapi-*.json',
  21. ],
  22. },
  23. {
  24. name: 'talk/config',
  25. languageOptions: {
  26. globals: {
  27. ...globals.browser,
  28. ...globals.node,
  29. IS_DESKTOP: 'readonly',
  30. __webpack_public_path__: 'writable',
  31. },
  32. },
  33. },
  34. {
  35. name: 'talk/jest',
  36. files: ['src/__mocks__/*.js', '**/*.spec.js', 'src/test-setup.js'],
  37. languageOptions: {
  38. globals: {
  39. ...globals.jest,
  40. },
  41. },
  42. },
  43. {
  44. name: 'talk/disabled-during-migration',
  45. rules: {
  46. '@nextcloud-l10n/non-breaking-space': 'off', // changes translation strings
  47. '@nextcloud-l10n/non-breaking-space-vue': 'off', // changes translation strings
  48. '@stylistic/array-bracket-newline': 'off', // changes array formatting
  49. '@stylistic/max-statements-per-line': 'off', // non-fixable
  50. '@typescript-eslint/no-unused-expressions': 'off', // non-fixable
  51. '@typescript-eslint/no-unused-vars': 'off', // non-fixable
  52. '@typescript-eslint/no-use-before-define': 'off', // non-fixable
  53. 'antfu/top-level-function': 'off', // non-fixable
  54. 'jsdoc/check-param-names': 'off', // need to respect JS
  55. 'jsdoc/check-tag-names': 'off', // need to respect JS
  56. 'jsdoc/check-types': 'off', // need to respect JS
  57. 'jsdoc/no-defaults': 'off', // need to respect JS
  58. 'jsdoc/no-types': 'off', // need to respect JS
  59. 'jsdoc/require-param': 'off', // need to respect JS
  60. 'jsdoc/require-param-type': 'off', // need to respect JS
  61. 'jsdoc/require-param-description': 'off', // need to respect JS
  62. 'jsdoc/tag-lines': 'off', // need to respect JS
  63. 'no-console': 'off', // non-fixable
  64. 'no-unused-vars': 'off', // non-fixable
  65. 'no-use-before-define': 'off', // non-fixable
  66. 'object-shorthand': 'off', // changes Vue watchers
  67. 'prefer-object-has-own': 'off', // changes Objet.prototype.hasOwnProperty
  68. 'prefer-object-spread': 'off', // changes Object.assign
  69. 'vue/first-attribute-linebreak': 'off', // changes all Vue files
  70. 'vue/multi-word-component-names': 'off', // non-fixable
  71. 'vue/no-boolean-default': 'off', // non-fixable
  72. 'vue/no-required-prop-with-default': 'off', // non-fixable
  73. 'vue/no-unused-properties': 'off', // non-fixable
  74. 'vue/no-unused-refs': 'off', // non-fixable
  75. },
  76. },
  77. ]