Commit graph

19 commits

Author SHA1 Message Date
Michał Zając 15ceccd30c
Run GraphQL docs rake task on changes
This commit makes pre-push hook run gitlab:graphql:check_docs rake task
to make sure that our GraphQL docs are up-to-date.

Changelog: changed
2021-10-22 15:17:09 +02:00
Evan Read 14399ab372 Add docs metadata check to Lefthook configuration
Also share logic between Lefthook and lint-doc.sh script.
2021-08-09 09:59:09 +10:00
Dmitry Gruzd 4f9ff26e67 Add gettext check to Lefthook 2021-06-28 16:49:44 +00:00
Albert Salim 2bf707c70c Revert "Merge branch 'eread/restore-docs-metadata-check' into 'master'"
This reverts merge request !59228
2021-04-20 05:20:28 +00:00
Evan Read a95602f78b Add a docs metadata check again 2021-04-20 03:17:10 +00:00
Peter Leitzen 4294fa5d9c
Lefthook: Do not reveal RuboCop TODOs in pre-push hook
Having `REVEAL_RUBOCOP_TODO=1` reveals RuboCop TODOs and sometimes
prevents pushing code.

This commit hides any RuboCop TODOs in lefthook.
2021-03-18 10:37:00 +01:00
Evan Read 890e9d5949 Remove docs metadata check 2021-03-18 14:26:13 +10:00
Evan Read ac19108dd0 Add documentation metadata check to lefthook 2021-03-16 23:45:35 +00:00
Vitaly Slobodin fd1ed743ea Silence stylelint warnings on CI 2021-03-15 20:09:38 +03:00
Lin Jen-Shin 2c401dd530 Merge branch '322893-add-diff-filter-d-to-lefthook-files-config' into 'master'
Resolve "Add diff-filter=d to lefthook files config"

See merge request gitlab-org/gitlab!55339
2021-03-04 07:27:50 +00:00
Paul Slaughter b3c78a03fc
Update lint:eslint to not hardcode "."
- This allows us to quickly run this for specific
  file paths
- Also updates previous references (i.e. CI) to
  add "."
- Also removes lefthook reference to
  `yarn run internal...`
- Also adds `:all` and `:all:fix` scripts
2021-03-01 15:27:23 -06:00
Albert Salim 14d244a284 Exclude deleted files 2021-03-01 13:11:03 +08:00
Vitaly Slobodin c84863d172 Replace scss with stylelint in documentation
Replace all scss-lint mentions with stylelint.
2021-02-18 08:40:19 +00:00
Lukas Eipert 5474e1236c Add prettier to lefthook 2021-02-16 17:09:45 +01:00
Lukas Eipert 61e992af2f Move eslint related yarn scripts to the lint scope
We are currently overloading the `eslint` command with our custom eslint
logic. Unfortunately this causes us to run `eslint` on all js/vue files
and makes it hard to run custom eslint commands. One has to resort to
running e.g. `node_modules/.bin/eslint` directly.

In an effort to consolidate the situation we are renaming the commands
(borrowing from our rake syntax) as follows:

- `eslint` => `lint:eslint`
- `eslint-fix` => `lint:eslint:fix`
- `eslint-staged` => `lint:eslint:staged`
- `eslint-staged-fix` => `lint:eslint:staged:fix`
- `eslint-report` => `lint:eslint:report`

All but the `eslint` command have been replaced with a command that
errors out immediately and hints folks to the new command.
2021-02-16 17:09:44 +01:00
Marcel Amirault c0ee6120da Update lefthook for docs
Should only lint markdown files in doc/, ignore
everything else.
2021-02-10 17:22:27 +00:00
Rémy Coutable 39435594a1 Improve the Lefthook installation instructions
Signed-off-by: Rémy Coutable <remy@rymai.me>
2020-11-11 01:36:35 +00:00
Evan Read 1196ddd9a3 Add lefthook configuration for documentation 2020-11-03 11:58:06 +10:00
Rémy Coutable 5acb0662af
Add a default Lefthook configuration
- This adds a configuration file for Lefthook which is more flexible
  and powerful than Overcommit.
- The only downside is that if gather the diff between `origin/master`
  and `HEAD` so if you didn't fetch `origin/master` for a long time,
  the checks might be done on more files than the one that you updated.
- Also, that means you need a origin remote.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2020-10-29 13:27:27 +01:00