Open libkakashi opened 5 months ago
Great idea. Can you provide me a diff for what makes it hard to work on a Figma plugin or something else? Also happy to check a PR on the flag if you are interested in adding this feature.
Sure, I could probably work on it sometime over the weekend
One example is how imports don't work in js files even when not using node. Let's say I've a simple js file like this:
import script2 from './script2.js';
document.getElementById('button').addEventListener('click', () => {
console.log('button clicked');
script2();
});
I'd get an error saying error Import and export declarations are not supported yet
, unless I mention "n/no-unsupported-features/es-syntax": "off"
in my eslint config, even tho I'm not using node at all.
As of now, the default .eslintrc.json file that's extended by all projects has the following code:
Overwriting this to make it work with browser envs, bun, figma plugins, etc. is bit of a pain. Could we have something like a CLI flag that makes it optional to include node specific rules?