Skip to content

A repository setup for Prettier in React TypeScript projects, aimed at fostering code consistency and maintaining clean formatting.

Notifications You must be signed in to change notification settings

sanju1098/typescript-prettier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Prettier

cmd - yarn add --dev --exact prettier.

  • arrayBracketSpacing: Specify whether spaces should be added inside brackets for arrays.
  • arrowParens: Prefer omitting parentheses when possible in arrow functions.
  • bracketSameLine: Place opening brackets of blocks on the same line.
  • bracketSpacing: Disable spacing inside object literals.
  • endOfLine: Automatically select the line endings based on the environment.
  • objectCurlySpacing: Specify whether spaces should be added inside brackets for objects.
  • printWidth: Set the line width for formatting code to 80 characters.
  • semi: Enforce semicolons at the end of statements.
  • singleQuote: Avoid using single quotes for strings.
  • spaceBeforeFunctionParen: Controls whether there should be a space before function parentheses.
  • spaceUnaryOps: Controls whether to add spaces around unary operators like -, +, and !.
  • tabWidth: Set the number of spaces for each indentation level to 2.
  • trailingComma: Add trailing commas wherever valid in arrays, objects, etc.
  • useTabs: Use spaces instead of tabs for indentation.
  • ignorePatterns: Exclude specific files or patterns (like .eslintrc) from formatting.

About

A repository setup for Prettier in React TypeScript projects, aimed at fostering code consistency and maintaining clean formatting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published