{"id":20279,"library":"prettier-airbnb-config","title":"Prettier Airbnb Config","description":"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.","status":"maintenance","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/Parker-Ledoux/prettier-airbnb-config","tags":["javascript","prettier","airbnb","config"],"install":[{"cmd":"npm install prettier-airbnb-config","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-airbnb-config","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-airbnb-config","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to apply the configuration","package":"prettier","optional":false}],"imports":[{"note":"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.","wrong":"require('prettier-airbnb-config') directly in code","symbol":"prettier-airbnb-config","correct":"In package.json: \"prettier\": \"prettier-airbnb-config\""},{"note":"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.","wrong":"import prettierAirbnbConfig from 'prettier-airbnb-config';","symbol":"Default config export","correct":"module.exports = { ...require('prettier-airbnb-config'), printWidth: 120 };"},{"note":"In JSON config files, use a string literal, not an array. Prettier expects a single string for config packages.","wrong":"[\"prettier-airbnb-config\"]","symbol":"Config file string","correct":"\"prettier-airbnb-config\" in .prettierrc.json"}],"quickstart":{"code":"// Install\nnpm install prettier prettier-airbnb-config --save-dev\n\n// In package.json:\n{\n  \"name\": \"my-project\",\n  \"version\": \"1.0.0\",\n  \"prettier\": \"prettier-airbnb-config\"\n}\n\n// Or create .prettierrc.js:\nmodule.exports = {\n  ...require('prettier-airbnb-config'),\n  printWidth: 120\n};","lang":"javascript","description":"Install and configure Prettier to use the Airbnb-based config via package.json or .prettierrc.js with optional overrides."},"warnings":[{"fix":"Upgrade to a maintained Prettier config or manually update your Prettier config to remove deprecated options.","message":"The package is based on Prettier 1.x. Using with Prettier 2.x or higher may cause unexpected behavior or deprecation warnings.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"If using Prettier 2+, set arrowParens to 'always' or consider using a different config.","message":"The '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.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Replace 'jsxBracketSameLine' with 'bracketSameLine' in your config.","message":"The 'jsxBracketSameLine' option is deprecated in Prettier 2.0+ in favor of 'bracketSameLine'.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Ensure your ESLint rule for object-curly-spacing matches Prettier's setting to avoid inconsistencies.","message":"This config sets 'bracketSpacing' to false, which may conflict with other tools like ESLint's object-curly-spacing rule.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a community-maintained alternative like @trivago/prettier-plugin-sort-imports or adjust settings manually.","message":"The package is no longer maintained. It does not reflect the latest Airbnb style guide updates (e.g., Airbnb now recommends arrowParens: 'always').","severity":"breaking","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install prettier-airbnb-config --save-dev","cause":"The package is not installed or not in node_modules.","error":"Cannot find module 'prettier-airbnb-config'"},{"fix":"Change to: const config = require('prettier-airbnb-config');","cause":"Using import statement instead of require() in .prettierrc.js.","error":"Cannot read property 'ars' of undefined"},{"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');","cause":"Using the package name as a key in .prettierrc.json incorrectly.","error":"Invalid configuration file: \"prettierAirbnbConfig\" is not allowed"},{"fix":"Set arrowParens to 'always' or upgrade to a newer Prettier config.","cause":"Prettier 1.x with arrowParens: 'avoid' may cause syntax errors in some cases.","error":"Parsing error: Unexpected token =>"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}