truffle
truffle copied to clipboard
Some files in truffle package needs to be excluded from using prettier in git commits
Issue
Truffle uses prettier
for consistent code style across the whole codebase. But there may be some files that need to exclude the use of prettier
in the git commits. For example, truffle-config.js
in packages/core/lib/commands/init/initSource
has few trailing commas that are needed, which are automatically removed by prettier
once that file is committed. We generally use --no-verify
flag while committing that file, which is not an ideal solution.
There should probably be a way to exclude certain files from using prettier
in the commits.