Prettier Basic
raw JSON → 1.0.0 verified Sat Apr 25 auth: no javascript
A shared Prettier configuration package providing a basic set of formatting rules based on Airbnb's standard with personal modifications. Current stable version: 1.0.0. This configuration is intended for projects using Prettier 2.x. It serves as a simple alternative to more comprehensive shared configs like @ivandotv/prettier-config or eslint-config-prettier, but offers limited customization and no built-in integration with ESLint. The package is released as-is with no active release cadence.
Common errors
error Error: Cannot find module 'prettier-basic' ↓
cause The package is not installed or not in node_modules.
fix
Run
npm install --save-dev prettier-basic or ensure it's in package.json devDependencies. error Error: Invalid configuration file: "prettier-basic" is not a valid option ↓
cause Using the string in .prettierrc file without proper JSON syntax.
fix
In .prettierrc, the content should be exactly
"prettier-basic" (with quotes) or in package.json under "prettier" key. Warnings
gotcha The configuration is based on the author's personal preferences and may not align with team standards. ↓
fix Review the actual rules by looking at source code or use --check before applying.
gotcha No active maintenance or updates; the package may become incompatible with newer Prettier versions. ↓
fix Consider using a more actively maintained shared config like @ivandotv/prettier-config.
Install
npm install prettier-basic yarn add prettier-basic pnpm add prettier-basic Imports
- prettier-basic wrong
// Incorrect: using require in .prettierrc (must be JSON string or module export) require("prettier-basic")correct// In .prettierrc: "prettier-basic" - spread config wrong
// Wrong: using import instead of require in CJS context import { ... } from 'prettier-basic'correct// In .prettierrc.js: module.exports = { ...require("prettier-basic"), semi: false, }; - prettier-basic (TypeScript) wrong
// Wrong: attempting to use ts extension without proper setup import prettierConfig from 'prettier-basic'correct// In .prettierrc.js with TypeScript: module.exports = { ...require("prettier-basic"), semi: false, as const };
Quickstart
npm install --save-dev prettier prettier-basic
echo '{
"prettier": "prettier-basic"
}' > package.json
# Or create .prettierrc with content: prettier-basic
# Then format files:
npx prettier --write "**/*.{js,jsx,ts,tsx,css,scss,md}"