eslint.config.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. import { defineFlatConfig } from '@flowgram.ai/eslint-config';
  6. import path from 'path';
  7. import { fileURLToPath } from 'url';
  8. const __dirname = path.dirname(fileURLToPath(import.meta.url));
  9. export default defineFlatConfig({
  10. preset: 'node',
  11. packageRoot: __dirname,
  12. ignore: [
  13. '**/*.d.ts',
  14. '**/__mocks__',
  15. '**/node_modules',
  16. '**/build',
  17. '**/dist',
  18. '**/es',
  19. '**/lib',
  20. '**/.codebase',
  21. '**/.changeset',
  22. '**/config',
  23. '**/common/scripts',
  24. '**/output',
  25. 'error-log-str.js',
  26. '*.bundle.js',
  27. '*.min.js',
  28. '*.js.map',
  29. '**/*.log',
  30. '**/tsconfig.tsbuildinfo',
  31. '**/vitest.config.ts',
  32. 'package.json',
  33. '*.json',
  34. ],
  35. rules: {
  36. 'no-console': 'off',
  37. 'import/prefer-default-export': 'off',
  38. 'lines-between-class-members': 'warn',
  39. 'no-unused-vars': 'off',
  40. 'no-redeclare': 'off',
  41. 'no-empty-function': 'off',
  42. 'prefer-destructuring': 'off',
  43. 'no-underscore-dangle': 'off',
  44. 'no-multi-assign': 'off',
  45. 'arrow-body-style': 'warn',
  46. 'no-useless-constructor': 'off',
  47. 'no-param-reassign': 'off',
  48. 'max-classes-per-file': 'off',
  49. 'grouped-accessor-pairs': 'off',
  50. 'no-plusplus': 'off',
  51. 'no-restricted-syntax': 'off',
  52. 'import/extensions': 'off',
  53. 'consistent-return': 'off',
  54. 'no-use-before-define': 'off',
  55. 'no-bitwise': 'off',
  56. 'no-case-declarations': 'off',
  57. 'no-dupe-class-members': 'off',
  58. 'class-methods-use-this': 'off',
  59. 'default-param-last': 'off',
  60. },
  61. });