frontend-tools-prettier-config

raw JSON →
1.0.0 verified Sat Apr 25 auth: no javascript

A shareable Prettier configuration specifically tailored for Angular projects. Version 1.0.0 is the current stable release, with no known major updates or release cadence documented. It provides a standardized code formatting setup for Angular codebases, differentiating itself from generic Prettier configs by applying Angular-specific conventions. It requires Prettier ^2.1.1 as a peer dependency. The package is published on npm but has no recent updates.

error Cannot find module 'frontend-tools-prettier-config'
cause Package not installed or incorrect import path.
fix
npm install --save-dev frontend-tools-prettier-config
error Error: Invalid configuration file: .prettierrc.js: Unexpected token 'export'
cause Using ES module syntax in a CommonJS context.
fix
Use module.exports = require('frontend-tools-prettier-config'); instead of import.
error Error: Couldn't resolve parser 'typescript'. Prettier may have been installed without its dependencies.
cause Prettier 2.x requires separate parser packages for TypeScript.
fix
npm install --save-dev prettier@^2.1.1 (ensure peer dep is met)
gotcha The package requires Prettier ^2.1.1. Using a different major version (e.g., Prettier 3.x) may cause incompatibilities.
fix Ensure Prettier version is 2.1.1 or within the 2.x range.
gotcha This config overwrites any existing Prettier options. Use spread operator to merge with custom settings.
fix module.exports = { ...require('frontend-tools-prettier-config'), semi: false };
deprecated The package has no recent updates and may not follow Angular's latest style guide. Consider using @angular-eslint/schematics or official Prettier config for Angular.
fix Migrate to @angular-eslint/schematics or @dci-software-solutions/frontend-tools-prettier-config? (if updated)
npm install frontend-tools-prettier-config
yarn add frontend-tools-prettier-config
pnpm add frontend-tools-prettier-config

Install peer dependency, create a .prettierrc.js that extends the shareable config, and run Prettier to format Angular project files.

// Install peer dependency
npm install --save-dev prettier@^2.1.1 frontend-tools-prettier-config

// Create .prettierrc.js
module.exports = {
  ...require('frontend-tools-prettier-config')
};

// Or use in package.json
// "prettier": "frontend-tools-prettier-config"

// Format all files
npx prettier --write "src/**/*.{ts,html,css,scss,json}"