shorthand_sanitizer 0.6.0 copy "shorthand_sanitizer: ^0.6.0" to clipboard
shorthand_sanitizer: ^0.6.0 copied to clipboard

Type-resolved codemod that rewrites Type.member to Dart dot-shorthand .member when the rewrite provably resolves to the same element. Ships the dotsan CLI.

example/example.md

dart pub global activate shorthand_sanitizer

dotsan                          # sanitize lib/
dotsan lib test --dry-run       # report only
dotsan --skip=AsyncValue.error  # keep listed members prefixed

Before:

Column(
  mainAxisAlignment: MainAxisAlignment.start,
  children: [Text('hi', overflow: TextOverflow.ellipsis)],
)

After dotsan lib:

Column(
  mainAxisAlignment: .start,
  children: [Text('hi', overflow: .ellipsis)],
)
2
likes
160
points
160
downloads

Documentation

API reference

Publisher

verified publishermehmetesen.com

Weekly Downloads

Type-resolved codemod that rewrites Type.member to Dart dot-shorthand .member when the rewrite provably resolves to the same element. Ships the dotsan CLI.

Homepage
Repository (GitHub)
View/report issues

Topics

#codemod #cli #analyzer #refactoring #shorthand

License

MIT (license)

Dependencies

analyzer, args, glob, path

More

Packages that depend on shorthand_sanitizer