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'],
22 'jsdoc/check-tag-names': ['warn', { typed
: true, definedTags
: ['defaultValue', 'experimental', 'typeParam'] }],
26 ...tseslint
.configs
.strictTypeChecked
,
27 ...tseslint
.configs
.stylisticTypeChecked
40 tsconfigRootDir
: import.meta
.dirname
,
46 'simple-import-sort': simpleImportSort
,
49 '@cspell/spellchecker': [
67 'simple-import-sort/imports': 'error',
68 'simple-import-sort/exports': 'error',
73 'src/pools/selection-strategies/fair-share-worker-choice-strategy.ts',
76 '@stylistic/operator-linebreak': 'off',
80 files
: ['**/*.js', '**/*.mjs', '**/*.cjs'],
81 ...tseslint
.configs
.disableTypeChecked
,
83 // examples specific configuration
85 files
: ['examples/**/*.ts'],
87 '@typescript-eslint/no-unsafe-argument': 'off',
88 '@typescript-eslint/no-unsafe-call': 'off',
89 '@typescript-eslint/no-unsafe-return': 'off',
90 '@typescript-eslint/no-unsafe-assignment': 'off',
91 '@typescript-eslint/no-unsafe-member-access': 'off',
92 '@typescript-eslint/no-unnecessary-type-assertion': 'off',
93 '@typescript-eslint/no-redundant-type-constituents': 'off',
97 files
: ['examples/**/*.js', 'examples/**/*.cjs'],
99 'n/no-missing-import': [
102 allowModules
: ['ws'],
105 '@typescript-eslint/no-require-imports': 'off',
108 // benchmarks specific configuration
110 files
: ['benchmarks/**/*.cjs'],
112 '@typescript-eslint/no-require-imports': 'off',
115 // tests specific configuration
117 files
: ['tests/**/*.js', 'tests/**/*.mjs', 'tests/**/*.cjs'],
119 '@typescript-eslint/no-require-imports': 'off',
120 '@typescript-eslint/no-empty-function': 'off',