Skip to content

Commit 4d4f67f

Browse files
Adopt @microbit/eslint-config (#67)
Replaces the local flat config with the shared one, moving to ESLint 10 and type-checked linting via the project service. eslint, @eslint/js, globals and typescript-eslint are no longer individually managed here. Fixes everything the new rules surfaced rather than carrying overrides: @ts-ignore in tests becomes described @ts-expect-error, hasOwnProperty calls go through Object.prototype, bytes read from the hex are typed as their enums, the import-hex error message joins its filename array explicitly, a dead runtimeEndAddress computation goes, and the flash-regions fallback error gains a cause (lib now includes ES2022.Error).
1 parent fb6a787 commit 4d4f67f

10 files changed

Lines changed: 1037 additions & 377 deletions

eslint.config.mjs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
import globals from 'globals';
2-
import pluginJs from '@eslint/js';
3-
import tseslint from 'typescript-eslint';
1+
import microbit from '@microbit/eslint-config';
42

5-
/** @type {import('eslint').Linter.Config[]} */
63
export default [
7-
{ ignores: ['docs', 'coverage', 'dist', 'src/types'] },
8-
{ files: ['**/*.{js,mjs,cjs,ts}'] },
9-
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
10-
pluginJs.configs.recommended,
11-
...tseslint.configs.recommended,
124
{
13-
rules: {
14-
'@typescript-eslint/ban-ts-comment': 'off',
15-
'no-prototype-builtins': 'off',
16-
},
5+
ignores: [
6+
// Typedoc output.
7+
'docs',
8+
// Not part of any tsconfig project.
9+
'vitest.config.mts',
10+
],
1711
},
12+
...microbit,
1813
];

0 commit comments

Comments
 (0)