Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Sep 8, 2024
1 parent 75b3fe1 commit 079f654
Showing 1 changed file with 44 additions and 45 deletions.
89 changes: 44 additions & 45 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -1,86 +1,85 @@

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,
retextPassive,
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;
export default config;

0 comments on commit 079f654

Please sign in to comment.