first
Configuration
rslint.config.ts
Rule Details
Ensures all import statements appear before other statements in a module. Since imports are hoisted, interleaving them with other code can be confusing.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
absolute-first
When set to "absolute-first", this rule enforces that absolute (package) imports appear before relative imports.
Examples of incorrect code with "absolute-first":
Examples of correct code with "absolute-first":
Original Documentation
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md