Commit 26e3545d authored by Sean McGivern's avatar Sean McGivern

Merge branch 'eread/lint-docs-using-lefthook' into 'master'

Add lefthook configuration for documentation

See merge request gitlab-org/gitlab!46517
parents 4dbb018e 1196ddd9
......@@ -452,7 +452,7 @@ Learn more about using Git, and using Git with GitLab:
## Coming to GitLab from another platform
If you are coming to GitLab from another platform, you'll find the following information useful:
If you are coming to GitLab from another platform, the following information is useful:
| Topic | Description |
|:---------------------------------------------------------------|:---------------------------------------------------------------------------------------|
......
......@@ -373,7 +373,7 @@ As the final step, you must update Gitaly clients to switch from using local Git
the Gitaly servers you just configured.
This can be risky because anything that prevents your Gitaly clients from reaching the Gitaly
servers will cause all Gitaly requests to fail. For example, any sort of network, firewall, or name
servers causes all Gitaly requests to fail. For example, any sort of network, firewall, or name
resolution problems.
Additionally, you must [disable Rugged](../nfs.md#improving-nfs-performance-with-gitlab)
......
......@@ -13,6 +13,11 @@ pre-push:
files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
glob: "*.html.haml"
run: bundle exec haml-lint --config .haml-lint.yml {files}
markdownlint:
tags: documentation style
files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
glob: "*.md"
run: yarn markdownlint {files}
scss-lint:
tags: stylesheet css style
files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
......@@ -24,3 +29,8 @@ pre-push:
files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
glob: "*.rb"
run: bundle exec rubocop --parallel --force-exclusion {files}
vale: # Requires Vale: https://docs.gitlab.com/ee/development/documentation/#install-linters
tags: documentation style
files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD
glob: "*.md"
run: if command -v vale 2> /dev/null; then vale --config .vale.ini --minAlertLevel error {files}; else echo "Vale not found. Install Vale"; fi
......@@ -11,6 +11,7 @@
"eslint-staged-fix": "git diff --diff-filter=d --cached --name-only | grep -E \"(.*)\\.(js|vue)$\" | xargs eslint --cache --max-warnings 0 --report-unused-disable-directives --fix",
"eslint-report": "eslint --max-warnings 0 --ext .js,.vue --format html --output-file ./eslint-report.html --no-inline-config .",
"file-coverage": "scripts/frontend/file_test_coverage.js",
"lint-docs": "scripts/lint-doc.sh",
"prejest": "yarn check-dependencies",
"jest": "jest --config jest.config.js",
"jest-debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
......@@ -20,7 +21,7 @@
"karma": "BABEL_ENV=${BABEL_ENV:=karma} karma start --single-run true config/karma.config.js",
"karma-coverage": "BABEL_ENV=coverage karma start --single-run true config/karma.config.js",
"karma-start": "BABEL_ENV=karma karma start config/karma.config.js",
"markdownlint": "markdownlint -c .markdownlint.json 'doc/**/*.md'",
"markdownlint": "markdownlint --config .markdownlint.json",
"postinstall": "node ./scripts/frontend/postinstall.js",
"prettier-staged": "node ./scripts/frontend/prettier.js check",
"prettier-staged-save": "node ./scripts/frontend/prettier.js save",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment