Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Flat config (ESLint 9). Recommended presets only: this is ~600 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 ESM running under `node --test`.
files: ['test/**/*.js', 'scripts/**/*.{js,mjs}'],
languageOptions: { globals: { ...globals.node, ...globals.nodeBuiltin } },
},
)
Loading