From 079f654efdb786fbb22f4118bb5fa46a4191cd18 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Sun, 8 Sep 2024 17:15:31 -0400 Subject: [PATCH] prettier --- .remarkrc.js | 89 ++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/.remarkrc.js b/.remarkrc.js index 1ec58939f..84fa5c1fa 100644 --- a/.remarkrc.js +++ b/.remarkrc.js @@ -1,28 +1,27 @@ - -import { unified } from 'unified' -import dictionaryEn from 'dictionary-en' -import fs from 'fs' -import retextEnglish from 'retext-english' -import retextEquality from 'retext-equality' -import retextIndefiniteArticle from 'retext-indefinite-article' -import retextPassive from 'retext-passive' -import retextReadability from 'retext-readability' -import retextRepeatedWords from 'retext-repeated-words' -import retextSimplify from 'retext-simplify' -import retextIntensify from 'retext-intensify' -import retextProfanities from 'retext-profanities' -import retextSpell from 'retext-spell' -import retextRedundantAcronyms from 'retext-redundant-acronyms' -import retextSentenceSpacing from 'retext-sentence-spacing' -import retextStringify from 'retext-stringify' -import remarkTextr from 'remark-textr' +import { unified } from "unified"; +import dictionaryEn from "dictionary-en"; +import fs from "fs"; +import retextEnglish from "retext-english"; +import retextEquality from "retext-equality"; +import retextIndefiniteArticle from "retext-indefinite-article"; +import retextPassive from "retext-passive"; +import retextReadability from "retext-readability"; +import retextRepeatedWords from "retext-repeated-words"; +import retextSimplify from "retext-simplify"; +import retextIntensify from "retext-intensify"; +import retextProfanities from "retext-profanities"; +import retextSpell from "retext-spell"; +import retextRedundantAcronyms from "retext-redundant-acronyms"; +import retextSentenceSpacing from "retext-sentence-spacing"; +import retextStringify from "retext-stringify"; +import remarkTextr from "remark-textr"; const personalDict = fs - .readFileSync('dictionary.txt', 'utf8') - .replace(/#.+/gm, ''); + .readFileSync("dictionary.txt", "utf8") + .replace(/#.+/gm, ""); const retextSettings = { - "plugins": [ + plugins: [ retextEnglish, retextEquality, retextIndefiniteArticle, @@ -30,57 +29,57 @@ const retextSettings = { retextReadability, retextRepeatedWords, retextSimplify, - [retextSpell, {dictionary: dictionaryEn, personal: personalDict}], - // retextContractions, + [retextSpell, { dictionary: dictionaryEn, personal: personalDict }], + // retextContractions, retextIntensify, retextProfanities, retextRedundantAcronyms, retextSentenceSpacing, retextStringify, - ] -} + ], +}; const textrSettings = { options: { - locale: 'en-us' + locale: "en-us", }, plugins: [ - 'typographic-arrows', - 'typographic-copyright', - 'typographic-em-dashes', - 'typographic-en-dashes', - 'typographic-math-symbols', - 'typographic-registered-trademark', - 'typographic-single-spaces', - 'typographic-trademark' - ] + "typographic-arrows", + "typographic-copyright", + "typographic-em-dashes", + "typographic-en-dashes", + "typographic-math-symbols", + "typographic-registered-trademark", + "typographic-single-spaces", + "typographic-trademark", + ], }; const config = { - "plugins": [ - "remark-gfm", - "remark-preset-lint-recommended", + plugins: [ + "remark-gfm", + "remark-preset-lint-recommended", "remark-preset-lint-consistent", "remark-preset-lint-markdown-style-guide", ["remark-lint-no-undefined-references", false], // FIX THIS ["remark-lint-maximum-line-length", false], ["remark-lint-unordered-list-marker-style", "*"], - ["remark-lint-maximum-heading-length", false], - ["remark-frontmatter", 'yaml'], + ["remark-lint-maximum-heading-length", false], + ["remark-frontmatter", "yaml"], [remarkTextr, textrSettings], ["remark-retext", unified().use(retextSettings)], // TODO: Use Stringify to auto fix ], settings: { - rule: '-', + rule: "-", footnotes: true, gfm: true, - fence: '`', + fence: "`", ruleSpaces: false, ruleRepetition: 3, yaml: true, fences: true, - spacedTable: true + spacedTable: true, }, -} +}; -export default config; \ No newline at end of file +export default config;