eslint-community / eslint-plugin-n

Additional ESLint rules for Node.js
MIT License
197 stars 37 forks source link

Support for "import attributes" and "import assertions" #284

Open scagood opened 1 month ago

scagood commented 1 month ago

I cant remember if I added this during the no unsupported PRs, but I want to keep track of the this!

18.20, 20.10, 21.0 - experimental import attributes. (import ? from '?' with { type: ? }) 17.1, 16.14 - experimental import assertions. (import ? from '?' assert { type: ? })

aladdin-add commented 1 month ago

technically it's not possible (at least for built-in parser): eslint does not support stage<4 features, so it will just report an syntax error.

https://github.com/eslint/eslint?tab=readme-ov-file#what-about-experimental-features

scagood commented 1 month ago

Ah, good to know! I will leave this here to track until we can do something :)