Skip to content

Instantly share code, notes, and snippets.

@pablobrodt
Created January 12, 2024 04:05
Show Gist options
  • Save pablobrodt/d30baa95ae1a67db9b4459ebe4f87ff1 to your computer and use it in GitHub Desktop.
Save pablobrodt/d30baa95ae1a67db9b4459ebe4f87ff1 to your computer and use it in GitHub Desktop.
Prettier and editorconfig setups

Editorconfig

# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

curly_bracket_next_line = true
spaces_around_operators = true
spaces_around_brackets = 'inside'
indent_brace_style = 'K&R'

[*.md]
trim_trailing_whitespace = false
insert_final_newline = false

Prettier

module.exports = {
  editorconfig: true,
  arrowParens: "avoid",
  bracketSameLine: true,
  trailingComma: "all",
  singleQuote: true,
  singleAttributePerLine: true,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment