Skip to content

Commit 3dda1f7

Browse files
committed
Small docs fixes
1 parent 055b76d commit 3dda1f7

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/docs
1+
*.md

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Recommended ESLint presets by [Code PushUp](https://github.com/code-pushup/cli/t
88

99
Configurations are available for different tech stacks.
1010

11-
| Stack | Config | Description |
12-
| :-------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
13-
| ![javascript](https://raw.githubusercontent.com/code-pushup/eslint-config/main/docs/icons/javascript.png) | [@code-pushup](https://github.com/code-pushup/eslint-config/blob/main/docs/index.md) | Default configuration, suitable for any JavaScript/TypeScript project. |
14-
| ![typescript](https://raw.githubusercontent.com/code-pushup/eslint-config/main/docs/icons/typescript.png) | [@code-pushup/eslint-config/typescript](https://github.com/code-pushup/eslint-config/blob/main/docs/typescript.md) | Configuration for strict TypeScript projects. |
11+
| Stack | Config | Description |
12+
| :-- | :-- | :-- |
13+
| ![javascript](https://raw.githubusercontent.com/code-pushup/eslint-config/main/docs/icons/javascript.png) | [@code-pushup](https://github.com/code-pushup/eslint-config/blob/main/docs/index.md) | Default configuration, suitable for any JavaScript/TypeScript project. |
14+
| ![typescript](https://raw.githubusercontent.com/code-pushup/eslint-config/main/docs/icons/typescript.png) | [@code-pushup/eslint-config/typescript](https://github.com/code-pushup/eslint-config/blob/main/docs/typescript.md) | Configuration for strict TypeScript projects. |
1515

1616
<!-- end autogenerated -->

docs/typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Add to `extends` in your .eslintrc file:
142142
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)<br>Enforce type definitions to consistently use either `interface` or `type` | <details><summary>type</summary><pre>"type"</pre></details> | 🔧 |
143143
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [default-param-last](https://typescript-eslint.io/rules/default-param-last)<br>Enforce default parameters to be last | - | - |
144144
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [method-signature-style](https://typescript-eslint.io/rules/method-signature-style)<br>Enforce using a particular method signature syntax | - | 🔧 |
145-
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [naming-convention](https://typescript-eslint.io/rules/naming-convention)<br>Enforce naming conventions for everything across a codebase | <details><summary>selector: variableLike, met...</summary><pre>[<br> {<br> "selector": [<br> "variableLike",<br> "method",<br> "typeProperty",<br> "parameterProperty",<br> "classProperty"<br> ],<br> "format": [<br> "camelCase"<br> ]<br> },<br> {<br> "selector": "variable",<br> "format": [<br> "camelCase",<br> "UPPER_CASE"<br> ]<br> },<br> {<br> "selector": "typeLike",<br> "format": [<br> "PascalCase"<br> ]<br> },<br> {<br> "selector": "enumMember",<br> "format": [<br> "PascalCase"<br> ]<br> },<br> {<br> "selector": "parameter",<br> "modifiers": [<br> "unused"<br> ],<br> "format": null,<br> "custom": {<br> "regex": "^(_+|[a-z][a-zA-Z0-9]*)$",<br> "match": true<br> }<br> },<br> {<br> "selector": "objectLiteralProperty",<br> "modifiers": [<br> "requiresQuotes"<br> ],<br> "format": null<br> },<br> {<br> "selector": [<br> "variable",<br> "parameter"<br> ],<br> "modifiers": [<br> "destructured"<br> ],<br> "format": null<br> }<br>]</pre></details> | - |
145+
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [naming-convention](https://typescript-eslint.io/rules/naming-convention)<br>Enforce naming conventions for everything across a codebase | <details><summary>selector: variableLike, met...</summary><pre>[<br> {<br> "selector": [<br> "variableLike",<br> "method",<br> "typeProperty",<br> "parameterProperty",<br> "classProperty"<br> ],<br> "format": [<br> "camelCase"<br> ]<br> },<br> {<br> "selector": "variable",<br> "format": [<br> "camelCase",<br> "UPPER_CASE"<br> ]<br> },<br> {<br> "selector": "typeLike",<br> "format": [<br> "PascalCase"<br> ]<br> },<br> {<br> "selector": "enumMember",<br> "format": [<br> "PascalCase"<br> ]<br> },<br> {<br> "selector": "parameter",<br> "modifiers": [<br> "unused"<br> ],<br> "format": null,<br> "custom": {<br> "regex": "^(_+\|[a-z][a-zA-Z0-9]*)$",<br> "match": true<br> }<br> },<br> {<br> "selector": "objectLiteralProperty",<br> "modifiers": [<br> "requiresQuotes"<br> ],<br> "format": null<br> },<br> {<br> "selector": [<br> "variable",<br> "parameter"<br> ],<br> "modifiers": [<br> "destructured"<br> ],<br> "format": null<br> }<br>]</pre></details> | - |
146146
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [no-shadow](https://typescript-eslint.io/rules/no-shadow)<br>Disallow variable declarations from shadowing variables declared in the outer scope | - | - |
147147
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [no-unused-expressions](https://typescript-eslint.io/rules/no-unused-expressions)<br>Disallow unused expressions | - | - |
148148
| [![@typescript-eslint](./icons/typescript.png)](https://typescript-eslint.io/) | [prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing)<br>Enforce using the nullish coalescing operator instead of logical assignments or chaining | <details><summary>ignorePrimitives: {"string"...</summary><pre>{<br> "ignorePrimitives": {<br> "string": true<br> }<br>}</pre></details> | 💡 |

scripts/helpers/markdown.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ function rulesTable(rules) {
103103
options
104104
? htmlDetails(
105105
'<pre>' +
106-
JSON.stringify(options, null, 2).replace(/\n/g, '<br>') +
106+
JSON.stringify(options, null, 2)
107+
.replace(/\n/g, '<br>')
108+
.replace('|', '\\|') +
107109
'</pre>',
108110
truncate(optionsPreview(options), 30),
109111
)

0 commit comments

Comments
 (0)