aladdin-add / eslint-plugin

autofix some errors reported by eslint rules.
106 stars 10 forks source link

bug report: `eslint-plugin-no-autofix` crashes when run on `pre-commit.ci` #98

Open Samuel-Therrien-Beslogic opened 2 months ago

Samuel-Therrien-Beslogic commented 2 months ago

Tell us about your environment Run on pre-commit.ci . Config file: https://github.com/BesLogic/releaf-canopeum/blob/bda039de852dfa164309c9a5c8a9945e321d7717/.pre-commit-config.yaml (although I'm currently working around it by not using no-autofix whilst running on pre-commit.ci)

Expected behavior

No crash.

Actual behavior

Looking at the logs below, it looks like it might be trying to scan a node_module at a location that doesn't exist ?

Run: https://results.[pre-commit.ci](https://results.pre-commit.ci/run/github/771018559/1721085009.qZHCeznDTve6PMAqJ7p21A)/run/github/771018559/1721085009.qZHCeznDTve6PMAqJ7p21A

Oops! Something went wrong! :(

ESLint: 8.56.0

Error: Failed to load plugin 'no-autofix' declared in 'canopeum_frontend/.eslintrc.cjs » eslint-config-beslogic/react » ./javascript': ENOENT: no such file or directory, scandir '/pc/clone/VaOx4E9QTZeyBfAt5DfXBQ/node_modules/'
    at Object.readdirSync (node:fs:1527:3)
    at Object.<anonymous> (/pc/clone/VaOx4E9QTZeyBfAt5DfXBQ/node_env-system/lib/node_modules/eslint-plugin-no-autofix/lib/rules.js:60:23)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/pc/clone/VaOx4E9QTZeyBfAt5DfXBQ/node_env-system/lib/node_modules/eslint-plugin-no-autofix/lib/configs/all.js:9:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)