feat: support ESLint v10#340
Conversation
There was a problem hiding this comment.
I took a local verification pass on 89915db because this directly addresses the flat-config gap in #333 and the project does not report any hosted checks on the PR branch.
The new flat/all export works for me with both ESLint 9 and the current latest ESLint 10.4.1. I used a small flat-config smoke fixture that loads this checkout's plugin directly:
const reactNative = require('repos/intellicode-eslint-plugin-react-native');
module.exports = [
reactNative.configs['flat/all'],
{
files: ['sample.jsx'],
languageOptions: {
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
ecmaFeatures: { jsx: true },
},
},
},
];Both of these loaded the flat config and reported the expected react-native/* rule errors on the sample JSX file:
TMPDIR=.codex-tmp/npm-tmp npm_config_cache=.codex-tmp/npm-cache npx --yes eslint@9 sample.jsx --format json
TMPDIR=.codex-tmp/npm-tmp npm_config_cache=.codex-tmp/npm-cache npx --yes eslint@10 sample.jsx --format jsonI also ran:
TMPDIR=.codex-tmp/npm-tmp npm_config_cache=.codex-tmp/npm-cache npm ci
TMPDIR=.codex-tmp/npm-tmp npm_config_cache=.codex-tmp/npm-cache npm test
./node_modules/.bin/mocha tests/index.js tests/lib/rules/sort-styles.js
node -e 'const plugin=require("./"); console.log(Object.keys(plugin.configs).sort(), plugin.meta, Object.keys(plugin.configs["flat/all"].rules).length)'
git diff --check origin/master...HEADThose passed as well. npm test reported 130 passing tests, and the focused tests/index.js / sort-styles run reported 38 passing tests.
I do not see any GitHub checks on feat/eslint-v10, so the above is only local verification. It would be worth adding a short PR body linking #333 and saying that configs['flat/all'] is intended as the flat-config entry point; otherwise the tested behavior looks good from this pass.
No description provided.