Skip to content

Prettier configuration used by Elgato projects.

License

Notifications You must be signed in to change notification settings

elgatosf/prettier-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 24, 2025
2f1ccd0 · Feb 24, 2025

History

37 Commits
Apr 29, 2024
Aug 28, 2024
Aug 28, 2024
Mar 3, 2024
Oct 17, 2024
Feb 24, 2025
Mar 3, 2024
Oct 17, 2024
Feb 24, 2025
Feb 24, 2025

Repository files navigation

@elgato/prettier-config

Prettier configuration used by Elgato projects.

@elgato/prettier-config npm package Join the Marketplace Makers Discord Elgato homepage

Usage

  1. Install @elgato/prettier-config.
npm install @elgato/prettier-config --save-dev
  1. Edit your package.json to reference the configuration.
"prettier": "@elgato/prettier-config"

Configuration

Prettier

Option Value
endOfLine lf
printWidth 120
singleQuote ❌ Prefer double
semi ✅ Prefer semicolons
tabWidth 4 (2 for .yaml, .yml)
useTabs ✅ Except .json, .jsonc, .md, .yaml, .yml
trailingComma All, except .jsonc

Multiline arrays

Option Value
multilineArraysWrapThreshold -1 (manual)

Sort imports

Option Value
importOrder Third-party modules first.
importOrderSeparation
importOrderSortSpecifiers
importOrderCaseInsensitive
importOrderParserPlugins TypeScript, decoratorAutoAccessors, explicitResourceManagement

Overrides

Overriding configuration can be achieved by removing the prettier entry from package.json, in favour of a .prettierrc.js file. For example, to prefer spaces over tabs:

module.exports = {
    ...require("@elgato/prettier-config"),
    tabWidth: 2,
    useTabs: false,
};

Recognitions

This project wishes to express thanks to those who work on Prettier, and Prettier plugins, with particular thanks to: