Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Ignore all includes directories when linting (gravitational#201)
Browse files Browse the repository at this point in the history
The intention in gravitational#192 was to ignore directories containing partials when
linting, since (a) these partials would be included within docs pages
when linting anyway, and (b) the linter returns errors when encountering
default parameter assignments within partials.

The change in gravitational#192 ignored includes in
'content/*/docs/pages/includes/*'.

However, in the `gravitational/teleport` CI container, docs content is
mounted to `content/`, without a version directory. This means that
default parameter assignments in `gravitational/teleport` partials still
fail the linter, since the partial URL would be something like
`content/docs/pages/includes/add-role-to-user.mdx`.

This change makes the pattern for ignoring partials more general so it
matches any file path with an `/includes/` segment.
  • Loading branch information
ptgott authored Dec 2, 2022
1 parent 6c0896e commit aa6d4cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint": "yarn base:eslint --fix && yarn base:prettier --write -l",
"lint-check": "yarn base:eslint && yarn base:prettier --check",
"typecheck": "tsc --noEmit --skipLibCheck --incremental --tsBuildInfoFile node_modules/.cache/tsc/tsbuildinfo --project .",
"markdown-lint": "remark 'content/**/docs/pages/**/*.mdx' --frail --ignore-pattern 'content/*/docs/pages/includes/*' --silently-ignore",
"markdown-lint": "remark 'content/**/docs/pages/**/*.mdx' --frail --ignore-pattern '**/includes/**' --silently-ignore",
"markdown-lint-external-links": "WITH_EXTERNAL_LINKS=true yarn markdown-lint",
"markdown-fix": "FIX=true yarn markdown-lint -o"
},
Expand Down

0 comments on commit aa6d4cd

Please sign in to comment.