Skip to content

JtheSaw/flutter-format-pre-commit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Format pre-commit

pre-commit hook for formatting Flutter files.

Add the following in your .pre-commit-config.yaml:

- repo: https://github.com/JtheSaw/flutter-format-pre-commit
  rev: "master"
  hooks:
    - id: flutter-format
    - id: dart-fix

You can also only include/exclude some files (defaults to only .dart, is a pattern):

- repo: https://github.com/JtheSaw/flutter-format-pre-commit
  rev: "master"
  hooks:
    - id: flutter-format
      files: lib/* # Only format source files
      exclude: lib/src/avatar.dart # Exclude the avatar widget

Dart

Also see Dart Format pre-commit for formatting only Dart code.

About

Format Flutter code with pre-commit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%