dynamic loading of rules breaks bundlers
llllvvuu opened this issue · 3 comments
If you follow this:
solhint/lib/config/config-file.js
Lines 8 to 11 in d182f16
Lines 9 to 12 in d182f16
These are all dynamic references to files that won't exist at runtime if running a bundle with eslint
bundled (e.g. using esbuild
, rollup
, or webpack
). Use-case for bundling eslint
could be for a VSCode extension or a web editor.
In comparison, here is how ESLint works: https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js
IMO the eslint
way is preferred also for the reason that you can quickly glance at and edit the rulesets, and is cleaner and simpler
I can put a PR for this real quick, just by dumping the resolved enabledRules
into jq --sort-keys
.
@llllvvuu great work !!
The team will be reviewing this
Thanks a lot for the contribution!!!