eslint-plugin-alex
v1.0.0
Published
ESLint plugin that integrates alex to surface potentially insensitive wording found in markdown files, comments and strings.
Maintainers
Readme
eslint-plugin-alex
ESLint plugin that integrates alex to surface potentially insensitive wording found in markdown files, comments and strings.
📦 Install
bun install -D eslint-plugin-alex alex[!note] Supports
eslintv8.56+ or v9+.
🧪 Usage
Flat config (eslint.config.*)
import eslintPluginAlex from 'eslint-plugin-alex';
export default [...eslintPluginAlex.flatConfigs.recommended];Legacy config (.eslintrc) ⚠️
{
"plugins": ["alex"],
"rules": {
"alex/no-problematic-language": "warn"
}
}To reuse preset:
{
"extends": ["plugin:alex/recommended"]
}🔧 Configuration
alex/no-problematic-language
comments(boolean, default:true) - check comments.strings(boolean, default:true) - check string literals.templates(boolean, default:true) - check template literals.ignore(string[], default:[]) - a list of globs to ignore, you can reuse paths from.alexignore.alexOptions(object: Options) - options forwarded to alex, default alex options are respected.
Example rule configuration (not default)
{
"alex/no-problematic-language": [
"warn",
{
"comments": false,
"ignore": [
"LICENSE.md"
],
"alexOptions": {
"profanitySureness": 1
}
}
]
}📝 Contributing
Make sure you have Bun installed.
Checkout the repository locally.
Run the following commands to install dependencies and compile source:
bun install bun run buildBefore commiting make sure that test are passing, and code is correctly formatted:
bun run lint bun run test
