3.1.0 • Published 8 months ago

@salutejs/prettier-config v3.1.0

Weekly downloads
-
License
-
Repository
github
Last release
8 months ago

@salutejs/prettier-config

Shared Prettier configuration.

Installation

npm install --save-dev @salutejs/prettier-config prettier@^3.4.0
# or
yarn add --dev @salutejs/prettier-config prettier@^3.4.0
# or
pnpm add --save-dev @salutejs/prettier-config prettier@^3.4.0
# or
bun add --dev @salutejs/prettier-config prettier@^3.4.0

Usage

Add to your package.json:

{
  "prettier": "@salutejs/prettier-config"
}

Or create .prettierrc.js:

export default "@salutejs/prettier-config";

For CommonJS:

module.exports = require("@salutejs/prettier-config");

Configuration

The configuration includes the following settings:

{
  arrowParens: "always",      // Always include parentheses around arrow function parameters
  printWidth: 120,            // Line length where Prettier will try to wrap
  bracketSameLine: false,     // Put the > of a multi-line JSX element at the end of the last line
  jsxSingleQuote: false,      // Use double quotes in JSX
  endOfLine: "auto",          // Maintain existing line endings
  semi: true,                 // Add semicolons at the end of statements
  singleQuote: true,          // Use single quotes instead of double quotes
  tabWidth: 4,               // Specify the number of spaces per indentation level
  trailingComma: "all",      // Add trailing commas wherever possible
}

License

MIT

3.1.0

8 months ago

3.0.0

9 months ago

0.4.0

2 years ago

0.3.0

3 years ago