eslint-config-vocovo
raw JSON → 2.0.0 verified Fri May 01 auth: no javascript
eslint-config-vocovo is a shareable ESLint configuration package for VoCoVo JavaScript projects, integrating Prettier for code formatting. Version 2.0.0 requires ESLint ^8.23.0 and Prettier ^2.7.1 as peer dependencies. It provides a single 'vocovo' extends preset and a shared .prettierrc file. Unlike many configs, it enforces Prettier both through ESLint and as a standalone formatter for non-JS files. The package is maintained internally by VoCoVo, with releases following a manual process via GitHub and npm.
Common errors
error Cannot find module 'eslint-config-vocovo' ↓
cause The package is not installed or is missing from node_modules.
fix
Run npm install --save-dev eslint-config-vocovo to install it.
error ESLint couldn't find the config 'vocovo' ↓
cause The extends value is wrong or the package is not installed.
fix
Ensure eslint-config-vocovo is installed and use 'extends': ['vocovo'] in .eslintrc.
error Parsing error: The keyword 'const' is reserved ↓
cause ESLint is not configured for modern JavaScript (ECMAScript 2015+).
fix
The vocovo config should handle this; ensure you are using the correct version and that ESLint is up to date (^8.23.0).
Warnings
breaking Version 2.0.0 may include new or stricter ESLint rules compared to 1.x; existing projects may see new lint errors. ↓
fix Run eslint --fix to auto-fix where possible, or temporarily override rules in your .eslintrc.
gotcha The config expects Prettier to be run both via ESLint and standalone; disabling formatOnSave for JS is required to avoid double-formatting. ↓
fix Configure VSCode as shown: set editor.formatOnSave: true but disable for [javascript] and [javascriptreact].
gotcha The package name in npm is eslint-config-vocovo, but the extends value is just 'vocovo'. Using the full name will not work. ↓
fix Use 'extends': ['vocovo'] in .eslintrc, not 'eslint-config-vocovo'.
Install
npm install eslint-config-vocovo yarn add eslint-config-vocovo pnpm add eslint-config-vocovo Imports
- vocovo wrong
Using require('eslint-config-vocovo') without extendscorrectmodule.exports = { extends: ['vocovo'] } - prettierrc wrong
Using require('eslint-config-vocovo/prettierrc') directlycorrect"prettier": "eslint-config-vocovo/prettierrc" - setup wrong
Omitting eslint and prettier peer depscorrectnpm install --save-dev eslint prettier eslint-config-vocovo
Quickstart
// Install peer deps and config
npm install --save-dev eslint@^8.23.0 prettier@^2.7.1 eslint-config-vocovo@^2.0.0
// Create .eslintrc.json
{
"extends": ["vocovo"]
}
// Optionally, add to package.json for shared prettier config
"prettier": "eslint-config-vocovo/prettierrc"
// Run lint
npx eslint yourfile.js