UNPKG

eslint-config-cityssm

Version:

ESLint rules used in the City of Sault Ste. Marie's TypeScript projects.

23 lines (22 loc) 824 B
import list1 from 'eslint-plugin-woke/lib/categories/gender.js'; import list2 from 'eslint-plugin-woke/lib/categories/LGBTQ.js'; import list3 from 'eslint-plugin-woke/lib/categories/profanity.js'; import list4 from 'eslint-plugin-woke/lib/categories/racism.js'; import { words } from './cspell.words.js'; const unformattedWordLists = [...list1, ...list2, ...list3, ...list4]; const wordListSet = new Set(); for (const unformattedWordList of unformattedWordLists) { for (const word of unformattedWordList.words) { if (typeof word === 'string') { wordListSet.add(word); } else { wordListSet.add(word.join('')); } } } for (const wordToRemove of words) { wordListSet.delete(wordToRemove); } export const flagWords = [...wordListSet]; export default flagWords;