I want to have all my imports at the same place (top of the script), without having the possibility to declare imports anywhere else in the script.
Suggested solution
In imports-first or import-top, we could detect each import statement and force it to be at the top of the file. That would also allow rules like sort imports to work better with a single imports "block".
Alternative
I could use the import/first rule, but I dropped eslint plugin import as it's not eslint 9 compatible.
Verifying manually that the imports are all on top.
Clear and concise description of the problem
I want to have all my imports at the same place (top of the script), without having the possibility to declare imports anywhere else in the script.
Suggested solution
In
imports-first
orimport-top
, we could detect each import statement and force it to be at the top of the file. That would also allow rules like sort imports to work better with a single imports "block".Alternative
Additional context
export
at the end?Validations
Contributes