eslint-config-weseek
raw JSON → 2.1.1 verified Sat Apr 25 auth: no javascript
Shareable ESLint configurations by WESEEK, Inc., based on eslint-config-airbnb. Current stable version is 2.1.1, with irregular releases. It provides multiple entry points for JavaScript (weseek), React (weseek/react), TypeScript (weseek/typescript), and Next.js (weseek/typescript-next). Key differentiators: opinionated rulesets combining Airbnb's base with additional plugins for React, TypeScript, and Vue; requires manual installation of peer dependencies; uses @babel/eslint-parser since v2.0.0.
Common errors
error Error: Cannot find module '@babel/core' ↓
cause Missing required peer dependency @babel/core.
fix
Run: npm install --save-dev @babel/core
error Error: Failed to load config 'weseek/react' to extend from. ↓
cause weseek/react used without the base 'weseek' config in extends.
fix
Set extends: ['weseek', 'weseek/react'].
error TypeError: eslint-plugin-vue is not a plugin ↓
cause eslint-plugin-vue not installed but config tries to load it.
fix
Install eslint-plugin-vue or remove Vue-related config.
Warnings
breaking v2.0.0 replaced babel-eslint with @babel/eslint-parser. Existing configs using babel-eslint will break. ↓
fix Update peer dep from babel-eslint to @babel/eslint-parser and @babel/core.
gotcha Peer dependencies are not automatically installed. Missing @babel/core or @babel/eslint-parser will cause ESLint errors. ↓
fix Manually install all required peer dependencies listed in the README for your chosen entry point.
gotcha weseek/react and weseek/typescript are not standalone; they must be used alongside the weseek base config. ↓
fix Always include 'weseek' in the extends array before any sub-config.
deprecated The package includes eslint-plugin-vue in peer deps but it's not documented in entry points. Usage may be unclear. ↓
fix If using Vue, manually extend 'plugin:vue/recommended' or similar; this package may not provide a Vue config out of the box.
Install
npm install eslint-config-weseek yarn add eslint-config-weseek pnpm add eslint-config-weseek Imports
- weseek wrong
extends: [require('eslint-config-weseek')]correctmodule.exports = { extends: ['weseek'] } - weseek/react wrong
extends: ['weseek/react'] (missing weseek base)correctmodule.exports = { extends: ['weseek', 'weseek/react'] } - weseek/typescript wrong
extends: ['weseek/typescript'] (missing weseek base)correctmodule.exports = { extends: ['weseek', 'weseek/typescript'] }
Quickstart
npm install --save-dev eslint-config-weseek @babel/core @babel/eslint-parser eslint-plugin-import
# For React:npm install --save-dev eslint-config-weseek @babel/core @babel/eslint-parser eslint-plugin-import eslint-plugin-react eslint-plugin-react-hooks
# For TypeScript:npm install --save-dev eslint-config-weseek eslint-plugin-import eslint-import-resolver-typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser
# .eslintrc.js
module.exports = {
extends: [
'weseek',
// 'weseek/react', // uncomment for React
// 'weseek/typescript', // uncomment for TypeScript
// 'weseek/typescript-next', // uncomment for Next.js (includes React and TypeScript)
],
rules: {},
};