Skip to content

Commit

Permalink
feat: re-implement remark
Browse files Browse the repository at this point in the history
  • Loading branch information
rellafella committed Feb 24, 2025
1 parent 3499628 commit 3634e72
Show file tree
Hide file tree
Showing 32 changed files with 1,598 additions and 19 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*knip*
public-hoist-pattern[]=*mdat*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=*remark*
public-hoist-pattern[]=*stylelint*
3 changes: 3 additions & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { remarkConfig } from '@envsa/remark-config';

export default remarkConfig();
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"prettier-config",
"browserslist-config",
"typescript-config",
"remark-config",
"remark-lint",
"github-actions",
"cspell",
"tsconfig",
Expand Down Expand Up @@ -52,6 +54,7 @@
"@envsa/eslint-config": "workspace:*",
"@envsa/mdat-config": "workspace:*",
"@envsa/prettier-config": "workspace:*",
"@envsa/remark-config": "workspace:*",
"@envsa/repo-config": "workspace:*",
"@envsa/shared-config": "workspace:*",
"@envsa/stylelint-config": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/browserslist-config/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It's a shared [Browserslist](https://browsersl.ist) config.

<!-- recommendation -->

> \[!IMPORTANT]
> [!IMPORTANT]
>
> **You can use this package on its own, but it's recommended to use [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
>
Expand Down
2 changes: 2 additions & 0 deletions packages/cspell-config/dictionaries/envsa-misc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ redactorcustomstyles
relatedsub
rella
rellafella
remarklint
remarkrc
renmark
renxt
retcon
Expand Down
4 changes: 2 additions & 2 deletions packages/cspell-config/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It's a shared [CSpell](https://cspell.org) config, plus a command-line tool `env

<!-- recommendation -->

> \[!IMPORTANT]
> [!IMPORTANT]
>
> **You can use this package on its own, but it's recommended to use [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
>
Expand All @@ -52,7 +52,7 @@ To use just this CSpell config in isolation:
3. Add the starter `.cspell.json` file to your project root, and add any customizations you'd like:

```sh
pnpm exec kpi-cspell init
pnpm exec envsa-cspell init
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It's a shared [ESLint](https://eslint.org) config, plus a command-line tool `env

<!-- recommendation -->

> \[!IMPORTANT]
> [!IMPORTANT]
>
> **You can use this package on its own, but it's recommended to use [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
>
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/src/configs/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export async function json(options: OptionsOverrides = {}): Promise<TypedFlatCon
'knip',
'mdat',
'prettier',
'remarkConfig',
'stylelint',
]),
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export type OptionsConfig = {
json?: OptionsOverrides;

/**
* Enable linting for Markdown
* Enable linting for Markdown via Remark, and Markdown code snippets.
* @default true
*/
md?: OptionsOverrides & OptionsOverridesEmbeddedScripts;
Expand Down
2 changes: 1 addition & 1 deletion packages/knip-config/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It's a shared [knip](https://knip.dev) config, plus a command-line tool `envsa-k

<!-- recommendation -->

> \[!IMPORTANT]
> [!IMPORTANT]
>
> **You can use this package on its own, but it's recommended to use [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
>
Expand Down
2 changes: 2 additions & 0 deletions packages/knip-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const sharedKnipConfig: KnipConfig = {
// Customized entries
'src/{bin,lib,cli}/{index,cli,main}.{js,mjs,cjs,ts,mts,cts}!',
'scripts/**/*.ts',
'.remarkrc.js',
'cspell.config.js',
'eslint.config.ts',
'mdat.config.ts',
Expand All @@ -25,6 +26,7 @@ const sharedKnipConfig: KnipConfig = {
'@envsa/knip-config',
'@envsa/mdat-config',
'@envsa/prettier-config',
'@envsa/remark-config',
'@envsa/stylelint-config',
],
};
Expand Down
2 changes: 1 addition & 1 deletion packages/mdat-config/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It's a shared [MDAT (Markdown Autophagic Template)](https://github.com/kitschpat

<!-- recommendation -->

> \[!IMPORTANT]
> [!IMPORTANT]
>
> **You can use this package on its own, but it's recommended to use [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
>
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier-config/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It's a shared [Prettier](https://prettier.io) config, plus a command-line tool `

<!-- recommendation -->

> \[!IMPORTANT]
> [!IMPORTANT]
>
> **You can use this package on its own, but it's recommended to use [`@envsa/shared-config`](https://www.npmjs.com/package/@envsa/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
>
Expand Down
1 change: 1 addition & 0 deletions packages/prettier-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const sharedPrettierConfig: PrettierConfig = {
'knip',
'mdat',
'prettier',
'remarkConfig',
'stylelint',
]),
},
Expand Down
3 changes: 3 additions & 0 deletions packages/remark-config/init/.remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { remarkConfig } from '@envsa/remark-config';

