@gspothq/cli 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/configurations/database/postgres/manifest.toml +114 -0
- package/configurations/database/postgres/rules/POSTGRES.md +78 -0
- package/configurations/framework/astro/eslint-presets.json +138 -0
- package/configurations/framework/astro/manifest.toml +95 -0
- package/configurations/framework/astro/rules/ASTRO.md +39 -0
- package/configurations/framework/expo/manifest.toml +43 -0
- package/configurations/framework/express/manifest.toml +17 -0
- package/configurations/framework/express/rules/EXPRESS.md +73 -0
- package/configurations/framework/express/semgrep/express.yml +71 -0
- package/configurations/framework/fastapi/manifest.toml +11 -0
- package/configurations/framework/fastapi/rules/FASTAPI.md +100 -0
- package/configurations/framework/fastapi/semgrep/fastapi.yml +44 -0
- package/configurations/framework/nestjs/eslint-presets.json +62 -0
- package/configurations/framework/nestjs/manifest.toml +52 -0
- package/configurations/framework/nestjs/rules/NESTJS.md +44 -0
- package/configurations/framework/nextjs/eslint-presets.json +73 -0
- package/configurations/framework/nextjs/manifest.toml +119 -0
- package/configurations/framework/nextjs/rules/NEXTJS.md +43 -0
- package/configurations/framework/react/eslint-presets.json +77 -0
- package/configurations/framework/react/manifest.toml +93 -0
- package/configurations/framework/react/rules/REACT.md +108 -0
- package/configurations/framework/react-dom/eslint-presets.json +110 -0
- package/configurations/framework/react-dom/manifest.toml +24 -0
- package/configurations/framework/react-native/manifest.toml +46 -0
- package/configurations/framework/react-native/rules/REACT-NATIVE.md +51 -0
- package/configurations/framework/site/manifest.toml +170 -0
- package/configurations/framework/site/rules/SITE.md +20 -0
- package/configurations/framework/svelte/eslint-presets.json +67 -0
- package/configurations/framework/svelte/manifest.toml +83 -0
- package/configurations/framework/svelte/rules/SVELTE.md +48 -0
- package/configurations/framework/vue/eslint-presets.json +180 -0
- package/configurations/framework/vue/manifest.toml +83 -0
- package/configurations/framework/vue/rules/VUE.md +41 -0
- package/configurations/general/commits/manifest.toml +111 -0
- package/configurations/general/commits/rules/GIT.md +31 -0
- package/configurations/general/coverage/manifest.toml +3 -0
- package/configurations/general/dependencies/manifest.toml +159 -0
- package/configurations/general/dependencies/rules/DEPENDENCIES.md +30 -0
- package/configurations/general/dependencies/syncpack.json +15 -0
- package/configurations/general/docs/manifest.toml +79 -0
- package/configurations/general/docs/rules/DOCS.md +86 -0
- package/configurations/general/duplication/manifest.toml +32 -0
- package/configurations/general/engineering/manifest.toml +8 -0
- package/configurations/general/engineering/rules/agent/PLANNING.md +42 -0
- package/configurations/general/engineering/rules/agent/SUPPRESSIONS.md +16 -0
- package/configurations/general/engineering/rules/agent/TALKING.md +3 -0
- package/configurations/general/engineering/rules/agent/TASKS.md +19 -0
- package/configurations/general/engineering/rules/agent/WORKING.md +83 -0
- package/configurations/general/engineering/rules/code/ACCESSIBILITY.md +32 -0
- package/configurations/general/engineering/rules/code/CLI.md +37 -0
- package/configurations/general/engineering/rules/code/COMMENTS.md +38 -0
- package/configurations/general/engineering/rules/code/CONFIGURATION.md +25 -0
- package/configurations/general/engineering/rules/code/ERRORS.md +49 -0
- package/configurations/general/engineering/rules/code/HTTP.md +46 -0
- package/configurations/general/engineering/rules/code/LOGGING.md +55 -0
- package/configurations/general/engineering/rules/code/TESTING.md +58 -0
- package/configurations/general/files/manifest.toml +141 -0
- package/configurations/general/files/rules/YAML.md +19 -0
- package/configurations/general/format/manifest.toml +152 -0
- package/configurations/general/gspot/manifest.toml +65 -0
- package/configurations/general/gspot/rules/GENERATED.md +10 -0
- package/configurations/general/licenses/manifest.toml +33 -0
- package/configurations/general/naming/defaults.json +423 -0
- package/configurations/general/naming/manifest.toml +35 -0
- package/configurations/general/naming/rules/NAMING.md +179 -0
- package/configurations/general/prose/manifest.toml +86 -0
- package/configurations/general/prose/rules/WRITING.md +31 -0
- package/configurations/general/prose/vale/styles/LICENSES.md +55 -0
- package/configurations/general/prose/vale/styles/gspot/ampm.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/conscious-language.yml +16 -0
- package/configurations/general/prose/vale/styles/gspot/contractions.yml +43 -0
- package/configurations/general/prose/vale/styles/gspot/currency.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/dashes.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/date-ordinals.yml +41 -0
- package/configurations/general/prose/vale/styles/gspot/dates.yml +7 -0
- package/configurations/general/prose/vale/styles/gspot/file-paths.yml +7 -0
- package/configurations/general/prose/vale/styles/gspot/future.yml +17 -0
- package/configurations/general/prose/vale/styles/gspot/hedging.yml +22 -0
- package/configurations/general/prose/vale/styles/gspot/history.yml +16 -0
- package/configurations/general/prose/vale/styles/gspot/idioms.yml +21 -0
- package/configurations/general/prose/vale/styles/gspot/interface-verbs.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/jargon.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/leading-conjunctions.yml +12 -0
- package/configurations/general/prose/vale/styles/gspot/link-text.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/locations.yml +14 -0
- package/configurations/general/prose/vale/styles/gspot/marketing.yml +26 -0
- package/configurations/general/prose/vale/styles/gspot/merge-conflict-markers.yml +13 -0
- package/configurations/general/prose/vale/styles/gspot/militaristic-language.yml +22 -0
- package/configurations/general/prose/vale/styles/gspot/modals.yml +9 -0
- package/configurations/general/prose/vale/styles/gspot/numbered-units.yml +18 -0
- package/configurations/general/prose/vale/styles/gspot/obvious-fields.yml +14 -0
- package/configurations/general/prose/vale/styles/gspot/ordinal-adverbs.yml +15 -0
- package/configurations/general/prose/vale/styles/gspot/percentage-numbers.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/placeholders.yml +7 -0
- package/configurations/general/prose/vale/styles/gspot/product-centric-writing.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/punctuated-headings.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/self-reference.yml +15 -0
- package/configurations/general/prose/vale/styles/gspot/session-identifiers.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/since.yml +6 -0
- package/configurations/general/prose/vale/styles/gspot/straight-quotes.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/suspended-hyphens.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/symbols.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/time-ranges.yml +14 -0
- package/configurations/general/prose/vale/styles/gspot/url-prepositions.yml +10 -0
- package/configurations/general/prose/vale/styles/gspot/version-range.yml +8 -0
- package/configurations/general/repository/manifest.toml +24 -0
- package/configurations/general/secrets/gitleaks.toml +2 -0
- package/configurations/general/secrets/manifest.toml +125 -0
- package/configurations/general/secrets/rules/SECRETS.md +13 -0
- package/configurations/general/security/manifest.toml +77 -0
- package/configurations/general/security/rules/SECURITY.md +55 -0
- package/configurations/general/spelling/manifest.toml +46 -0
- package/configurations/general/structure/manifest.toml +70 -0
- package/configurations/infrastructure/ansible/manifest.toml +33 -0
- package/configurations/infrastructure/docker/manifest.toml +127 -0
- package/configurations/infrastructure/docker/rules/DOCKER.md +135 -0
- package/configurations/infrastructure/docker/trivyignore +2 -0
- package/configurations/infrastructure/github-actions/manifest.toml +76 -0
- package/configurations/infrastructure/github-actions/rules/GITHUB-ACTIONS.md +43 -0
- package/configurations/infrastructure/github-actions/zizmor.yml +3 -0
- package/configurations/infrastructure/nginx/manifest.toml +51 -0
- package/configurations/infrastructure/nginx/rules/NGINX.md +38 -0
- package/configurations/infrastructure/openapi/manifest.toml +50 -0
- package/configurations/infrastructure/openapi/rules/OPENAPI.md +39 -0
- package/configurations/infrastructure/xcode/manifest.toml +131 -0
- package/configurations/infrastructure/xcode/rules/XCODE.md +34 -0
- package/configurations/language/bash/manifest.toml +261 -0
- package/configurations/language/bash/rules/BASH.md +106 -0
- package/configurations/language/bash/rules/LANGUAGE.md +213 -0
- package/configurations/language/bash/rules/NAMING.md +62 -0
- package/configurations/language/bash/rules/OPERATIONS.md +77 -0
- package/configurations/language/bash/rules/SAFETY.md +222 -0
- package/configurations/language/bash/semgrep/bash.yml +30 -0
- package/configurations/language/css/manifest.toml +98 -0
- package/configurations/language/css/rules/CSS.md +28 -0
- package/configurations/language/css/rules/NAMING.md +17 -0
- package/configurations/language/css/rules/TAILWIND.md +26 -0
- package/configurations/language/css/stylelint-rule-names.json +89 -0
- package/configurations/language/html/manifest.toml +59 -0
- package/configurations/language/html/rules/HTML.md +27 -0
- package/configurations/language/html/rules/NAMING.md +16 -0
- package/configurations/language/javascript/eslint-presets.json +997 -0
- package/configurations/language/javascript/eslint-rule-names.json +299 -0
- package/configurations/language/javascript/eslint-runtime-names.json +61 -0
- package/configurations/language/javascript/manifest.toml +393 -0
- package/configurations/language/javascript/rules/BUN.md +13 -0
- package/configurations/language/javascript/rules/COMPONENTS.md +18 -0
- package/configurations/language/javascript/rules/DENO.md +15 -0
- package/configurations/language/javascript/rules/JAVASCRIPT.md +60 -0
- package/configurations/language/javascript/rules/NAMING.md +31 -0
- package/configurations/language/javascript/rules/NODE.md +21 -0
- package/configurations/language/javascript/rules/PLAYWRIGHT.md +34 -0
- package/configurations/language/javascript/semgrep/javascript.yml +84 -0
- package/configurations/language/markdown/manifest.toml +85 -0
- package/configurations/language/markdown/markdownlint-cli2.mjs +19 -0
- package/configurations/language/python/manifest.toml +621 -0
- package/configurations/language/python/rules/DESIGN.md +136 -0
- package/configurations/language/python/rules/FLOW.md +124 -0
- package/configurations/language/python/rules/NAMING.md +53 -0
- package/configurations/language/python/rules/PACKAGING.md +49 -0
- package/configurations/language/python/rules/PYTHON.md +136 -0
- package/configurations/language/python/rules/TYPING.md +132 -0
- package/configurations/language/sql/manifest.toml +68 -0
- package/configurations/language/sql/rules/NAMING.md +90 -0
- package/configurations/language/sql/rules/SQL.md +9 -0
- package/configurations/language/swift/manifest.toml +164 -0
- package/configurations/language/swift/rules/NAMING.md +88 -0
- package/configurations/language/swift/rules/SWIFT.md +134 -0
- package/configurations/language/swift/rules/SWIFTUI.md +61 -0
- package/configurations/language/swift/rules/UIKIT.md +99 -0
- package/configurations/language/swift/semgrep/swift.yml +126 -0
- package/configurations/language/typescript/eslint-presets.json +215 -0
- package/configurations/language/typescript/manifest.toml +72 -0
- package/configurations/language/typescript/rules/NAMING.md +73 -0
- package/configurations/language/typescript/rules/TYPESCRIPT.md +79 -0
- package/configurations/library/drizzle/manifest.toml +68 -0
- package/configurations/library/drizzle/rules/DRIZZLE.md +44 -0
- package/configurations/library/react-hook-form/manifest.toml +15 -0
- package/configurations/library/react-hook-form/rules/REACT-HOOK-FORM.md +48 -0
- package/configurations/library/swift-snapshot-testing/manifest.toml +32 -0
- package/configurations/library/tanstack-query/eslint-presets.json +21 -0
- package/configurations/library/tanstack-query/manifest.toml +26 -0
- package/configurations/library/tanstack-query/rules/TANSTACK-QUERY.md +41 -0
- package/configurations/library/testing-library/eslint-presets.json +191 -0
- package/configurations/library/testing-library/manifest.toml +47 -0
- package/configurations/library/translations/manifest.toml +40 -0
- package/configurations/library/translations/rules/NEXT-INTL.md +33 -0
- package/configurations/library/translations/rules/TRANSLATIONS.md +102 -0
- package/configurations/library/trpc/manifest.toml +14 -0
- package/configurations/library/trpc/rules/TRPC.md +43 -0
- package/configurations/library/zod/manifest.toml +25 -0
- package/configurations/library/zod/rules/ZOD.md +44 -0
- package/configurations/library/zustand/manifest.toml +18 -0
- package/configurations/library/zustand/rules/ZUSTAND.md +106 -0
- package/configurations/platform/cloudflare/manifest.toml +94 -0
- package/configurations/platform/cloudflare/rules/CLOUDFLARE.md +23 -0
- package/configurations/platform/cloudflare/semgrep/cloudflare.yml +12 -0
- package/configurations/platform/supabase/manifest.toml +112 -0
- package/configurations/platform/supabase/rules/SUPABASE.md +129 -0
- package/configurations/platform/supabase/semgrep/supabase.yml +60 -0
- package/configurations/testing/jest/manifest.toml +54 -0
- package/configurations/testing/pytest/manifest.toml +53 -0
- package/configurations/testing/swift-tests/manifest.toml +52 -0
- package/configurations/testing/swift-tests/rules/SWIFT-TESTS.md +79 -0
- package/configurations/testing/vitest/eslint-presets.json +22 -0
- package/configurations/testing/vitest/manifest.toml +69 -0
- package/configurations/testing/vitest/rules/VITEST.md +18 -0
- package/dist/LICENSE.md +201 -0
- package/dist/THIRD-PARTY-NOTICES.md +25 -0
- package/dist/eslint-rule-levels.json +10 -0
- package/dist/gspot.js +30740 -0
- package/dist/linkinator-program.js +65 -0
- package/dist/purgecss-program.js +51 -0
- package/dist/tool-versions.json +3 -0
- package/grammars/bash.wasm +0 -0
- package/grammars/css.wasm +0 -0
- package/grammars/html.wasm +0 -0
- package/grammars/javascript.wasm +0 -0
- package/grammars/licenses/tree-sitter-bash.txt +21 -0
- package/grammars/licenses/tree-sitter-css.txt +21 -0
- package/grammars/licenses/tree-sitter-html.txt +21 -0
- package/grammars/licenses/tree-sitter-javascript.txt +21 -0
- package/grammars/licenses/tree-sitter-python.txt +21 -0
- package/grammars/licenses/tree-sitter-swift.txt +21 -0
- package/grammars/licenses/tree-sitter-typescript.txt +21 -0
- package/grammars/python.wasm +0 -0
- package/grammars/swift.wasm +0 -0
- package/grammars/tsx.wasm +0 -0
- package/grammars/typescript.wasm +0 -0
- package/gspot.schema.json +45991 -0
- package/package.json +93 -5
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
rules:
|
|
2
|
+
- id: gspot.javascript.no-dom-html-sinks
|
|
3
|
+
pattern-either:
|
|
4
|
+
- pattern: $ELEMENT.innerHTML = $VALUE
|
|
5
|
+
- pattern: $ELEMENT.outerHTML = $VALUE
|
|
6
|
+
- pattern: $ELEMENT.insertAdjacentHTML($POSITION, $VALUE)
|
|
7
|
+
- pattern: document.write($VALUE)
|
|
8
|
+
message: DOM XSS risk. Use textContent, DOM node creation, or trusted static markup.
|
|
9
|
+
languages:
|
|
10
|
+
- javascript
|
|
11
|
+
- typescript
|
|
12
|
+
severity: ERROR
|
|
13
|
+
- id: gspot.javascript.ssrf-web-request-user-input
|
|
14
|
+
patterns:
|
|
15
|
+
- pattern-either:
|
|
16
|
+
- pattern: fetch(req.$PART.$VALUE, ...)
|
|
17
|
+
- pattern: fetch($URL.searchParams.get(...), ...)
|
|
18
|
+
message: SSRF risk - web request called with a URL from user input. Validate and
|
|
19
|
+
allowlist target hosts.
|
|
20
|
+
languages:
|
|
21
|
+
- typescript
|
|
22
|
+
- javascript
|
|
23
|
+
severity: ERROR
|
|
24
|
+
metadata:
|
|
25
|
+
cwe:
|
|
26
|
+
- CWE-918
|
|
27
|
+
category: security
|
|
28
|
+
- id: gspot.javascript.no-secret-in-log
|
|
29
|
+
patterns:
|
|
30
|
+
- pattern-either:
|
|
31
|
+
- pattern: $LOGGER.$LEVEL(process.env.$VAR)
|
|
32
|
+
- pattern: $LOGGER.$LEVEL(Deno.env.get($VAR))
|
|
33
|
+
- metavariable-regex:
|
|
34
|
+
metavariable: $LEVEL
|
|
35
|
+
regex: ^(log|trace|debug|info|warn|error|fatal)$
|
|
36
|
+
- metavariable-regex:
|
|
37
|
+
metavariable: $VAR
|
|
38
|
+
regex: .*(KEY|SECRET|PASSWORD|TOKEN|CREDENTIAL).*
|
|
39
|
+
message: Sensitive environment variable logged. Remove or mask before logging.
|
|
40
|
+
languages:
|
|
41
|
+
- typescript
|
|
42
|
+
- javascript
|
|
43
|
+
severity: ERROR
|
|
44
|
+
metadata:
|
|
45
|
+
cwe:
|
|
46
|
+
- CWE-532
|
|
47
|
+
category: security
|
|
48
|
+
- id: gspot.javascript.jwt-no-algorithm-none
|
|
49
|
+
patterns:
|
|
50
|
+
- pattern: jwt.verify($TOKEN, $SECRET)
|
|
51
|
+
- pattern-not: 'jwt.verify($TOKEN, $SECRET, {algorithms: ...})'
|
|
52
|
+
message: Require the expected JWT signing algorithms when verifying a token.
|
|
53
|
+
Pass an algorithms option that matches the signing contract.
|
|
54
|
+
languages:
|
|
55
|
+
- typescript
|
|
56
|
+
- javascript
|
|
57
|
+
severity: ERROR
|
|
58
|
+
metadata:
|
|
59
|
+
cwe:
|
|
60
|
+
- CWE-327
|
|
61
|
+
category: security
|
|
62
|
+
- id: gspot.javascript.jwt-no-decode-without-verify
|
|
63
|
+
pattern: jwt.decode(...)
|
|
64
|
+
message: jwt.decode() does not verify signatures. Use jwt.verify() instead.
|
|
65
|
+
languages:
|
|
66
|
+
- typescript
|
|
67
|
+
- javascript
|
|
68
|
+
severity: ERROR
|
|
69
|
+
metadata:
|
|
70
|
+
cwe:
|
|
71
|
+
- CWE-345
|
|
72
|
+
category: security
|
|
73
|
+
- id: gspot.javascript.no-interpolated-exec
|
|
74
|
+
pattern: execSync(`...${$VAR}...`)
|
|
75
|
+
message: Template literal interpolation in execSync() is a command injection
|
|
76
|
+
vector. Use execFileSync() with an argument array instead.
|
|
77
|
+
languages:
|
|
78
|
+
- typescript
|
|
79
|
+
- javascript
|
|
80
|
+
severity: ERROR
|
|
81
|
+
metadata:
|
|
82
|
+
cwe:
|
|
83
|
+
- CWE-78
|
|
84
|
+
category: security
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
allowed_words = ["Markdown", "lychee"]
|
|
2
|
+
[configuration]
|
|
3
|
+
title = "Markdown"
|
|
4
|
+
description = "Markdown files: markdownlint, Prettier, and fenced code blocks that must parse."
|
|
5
|
+
|
|
6
|
+
[files]
|
|
7
|
+
extensions = [".md", ".mdx"]
|
|
8
|
+
|
|
9
|
+
[[tool]]
|
|
10
|
+
name = "markdownlint-cli2"
|
|
11
|
+
rule_url = "https://github.com/DavidAnson/markdownlint/blob/main/doc/{rule}.md"
|
|
12
|
+
suppression = { marker = "\\bmarkdownlint-disable(?:-line|-next-line|-file)?\\b", reason = " -- (?<reason>\\S(?:[\\s\\S]*?\\S)?)\\s*(?:--!?>)?$" }
|
|
13
|
+
version = "0.23.3"
|
|
14
|
+
npm = "markdownlint-cli2"
|
|
15
|
+
mise = "npm:markdownlint-cli2"
|
|
16
|
+
version_command = ["--help"]
|
|
17
|
+
version_exit_code = 2
|
|
18
|
+
version_pattern = "markdownlint-cli2 v(\\d+\\.\\d+\\.\\d+)"
|
|
19
|
+
[[tool.replace]]
|
|
20
|
+
file = ".markdownlint-cli2.jsonc"
|
|
21
|
+
shared = false
|
|
22
|
+
|
|
23
|
+
[[tool.replace]]
|
|
24
|
+
file = ".markdownlint-cli2.yaml"
|
|
25
|
+
shared = false
|
|
26
|
+
|
|
27
|
+
[[tool.replace]]
|
|
28
|
+
file = ".markdownlint-cli2.cjs"
|
|
29
|
+
shared = false
|
|
30
|
+
|
|
31
|
+
[[tool.replace]]
|
|
32
|
+
file = ".markdownlint-cli2.mjs"
|
|
33
|
+
shared = false
|
|
34
|
+
|
|
35
|
+
[[tool.replace]]
|
|
36
|
+
file = ".markdownlint.json"
|
|
37
|
+
shared = false
|
|
38
|
+
|
|
39
|
+
[[tool.replace]]
|
|
40
|
+
file = ".markdownlint.jsonc"
|
|
41
|
+
shared = false
|
|
42
|
+
|
|
43
|
+
[[tool.replace]]
|
|
44
|
+
file = ".markdownlint.yaml"
|
|
45
|
+
shared = false
|
|
46
|
+
|
|
47
|
+
[[tool.replace]]
|
|
48
|
+
file = ".markdownlint.yml"
|
|
49
|
+
shared = false
|
|
50
|
+
|
|
51
|
+
[[tool_file]]
|
|
52
|
+
target = ".gspot/config/markdownlint.jsonc"
|
|
53
|
+
tool = "markdownlint-cli2"
|
|
54
|
+
per_scope = true
|
|
55
|
+
rule_keys = [""]
|
|
56
|
+
|
|
57
|
+
[[tool_file]]
|
|
58
|
+
source = "markdownlint-cli2.mjs"
|
|
59
|
+
target = ".gspot/config/markdownlint-cli2.mjs"
|
|
60
|
+
tool = "markdownlint-cli2"
|
|
61
|
+
per_scope = true
|
|
62
|
+
pointer = { path = ".markdownlint-cli2.mjs", body = "export { default } from {target_module};", when = { configuration = "javascript" } }
|
|
63
|
+
|
|
64
|
+
[[check]]
|
|
65
|
+
name = "markdownlint"
|
|
66
|
+
example = "A heading that jumps from level one to level three reports MD001. Change the later heading to level two."
|
|
67
|
+
run_in_copy = true
|
|
68
|
+
level = "recommended"
|
|
69
|
+
stage = "commit"
|
|
70
|
+
command = ["markdownlint-cli2", "--no-globs", "--config", "{tool_file:markdownlint-cli2}", "{files}"]
|
|
71
|
+
fix = ["markdownlint-cli2", "--fix", "--no-globs", "--config", "{tool_file:markdownlint-cli2}", "{files}"]
|
|
72
|
+
exit_codes = [1]
|
|
73
|
+
output = { format = "markdownlint" }
|
|
74
|
+
summary = "Checks every Markdown file against markdownlint with the shipped rule set."
|
|
75
|
+
why = "Markdown that lints the same everywhere renders the same everywhere."
|
|
76
|
+
help = "Run gspot check --fix for the rules that fix themselves; read the rule name for the rest."
|
|
77
|
+
|
|
78
|
+
[[check]]
|
|
79
|
+
name = "fences"
|
|
80
|
+
example = "A code fence labeled `bash` containing `if then` reports invalid syntax. Correct the example to valid Bash. Use a text fence only when the block represents text rather than executable code."
|
|
81
|
+
level = "recommended"
|
|
82
|
+
stage = "commit"
|
|
83
|
+
summary = "Checks JSON, JSONC, TOML, YAML, Bash, JavaScript, JSX, TypeScript, TSX, and Python code fences in Markdown (.md) files for syntax errors."
|
|
84
|
+
why = "A code block that does not parse is documentation that lies about the code."
|
|
85
|
+
help = "Fix the code in the block, or tag the block text when it is not code."
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
config: { extends: fileURLToPath(new URL('markdownlint.jsonc', import.meta.url)) },
|
|
5
|
+
noBanner: true,
|
|
6
|
+
noProgress: true,
|
|
7
|
+
outputFormatters: [
|
|
8
|
+
[
|
|
9
|
+
/**
|
|
10
|
+
* Write the findings as JSON.
|
|
11
|
+
* @param {object} output the formatter input.
|
|
12
|
+
* @param {unknown} output.results the findings.
|
|
13
|
+
* @param {(message: string) => void} output.logMessage the report writer.
|
|
14
|
+
* @returns {void} nothing.
|
|
15
|
+
*/
|
|
16
|
+
({ results, logMessage }) => logMessage(JSON.stringify(results)),
|
|
17
|
+
],
|
|
18
|
+
],
|
|
19
|
+
};
|