eslint-plugin-wantedly
raw JSON → 4.0.1 verified Sat Apr 25 auth: no javascript
Opinionated ESLint plugin enforcing Wantedly-style GraphQL and Nexus naming conventions. Current stable version 4.0.1 (2024) requires ESLint 9+. Provides rules for GraphQL operation names (camelCase), type names (PascalCase), field names (camelCase), enum members (UPPER_CASE), and type descriptions in gql tags and Nexus code. Flat config support only from v4. Drops legacy ESLint config. Peer dependencies: eslint ^9.0.0, graphql ^14.6.0 || ^15.0.0.
Common errors
error Error: Cannot find module 'eslint-plugin-wantedly' ↓
cause Missing package installation.
fix
npm install eslint-plugin-wantedly --save-dev
error ESLint couldn't find the plugin 'eslint-plugin-wantedly'. ↓
cause Plugin not configured in eslint.config.js.
fix
Add 'plugins: { wantedly: pluginWantedly }' to config.
Warnings
breaking v4 drops legacy eslintrc config (eslint <9). Only flat config supported. ↓
fix Migrate to eslint.config.js flat config format.
breaking v4 requires ESLint ^9.0.0 and graphql peer dependency. ↓
fix Update ESLint to v9 and ensure graphql is installed.
Install
npm install eslint-plugin-wantedly yarn add eslint-plugin-wantedly pnpm add eslint-plugin-wantedly Imports
- default wrong
const pluginWantedly = require('eslint-plugin-wantedly')correctimport pluginWantedly from 'eslint-plugin-wantedly'
Quickstart
import pluginWantedly from 'eslint-plugin-wantedly';
export default [
{
plugins: {
wantedly: pluginWantedly,
},
rules: {
'wantedly/graphql-operation-name': ['error', { type: 'camelCase' }],
},
},
];