Skip to content

Commit 6111749

Browse files
Move to ESLint 10 and @microbit/eslint-config 0.2.1
Pin the React version the rules key off. eslint-react follows whatever React resolves in the project, which is 19, but we publish for React >= 17.0.2: without the pin it flags our forwardRef components, our Context.Provider and our useContext, none of which our consumers on 17 or 18 can drop. That leaves one real finding the old plugin never reported: the frame passed key after the prop spread, which deoptimises the automatic JSX runtime. Key first. Nothing changes semantically, as a props object never carries key. npm cannot resolve this bump in one step. The lockfile pins the old shared config with its eslint ^9.7 peer and npm tries to reconcile that rather than replace it, failing with a circular ERESOLVE. Uninstall eslint and @microbit/eslint-config first, then install the new pair.
1 parent cf5b669 commit 6111749

4 files changed

Lines changed: 598 additions & 2471 deletions

File tree

eslint.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
import microbit from '@microbit/eslint-config/react';
22
import storybook from 'eslint-plugin-storybook';
33

4-
export default [...microbit, ...storybook.configs['flat/recommended']];
4+
export default [
5+
...microbit,
6+
...storybook.configs['flat/recommended'],
7+
{
8+
// Rules keyed off the React version follow whatever is installed, which is
9+
// 19. We publish for React >= 17.0.2, so pin to the oldest we support
10+
// rather than be told to adopt APIs our consumers may not have.
11+
settings: { 'react-x': { version: '17.0.2' } },
12+
},
13+
];

0 commit comments

Comments
 (0)