-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Environment:
- Node.js:
22.3.0 - pnpm:
9.12.1 - ESLint:
^9.13.0 eslint-plugin-react:^7.37.2eslint-plugin-jsx-a11y:^6.10.1@pandacss/eslint-plugin:^0.2.0
Description:
In a pnpm environment using ESLint's Flat Config with a React setup, I encounter an assertion failure in fsevents when running ESLint multiple times with the --cache option. This occurs specifically when using both @pandacss/eslint-plugin and eslint-plugin-jsx-a11y together.
Error Message:
eslint --cache .
Assertion failed: (napi_create_external(env, fseenv, fse_environment_destroy, NULL, &result) == napi_ok), function fse_environment_create, file fsevents.c, line 87.
[1] 54618 abort eslint --cache .Observations:
- The issue does not occur when using either plugin individually.
- When
@pandacss/eslint-pluginis configured, the error only occurs with the--cacheoption. - Simply importing
@pandacss/eslint-pluginwithout configuring it causes the error, even without the--cacheoption.
Steps to Reproduce:
-
Configure ESLint with
@pandacss/eslint-plugin:import pandaPlugin from "@pandacss/eslint-plugin"; export const pandaConfigs = [ { plugins: { "@pandacss": pandaPlugin }, rules: pandaPlugin.configs.recommended.rules, }, ];
-
Run ESLint without cache (No Error):
eslint . /path/to/src/App.tsx 8:7 warning Unnecessary debug utility @pandacss/no-debug ✖ 1 problem (0 errors, 1 warning) -
Run ESLint with cache (Error Occurs):
eslint --cache . /path/to/src/App.tsx 8:7 warning Unnecessary debug utility @pandacss/no-debug ✖ 1 problem (0 errors, 1 warning) Assertion failed: (napi_create_external(env, fseenv, fse_environment_destroy, NULL, &result) == napi_ok), function fse_environment_create, file fsevents.c, line 87. ELIFECYCLE Command failed. [1] 37634 abort pnpm lint.cache
-
Importing Without Configuration (Error Occurs Without Cache):
// The error occurs just by importing without setting up the plugin. // eslint-disable-next-line @typescript-eslint/no-unused-vars import pandaPlugin from "@pandacss/eslint-plugin"; export const pandaConfigs = [];
eslint . Assertion failed: (napi_create_external(env, fseenv, fse_environment_destroy, NULL, &result) == napi_ok), function fse_environment_create, file fsevents.c, line 87. [1] 37161 abort eslint .
Minimal Reproducible Environment
A repository demonstrating the issue can be found here: eslint-plugin-panda-170
Additional Information:
- The issue seems related to the interaction between
@pandacss/eslint-plugin,eslint-plugin-jsx-a11y, and ESLint's caching mechanism. - Removing either plugin or disabling cache prevents the error from occurring.
- The error points to an assertion failure in
fsevents, specifically infsevents.cat line 87.
Behavior:
Expected:
- ESLint should run without errors when both plugins are used together, regardless of the cache option.
Actual:
- ESLint aborts with an assertion failure in
fseventswhen both plugins are used together with the cache option enabled.
Request:
- Assistance in identifying the cause of this issue and a potential fix or workaround.
Metadata
Metadata
Assignees
Labels
No labels