Skip to content

Commit

Permalink
Change the templates' JuliaFormatter config to be simpler
Browse files Browse the repository at this point in the history
Removes most of the configuration, leaving only basic information, like
indentation, line ending, and margin.

Closes #358
  • Loading branch information
abelsiqueira committed Jul 13, 2024
1 parent 20f119e commit 52e33f7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 43 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning].

## [Unreleased]

### Changed

- Default `.JuliaFormatter` now includes only minimal configuration that matches `.editorconfig` (#358)

## [0.8.0] - 2024-07-08

### Added
Expand Down
56 changes: 28 additions & 28 deletions src/BestieTemplate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@ function _copy(src_path, dst_path, data; kwargs...)

display(md"""Hi, **❤ Bestie ❤** here.
Below you will find a few questions to configure your template.
First, some **required** questions will need to be filled.
Then, you will have the option of selecting
Below you will find a few questions to configure your template.
First, some **required** questions will need to be filled.
Then, you will have the option of selecting
- The _recommended_ options, which includes our current _best practices recommendations_;
- The _minimum_ options, which will answer _no_ to everything, but still give you what
we consider the minimum best practices you need to get started; or
- Answer every optional question.
- The _recommended_ options, which includes our current _best practices recommendations_;
- The _minimum_ options, which will answer _no_ to everything, but still give you what
we consider the minimum best practices you need to get started; or
- Answer every optional question.
On any case, we suggest reading the **full guide**, and possibly other documentation pages:
On any case, we suggest reading the **full guide**, and possibly other documentation pages:
`https://abelsiqueira.com/BestieTemplate.jl/stable/10-full-guide`
`https://abelsiqueira.com/BestieTemplate.jl/stable/10-full-guide`
If something does not work as you would expect or you need clarifications,
please open an issue or discussion.
If something does not work as you would expect or you need clarifications,
please open an issue or discussion.
**❤ Good luck filling the questions, and thanks for choosing BestieTemplate ❤**
""")
**❤ Good luck filling the questions, and thanks for choosing BestieTemplate ❤**
""")
Copier.copy(src_path, dst_path, data; kwargs...)
end

Expand Down Expand Up @@ -161,23 +161,23 @@ function apply(src_path, dst_path, data::Dict = Dict(); warn_existing_pkg = true

println("""BestieTemplate was applied to $package_name.jl! 🎉
Next steps:
Next steps:
Review the modifications.
In particular README.md and docs/src/index.md tend to be heavily edited.
Review the modifications.
In particular README.md and docs/src/index.md tend to be heavily edited.
\$ git switch -c apply-bestie # If you haven't created a branch
\$ git add .
\$ pre-commit run -a # Try to fix possible pre-commit issues (failures are expected)
\$ pre-commit run -a # Again. Now failures should not happen
\$ gid add .
\$ git commit -m "Apply BestieTemplate $bestie_version"
\$ pre-commit install
\$ git push -u origin apply-bestie
Go to GitHub and create a Pull Request from apply-bestie to main.
Continue on the full guide: https://abelsiqueira.com/BestieTemplate.jl/stable/10-full-guide
""")
\$ git switch -c apply-bestie # If you haven't created a branch
\$ git add .
\$ pre-commit run -a # Try to fix possible pre-commit issues (failures are expected)
\$ pre-commit run -a # Again. Now failures should not happen
\$ gid add .
\$ git commit -m "Apply BestieTemplate $bestie_version"
\$ pre-commit install
\$ git push -u origin apply-bestie
Go to GitHub and create a Pull Request from apply-bestie to main.
Continue on the full guide: https://abelsiqueira.com/BestieTemplate.jl/stable/10-full-guide
""")

return nothing
end
Expand Down
15 changes: 0 additions & 15 deletions template/.JuliaFormatter.toml.jinja
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
align_assignment = true
align_matrix = true
align_pair_arrow = true
align_struct_field = true
always_for_in = true
annotate_untyped_fields_with_any = false
conditional_to_if = true
for_in_replacement = "in"
format_docstrings = false
format_markdown = false
import_to_using = true
indent = {{ Indentation }}
margin = 100
normalize_line_endings = "unix"
remove_extra_newlines = true
separate_kwargs_with_semicolon = true
whitespace_ops_in_indices = true
whitespace_typedefs = true

0 comments on commit 52e33f7

Please sign in to comment.