@@ -16,6 +16,7 @@ import * as eslintPluginMdx from 'eslint-plugin-mdx';
1616import eslintPluginPrettier from 'eslint-plugin-prettier/recommended' ;
1717import eslintPluginYml from 'eslint-plugin-yml' ;
1818import eslintTs from 'typescript-eslint' ;
19+ import eslintPluginAlex from 'eslint-plugin-alex' ;
1920
2021export default defineConfig ( [
2122 globalIgnores ( [
@@ -104,9 +105,43 @@ export default defineConfig([
104105 remarkConfigPath : 'website/.remarkrc.mjs' ,
105106 } ) ,
106107 plugins : {
108+ alex : eslintPluginAlex ,
107109 'case-police' : eslintPluginCasePolice ,
108110 } ,
109111 rules : {
112+ 'alex/no-problematic-language' : [
113+ 'warn' ,
114+ {
115+ ignore : [
116+ `CODE_OF_CONDUCT.md` ,
117+ // skip older blog posts
118+ `website/blog/201*` ,
119+ ] ,
120+ alexOptions : {
121+ // use a "maybe" level of profanity instead of the default "unlikely"
122+ profanitySureness : 1 ,
123+ allow : [
124+ // we frequently refer to form props by their name "disabled"
125+ 'invalid' ,
126+ // unfortunately "watchman" is a library name that we depend on
127+ 'watchman-watchwoman' ,
128+ // ignore rehab rule, Detox is an e2e testing library
129+ 'rehab' ,
130+ // host refers to host objects in native code
131+ 'host-hostess' ,
132+ // allowing this term to prevent reporting "primitive", which is a programming term
133+ 'savage' ,
134+ // allowing this term, since it seems to be used not in insensitive cases
135+ 'straightforward' ,
136+ // allowing those terms, since they refer to colors and the surname of one of core contributors
137+ 'black' ,
138+ 'white' ,
139+ // allowing this term, since we use it for expressing gratitude for certain contributors
140+ 'special' ,
141+ ] ,
142+ } ,
143+ } ,
144+ ] ,
110145 'case-police/string-check' : [
111146 'warn' ,
112147 {
0 commit comments