eslint.config.js 736 B

12345678910111213141516171819202122232425262728293031323334
  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. parser: '@typescript-eslint/parser',
  11. preset: 'node',
  12. packageRoot: __dirname,
  13. ignore: ['.eslintrc.cjs'],
  14. parserOptions: {
  15. requireConfigFile: false,
  16. ecmaVersion: 2017,
  17. sourceType: 'module',
  18. ecmaFeatures: {
  19. modules: true,
  20. },
  21. },
  22. rules: {
  23. 'no-console': 'off',
  24. },
  25. plugins: ['json', '@typescript-eslint'],
  26. settings: {
  27. react: {
  28. version: '18',
  29. },
  30. },
  31. });