Registry / testing / eslint-config-wesbos

eslint-config-wesbos

JSON →
library4.3.2jsnpmunverified

Wes Bos's personal ESLint & Prettier config, version 4.3.2. Updated infrequently; based on eslint-config-airbnb and includes TypeScript support. Lightweight alternative to other configs like `eslint-config-airbnb` or `standard`. Options for JS and TypeScript (via `wesbos/typescript`). Requires peer dependencies ESLint ^8, Prettier ^3, TypeScript ^4.8.4 or ^5. Requires manual `tsconfig.json` for TypeScript. Uses Prettier for formatting with opinionated defaults (singleQuote, endOfLine).

npm install eslint-config-wesbos
INSTALL
IMPORT
SIG · ESLINT-CONFIG-WESB
E
eslint-config-wesbos
testingjavascriptv4.3.2
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.

Config for JavaScript
{ "extends": ["wesbos"] }
Use 'wesbos/js' or just 'wesbos'.
In .eslintrc or eslintConfig in package.json
Config for TypeScript
{ "extends": ["wesbos/typescript"] }
{ "extends": ["wesbos"] } // TypeScript files not linted properly
Requires tsconfig.json in project root
Override rules
{ "extends": ["wesbos"], "rules": { "no-console": 2, "prettier/prettier": ["error", { "singleQuote": false }] } }
Placing Prettier rules outside 'prettier/prettier' rule
Custom Prettier options can be set in .prettierrc or via prettier/prettier rule

Sets up a new project with Wes Bos's ESLint config for JavaScript projects.

npm init -y && npm install eslint-config-wesbos # .eslintrc.json { "extends": ["wesbos"] } # package.json scripts "lint": "eslint .", "lint:fix": "eslint . --fix"
Debug
Known issues
gotchaTypeScript config requires a tsconfig.json file in root. If missing, TypeScript linting will fail.
fix
Create an empty tsconfig.json or point to existing one.
affects: >=4.0.0
gotchaUsing eslint-config-wesbos with ESLint v9 may cause incompatibilities. The config uses the .eslintrc format which is not supported in flat config.
fix
Stick with ESLint v8 or switch to flat config and a different config package.
affects: >=4.0.0
gotchaOnly two Prettier options are set by default: singleQuote: true, endOfLine: 'auto'. Changes to these may cause conflicts.
fix
Override both in .prettierrc or via prettier/prettier rule.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Failed to load config "wesbos" to extend from.
Missing peer dependency or incorrect extension name.
fix
Run `npm install eslint-config-wesbos` and ensure peer deps are installed. Use 'wesbos' not 'wesbos/javascript'.
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
TypeScript config used without a tsconfig.json.
fix
Create a tsconfig.json in your project root.
Cannot find module 'prettier'.eslint
Prettier not installed as a peer dependency.
fix
npm install prettier@^3.0.0 --save-dev
Upgrade
Version history
4.3.2latest on npm
Audit
Dependencies
eslintrequiredPeer dependency for linting
prettierrequiredPeer dependency for code formatting
typescriptoptionalRequired for TypeScript config (`wesbos/typescript`)
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-wesbos — npm install eslint-config-wesbos · libregistry