// Flat config (ESLint 9). Recommended presets only: this is ~500 lines of // library code, and a bespoke rule set would be a second opinion to maintain // for no benefit. The floor is "lint runs and can fail", not "lint encodes // taste". import js from '@eslint/js'; import globals from 'globals'; import tseslint from 'typescript-eslint'; export default tseslint.config( { // dist/ is generated by `tsc`. ignores: ['dist/**', 'node_modules/**'], }, js.configs.recommended, ...tseslint.configs.recommended, { files: ['**/*.ts'], languageOptions: { globals: globals.node }, }, { // Tests are plain Node running under `node --test`. files: ['test/**/*.js', 'scripts/**/*.{js,mjs}'], languageOptions: { globals: { ...globals.node, ...globals.nodeBuiltin } }, }, );