Registry / testing / prettier-airbnb-config

prettier-airbnb-config

JSON →
library1.0.0jsnpmunverified

A Prettier configuration package that translates the Airbnb JavaScript style guide into Prettier options. Version 1.0.0 is the only release; no updates or new releases since its initial publication. It provides a ready-to-use set of Prettier rules covering quotes, trailing commas, semicolons, bracket spacing, arrow parentheses, and JSX settings, aligning with common Airbnb style conventions. Unlike other configs that may be more opinionated or regularly updated, this package is a simple snapshot of Airbnb's style from that time and does not keep pace with Prettier or Airbnb guideline changes. It requires Prettier 1.18.2 as a peer dependency.

npm install prettier-airbnb-config
INSTALL
IMPORT
SIG · PRETTIER-AIRBNB-CO
P
prettier-airbnb-config
testingjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

prettier-airbnb-config
In package.json: "prettier": "prettier-airbnb-config"
require('prettier-airbnb-config') directly in code
This is a Prettier config package, not a module to import in source files. Use by setting the 'prettier' key in package.json or in .prettierrc files.
Default config export
module.exports = { ...require('prettier-airbnb-config'), printWidth: 120 };
import prettierAirbnbConfig from 'prettier-airbnb-config';
The package exports a CommonJS object. Use require() to spread it in your .prettierrc.js file. ESM import is not supported and will cause an error.
Config file string
"prettier-airbnb-config" in .prettierrc.json
["prettier-airbnb-config"]
In JSON config files, use a string literal, not an array. Prettier expects a single string for config packages.

Install and configure Prettier to use the Airbnb-based config via package.json or .prettierrc.js with optional overrides.

// Install npm install prettier prettier-airbnb-config --save-dev // In package.json: { "name": "my-project", "version": "1.0.0", "prettier": "prettier-airbnb-config" } // Or create .prettierrc.js: module.exports = { ...require('prettier-airbnb-config'), printWidth: 120 };
Debug
Known issues
breakingThe package is based on Prettier 1.x. Using with Prettier 2.x or higher may cause unexpected behavior or deprecation warnings.
fix
Upgrade to a maintained Prettier config or manually update your Prettier config to remove deprecated options.
affects: >=2.0.0
gotchaThe 'arrowParens' is set to 'avoid', which was deprecated in Prettier 2.0. In Prettier 2+, the default was changed to 'always', and 'avoid' may be removed in a future version.
fix
If using Prettier 2+, set arrowParens to 'always' or consider using a different config.
affects: >=2.0.0
deprecatedThe 'jsxBracketSameLine' option is deprecated in Prettier 2.0+ in favor of 'bracketSameLine'.
fix
Replace 'jsxBracketSameLine' with 'bracketSameLine' in your config.
affects: >=2.0.0
gotchaThis config sets 'bracketSpacing' to false, which may conflict with other tools like ESLint's object-curly-spacing rule.
fix
Ensure your ESLint rule for object-curly-spacing matches Prettier's setting to avoid inconsistencies.
affects: all
breakingThe package is no longer maintained. It does not reflect the latest Airbnb style guide updates (e.g., Airbnb now recommends arrowParens: 'always').
fix
Use a community-maintained alternative like @trivago/prettier-plugin-sort-imports or adjust settings manually.
affects: all
Errors
Common errors & fixes
Cannot find module 'prettier-airbnb-config'
The package is not installed or not in node_modules.
fix
Run: npm install prettier-airbnb-config --save-dev
Cannot read property 'ars' of undefined
Using import statement instead of require() in .prettierrc.js.
fix
Change to: const config = require('prettier-airbnb-config');
Invalid configuration file: "prettierAirbnbConfig" is not allowed
Using the package name as a key in .prettierrc.json incorrectly.
fix
Set the 'prettier' key in package.json to the string "prettier-airbnb-config" or use a .prettierrc.js with module.exports = require('prettier-airbnb-config');
Parsing error: Unexpected token =>
Prettier 1.x with arrowParens: 'avoid' may cause syntax errors in some cases.
fix
Set arrowParens to 'always' or upgrade to a newer Prettier config.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
prettierrequiredpeer dependency required to apply the configuration
Agent activity
6 hits · last 30 days
node
6
Resources
prettier-airbnb-config — npm install prettier-airbnb-config · libregistry