~/bend-docscommunity

layout/imports.bend fails

raw source on the hub · import bend-lint-rules@0.1.0.0/layout/imports.bend as Imports

layout/imports: an import block out of order, with a file imported twice, or with blank lines. The order: import Base, then the other imports by written path, then by alias, by code point; a comment line stays with the import below it. Fix: writes the block in order, drops a second import of a file, and points its uses at the first one's alias. Heuristics: two imports name one file if the check loads one file for both.

5 imports
import Base
import bend-lint-api@0.1.0.0/linter/lint.bend as Lint
import bend-lint-api@0.1.0.0/shared/lists.bend as Lists
import bend-lint-api@0.1.0.0/shared/names.bend as Names
import bend-lint-api@0.1.0.0/shared/strings.bend as Strings