Skip to content

Commit

Permalink
Downgrade Prettier to stable release and use editor config (#517)
Browse files Browse the repository at this point in the history
JavaScript files have been reformatted to line width of 88 chars.
  • Loading branch information
jace authored Jul 8, 2024
1 parent 2388e73 commit 909af14
Show file tree
Hide file tree
Showing 28 changed files with 608 additions and 1,802 deletions.
31 changes: 7 additions & 24 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,24 @@ root = True

# For all files
[*]
end_of_line = lf
insert_final_newline = true

# For all code, config and documentation
[*.{js,py,jinja2,j2,html,css,sass,scss,json,yml,md,rst}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 88
tab_width = 8
trim_trailing_whitespace = true

# Python code
[*.py]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

# JavaScript and HTML/CSS
[*.{js,jinja2,j2,html,css,sass,scss}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

# Makefile
[Makefile]
indent_style = tab
indent_size = tab
trim_trailing_whitespace = true

# Config
[*.{json,yml,toml}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

# Documentation
[*.{md,rst,md.jinja2}]
indent_style = space
indent_size = 4
# Markdown
[*.{md,md.jinja2}]
trim_trailing_whitespace = false
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ repos:
args: ['-c', 'pyproject.toml']
additional_dependencies:
- 'bandit[toml]'
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
- repo: https://github.com/pycontribs/mirrors-prettier
rev: v3.3.1
hooks:
- id: prettier
args: ['--single-quote', '--trailing-comma', 'es5']
exclude: funnel/templates/js/
4 changes: 0 additions & 4 deletions .prettierrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
Loading

0 comments on commit 909af14

Please sign in to comment.