1 import cspellConfigs
from '@cspell/eslint-plugin/configs'
2 import js
from '@eslint/js'
3 import { defineFlatConfig
} from 'eslint-define-config'
4 import jsdoc
from 'eslint-plugin-jsdoc'
5 import nodePlugin
from 'eslint-plugin-n'
6 import simpleImportSort
from 'eslint-plugin-simple-import-sort'
7 import globals
from 'globals'
8 import neostandard
from 'neostandard'
9 // eslint-disable-next-line n/no-extraneous-import
10 import tseslint
from 'typescript-eslint'
12 export default defineFlatConfig([
14 ignores
: ['docs/**', '**/dist/**', 'lib/**', 'outputs/**'],
16 cspellConfigs
.recommended
,
17 js
.configs
.recommended
,
18 ...nodePlugin
.configs
['flat/mixed-esm-and-cjs'],
19 jsdoc
.configs
['flat/recommended-typescript'],
21 ...tseslint
.configs
.strictTypeChecked
,
22 ...tseslint
.configs
.stylisticTypeChecked
35 tsconfigRootDir
: import.meta
.dirname
,
41 'simple-import-sort': simpleImportSort
,
44 '@cspell/spellchecker': [
62 'simple-import-sort/imports': 'error',
63 'simple-import-sort/exports': 'error',
68 'src/pools/selection-strategies/fair-share-worker-choice-strategy.ts',
71 '@stylistic/operator-linebreak': 'off',
75 files
: ['**/*.js', '**/*.mjs', '**/*.cjs'],
76 ...tseslint
.configs
.disableTypeChecked
,
78 // examples specific configuration
80 files
: ['examples/**/*.ts'],
82 '@typescript-eslint/no-unsafe-argument': 'off',
83 '@typescript-eslint/no-unsafe-call': 'off',
84 '@typescript-eslint/no-unsafe-return': 'off',
85 '@typescript-eslint/no-unsafe-assignment': 'off',
86 '@typescript-eslint/no-unsafe-member-access': 'off',
87 '@typescript-eslint/no-unnecessary-type-assertion': 'off',
88 '@typescript-eslint/no-redundant-type-constituents': 'off',
92 files
: ['examples/**/*.js', 'examples/**/*.cjs'],
94 'n/no-missing-import': [
100 '@typescript-eslint/no-require-imports': 'off',
103 // benchmarks specific configuration
105 files
: ['benchmarks/**/*.cjs'],
107 '@typescript-eslint/no-require-imports': 'off',
110 // tests specific configuration
112 files
: ['tests/**/*.js', 'tests/**/*.mjs', 'tests/**/*.cjs'],
114 '@typescript-eslint/no-require-imports': 'off',
115 '@typescript-eslint/no-empty-function': 'off',