|
1 | | -// Keep in sync with .github/shared/eslint.config.js |
| 1 | +import { defineBaseConfig } from "../eslint.base.config.js"; |
2 | 2 |
|
3 | | -import eslint from "@eslint/js"; |
4 | | -import { defineConfig } from "eslint/config"; |
5 | | -import globals from "globals"; |
6 | | -import tseslint from "typescript-eslint"; |
7 | | - |
8 | | -/** @type {import('eslint').Linter.Config[]} */ |
9 | | -export default defineConfig( |
10 | | - eslint.configs.recommended, |
11 | | - tseslint.configs.recommendedTypeChecked, |
12 | | - { |
13 | | - languageOptions: { |
14 | | - // we only run in node, not browser |
15 | | - globals: globals.node, |
16 | | - // required to use tseslint.configs.recommendedTypeChecked |
17 | | - parserOptions: { |
18 | | - projectService: { |
19 | | - allowDefaultProject: ["*.js", "cmd/*.js"], |
20 | | - }, |
21 | | - // ensures the tsconfig path resolves relative to this file |
22 | | - // default is process.cwd() when running eslint, which may be incorrect |
23 | | - tsconfigRootDir: import.meta.dirname, |
24 | | - }, |
25 | | - }, |
26 | | - }, |
27 | | - { |
28 | | - ignores: ["coverage/**", "dist/**"], |
29 | | - }, |
30 | | -); |
| 3 | +export default defineBaseConfig({ |
| 4 | + // ensures the tsconfig path resolves relative to this file (so cannot be defined in base file) |
| 5 | + // default is process.cwd() when running eslint, which may be incorrect |
| 6 | + tsconfigRootDir: import.meta.dirname, |
| 7 | +}); |
0 commit comments