export default remarkConfig();
3 changes: 3 additions & 0 deletions packages/remark-config/init/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["unifiedjs.vscode-mdx"]
}
21 changes: 21 additions & 0 deletions packages/remark-config/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023-2025 Liam Rella

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
102 changes: 102 additions & 0 deletions packages/remark-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"name": "@envsa/remark-config",
"version": "5.0.5",
"description": "Markdown and MDX linting for @envsa/shared-config.",
"keywords": [
"shared-config",
"remark-config",
"remark-lint",
"remark",
"cli",
"envsa",
"envsa-remark"
],
"homepage": "https://github.com/envsa/shared-config/tree/main/packages/remark-config",
"bugs": "https://github.com/envsa/shared-config/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/envsa/shared-config.git",
"directory": "packages/remark-config"
},
"license": "MIT",
"author": {
"name": "Liam Rella",
"url": "https://github.com/rellafella"
},
"type": "module",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"envsa-remark": "bin/cli.js"
},
"files": [
"bin/*",
"dist/*",
"init/*"
],
"scripts": {
"build": "tsc && ../../scripts/build.ts",
"cli": "node ./bin/cli.js",
"prepublishOnly": "pnpm run build"
},
"dependencies": {
"@pinojs/json-colorizer": "^4.0.0",
"@types/mdast": "^4.0.4",
"cosmiconfig": "^9.0.0",
"execa": "^9.5.2",
"find-workspaces": "^0.3.1",
"fs-extra": "^11.3.0",
"mdast-util-to-markdown": "^2.1.2",
"prettier": "^3.5.0",
"remark-directive": "^3.0.1",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0",
"remark-lint": "^10.0.1",
"remark-lint-checkbox-content-indent": "^5.0.1",
"remark-lint-fenced-code-flag": "^4.1.1",
"remark-lint-final-definition": "^4.0.2",
"remark-lint-first-heading-level": "^4.0.1",
"remark-lint-heading-increment": "^4.0.1",
"remark-lint-linebreak-style": "^4.0.1",
"remark-lint-maximum-heading-length": "^4.1.1",
"remark-lint-no-duplicate-defined-urls": "^3.0.1",
"remark-lint-no-duplicate-definitions": "^4.0.1",
"remark-lint-no-duplicate-headings": "^4.0.1",
"remark-lint-no-duplicate-headings-in-section": "^4.0.1",
"remark-lint-no-empty-url": "^4.0.1",
"remark-lint-no-file-name-articles": "^3.0.1",
"remark-lint-no-file-name-consecutive-dashes": "^3.0.1",
"remark-lint-no-file-name-irregular-characters": "^3.0.1",
"remark-lint-no-file-name-outer-dashes": "^3.0.1",
"remark-lint-no-heading-indent": "^5.0.1",
"remark-lint-no-heading-like-paragraph": "^4.0.1",
"remark-lint-no-multiple-toplevel-headings": "^4.0.1",
"remark-lint-no-paragraph-content-indent": "^5.0.1",
"remark-lint-no-reference-like-url": "^4.0.1",
"remark-lint-no-shell-dollars": "^4.0.1",
"remark-lint-no-shortcut-reference-image": "^4.0.1",
"remark-lint-no-shortcut-reference-link": "^4.0.1",
"remark-lint-no-tabs": "^4.0.1",
"remark-lint-no-undefined-references": "^5.0.1",
"remark-lint-no-unneeded-full-reference-image": "^4.0.1",
"remark-lint-no-unneeded-full-reference-link": "^4.0.1",
"remark-lint-no-unused-definitions": "^4.0.1",
"remark-lint-strikethrough-marker": "^3.0.1",
"remark-stringify": "^11.0.0",
"remark-validate-links": "^13.0.2",
"unified": "^11.0.5"
},
"engines": {
"node": ">=22.0.0",
"pnpm": ">=10.0.0"
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 3634e72

Please sign in to comment.