eslint-config-wantedly

raw JSON →
4.0.0 verified Sat Apr 25 auth: no javascript

ESLint configuration for Wantedly, version 4.0.0. This package provides a shareable ESLint config focused on JavaScript linting, including React, import, JSX accessibility, and Jest plugins. It uses @babel/eslint-parser as the parser. The major breaking change in v4.0.0 is the switch from legacy config (extends) to ESLint's flat config format, requiring ESLint v9. For ESLint v8 and under, use version 3.x. Configs are exported as flat config arrays.

error Error: Failed to load config 'wantedly' to extend from.
cause Using legacy extends in ESLint v8 with eslint-config-wantedly v4, which uses flat config.
fix
Use the flat config export instead, or downgrade to v3.x.
error Error: Cannot find module '@babel/eslint-parser'
cause Missing peer dependency @babel/eslint-parser.
fix
npm install --save-dev @babel/core @babel/eslint-parser
error Error: Failed to load plugin 'react' declared in 'eslint-config-wantedly'
cause Missing peer dependency eslint-plugin-react.
fix
npm install --save-dev eslint-plugin-react
breaking Flat config format: eslint-config-wantedly v4.0.0+ uses ESLint flat config; legacy .eslintrc configs are not supported.
fix Upgrade to ESLint v9 and use flat config syntax as shown in the quickstart.
breaking ESLint v9 requirement: v4.0.0 requires ESLint v9; previous versions require ESLint v8.
fix Update ESLint to v9 or pin eslint-config-wantedly to v3.x.
deprecated Legacy config format (extends) is deprecated as of v4.0.0.
fix Migrate to flat config format. See quickstart.
gotcha Parser not found: @babel/eslint-parser must be installed as a peer dependency.
fix Install @babel/core and @babel/eslint-parser.
gotcha Missing plugins: eslint-plugin-react, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-jest must be installed.
fix Install all peer dependencies listed in the quickstart.
npm install eslint-config-wantedly
yarn add eslint-config-wantedly
pnpm add eslint-config-wantedly

Set up ESLint with eslint-config-wantedly flat config (v4.x) and a custom rule.

// Install the package and required peer dependencies
// npm install --save-dev eslint eslint-config-wantedly @babel/core @babel/eslint-parser eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-jest

// eslint.config.js (flat config, v4.x)
import { base as configWantedly } from 'eslint-config-wantedly';

export default [
  ...configWantedly,
  {
    rules: {
      'no-console': 'warn',
    },
  },
];

// Run ESLint
// npx eslint .