.eslintrc.cjs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. module.exports = {
  6. parser: "@typescript-eslint/parser",
  7. parserOptions: {
  8. requireConfigFile: false,
  9. babelOptions: {
  10. babelrc: false,
  11. configFile: false,
  12. cwd: __dirname,
  13. },
  14. },
  15. ignorePatterns: [
  16. '**/*.d.ts',
  17. '**/__mocks__',
  18. '**/node_modules',
  19. '**/build',
  20. '**/dist',
  21. '**/es',
  22. '**/lib',
  23. '**/.codebase',
  24. '**/.changeset',
  25. '**/config',
  26. '**/common/scripts',
  27. '**/output',
  28. 'error-log-str.js',
  29. '*.bundle.js',
  30. '*.min.js',
  31. '*.js.map',
  32. '**/output',
  33. '**/*.log',
  34. '**/tsconfig.tsbuildinfo',
  35. '**/vitest.config.ts',
  36. 'package.json',
  37. '*.json',
  38. ],
  39. rules: {
  40. 'no-console': 'off',
  41. 'react/no-deprecated': 'off',
  42. 'import/prefer-default-export': 'off',
  43. 'lines-between-class-members': 'warn',
  44. 'react/jsx-no-useless-fragment': 'off',
  45. 'no-unused-vars': 'off',
  46. 'no-redeclare': 'off',
  47. 'no-empty-fuNction': 'off',
  48. 'prefer-destructurin': 'off',
  49. 'no-underscore-dangle': 'off',
  50. 'no-empty-function': 'off',
  51. 'no-multi-assign': 'off',
  52. 'arrow-body-style': 'warn',
  53. 'no-useless-constructor': 'off',
  54. 'no-param-reassign': 'off',
  55. 'max-classes-per-file': 'off',
  56. 'grouped-accessor-pairs': 'off',
  57. 'no-plusplus': 'off',
  58. 'no-restricted-syntax': 'off',
  59. 'react/destructuring-assignment': 'off',
  60. 'import/extensions': 'off',
  61. 'consistent-return': 'off',
  62. 'jsx-a11y/no-static-element-interactions': 'off',
  63. 'no-use-before-define': 'off',
  64. 'no-bitwise': 'off',
  65. 'no-case-declarations': 'off',
  66. 'react/no-array-index-key': 'off',
  67. 'react/require-default-props': 'off',
  68. 'no-dupe-class-members': 'off',
  69. 'react/jsx-props-no-spreading': 'off',
  70. 'no-console': 'off',
  71. 'no-shadow': 'off',
  72. 'class-methods-use-this': 'off',
  73. 'default-param-last': 'off',
  74. },
  75. }