eslint-plugin-woke
raw JSON → 1.0.1 verified Sat Apr 25 auth: no javascript maintenance
ESLint plugin to promote diversity and inclusion in codebases by flagging offensive or insensitive terms. Version 1.0.1, released as a single stable version. It provides out-of-the-box rules for racism, profanity, gender bias, and LGBTQ+ issues, with an optional 'all' rule. Unlike other linting plugins, it focuses specifically on language inclusivity. The plugin has not been updated since 2020 and has low maintenance activity.
Common errors
error Error: Failed to load plugin 'woke' declared in '.eslintrc': Cannot find module 'eslint-plugin-woke' ↓
cause eslint-plugin-woke not installed or installed globally while ESLint is local (or vice versa).
fix
Ensure eslint-plugin-woke is installed in the same scope as ESLint:
npm install eslint-plugin-woke --save-dev (or -g for global). error Error: Configuration for rule "woke/all" is invalid: Severity should be one of: 0, 1, 2. ↓
cause Using a string like 'error' instead of numeric severity.
fix
Use numeric severity: 0 = off, 1 = warning, 2 = error.
error Error: Cannot read property 'rules' of undefined ↓
cause Trying to use the plugin as a Node module programmatically (require) without proper setup.
fix
Use the plugin only in ESLint configuration files; do not require() it in scripts.
Warnings
gotcha The plugin has not been updated since 2020; codebase may not reflect current inclusive language best practices. ↓
fix Consider using a more actively maintained alternative like eslint-plugin-inclusive-language.
breaking Only works with ESLint 3.x through 8.x; not compatible with ESLint 9.x flat config. ↓
fix Ensure you are using ESLint 8 or lower, or migrate to a modern plugin.
deprecated The 'all' rule is a meta-rule that enables all sub-rules; future updates may deprecate this pattern. ↓
fix Use individual rules for finer control.
gotcha Plugin install must match ESLint's install scope (global vs local). ↓
fix Install both ESLint and eslint-plugin-woke globally together, or locally together.
Install
npm install eslint-plugin-woke yarn add eslint-plugin-woke pnpm add eslint-plugin-woke Imports
- default import wrong
const woke = require('eslint-plugin-woke')correctmodule.exports = { plugins: ['woke'] } - rule reference wrong
"woke-all": 2correct"woke/all": 2 - individual rule wrong
"racism": 2correct"woke/racism": 2
Quickstart
// .eslintrc.json
{
"plugins": ["woke"],
"rules": {
"woke/all": 2
}
}
// With npm scripts:
// npm install eslint eslint-plugin-woke --save-dev
// npx eslint .