@kitschpatrol/remark-config
Version:
Markdown and MDX linting for @kitschpatrol/shared-config.
1 lines • 2.66 kB
JavaScript
import{defaultHandlers as e}from"mdast-util-to-markdown";import t from"remark-attribute-list";import n from"remark-directive";import r from"remark-frontmatter";import i from"remark-gfm";import a from"remark-lint";import o from"remark-validate-links";import"remark-stringify";import s from"remark-lint-checkbox-content-indent";import c from"remark-lint-fenced-code-flag";import l from"remark-lint-final-definition";import u from"remark-lint-first-heading-level";import d from"remark-lint-heading-increment";import f from"remark-lint-linebreak-style";import p from"remark-lint-maximum-heading-length";import m from"remark-lint-no-duplicate-defined-urls";import h from"remark-lint-no-duplicate-definitions";import g from"remark-lint-no-duplicate-headings";import _ from"remark-lint-no-duplicate-headings-in-section";import v from"remark-lint-no-empty-url";import y from"remark-lint-no-file-name-articles";import b from"remark-lint-no-file-name-consecutive-dashes";import x from"remark-lint-no-file-name-irregular-characters";import S from"remark-lint-no-file-name-outer-dashes";import C from"remark-lint-no-heading-indent";import w from"remark-lint-no-heading-like-paragraph";import T from"remark-lint-no-multiple-toplevel-headings";import E from"remark-lint-no-paragraph-content-indent";import D from"remark-lint-no-reference-like-url";import O from"remark-lint-no-shell-dollars";import k from"remark-lint-no-shortcut-reference-image";import A from"remark-lint-no-shortcut-reference-link";import j from"remark-lint-no-tabs";import M from"remark-lint-no-undefined-references";import N from"remark-lint-no-unneeded-full-reference-image";import P from"remark-lint-no-unneeded-full-reference-link";import F from"remark-lint-no-unused-definitions";import I from"remark-lint-strikethrough-marker";const L=/^\\(?=\[!(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION)\])/i,R={plugins:[a,r,i,n,t,s,[c,{allowEmpty:!1}],l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,[M,{allow:[`…`,`...`,`!NOTE`,`!TIP`,`!IMPORTANT`,`!WARNING`,`!CAUTION`]}],N,P,F,F,I,o],settings:{bullet:`-`,emphasis:`_`,handlers:{text(t,n,r,i){return e.text(t,n,r,i).replace(L,``)}},rule:`-`,strong:`*`}},z=/^remark-lint-/;function B(e,t){e??=[];for(let[n,r]of t){n=n.replace(z,`remark-lint:`);let t,i=e.findIndex(e=>{if(Array.isArray(e)){if(e[0].name===n)return t=e[0],!0}else if(`name`in e&&e.name===n)return t=e,!0;return!1});i!==-1&&e.splice(i,1,[t,r])}return e}function V(e){let{plugins:t=[],rules:n=[],settings:r}=e??{plugins:void 0,rules:void 0,settings:void 0};return{...R,plugins:B([...R.plugins??[],...t],n),settings:{...R.settings,...r}}}export{R as default,R as remarkSharedConfig,V as remarkConfig};