Skip to content

feat: support ESLint v10#340

Open
pmmmwh wants to merge 1 commit into
Intellicode:masterfrom
pmmmwh:feat/eslint-v10
Open

feat: support ESLint v10#340
pmmmwh wants to merge 1 commit into
Intellicode:masterfrom
pmmmwh:feat/eslint-v10

Conversation

@pmmmwh
Copy link
Copy Markdown

@pmmmwh pmmmwh commented May 25, 2026

No description provided.

Copy link
Copy Markdown

@StantonMatt StantonMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 json

I 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...HEAD

Those 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants