diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..808289c46f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,25 @@ +repos: + - repo: local + hooks: + - id: lint-js + name: "lint typescript and javascript" + entry: /usr/bin/env npx eslint + files: '\.jsx?$|\.tsx?$' + language: script + description: "Checks JS/TS code according to the package's linter configuration" + - repo: local + hooks: + - id: lint-config + name: "lint config files" + entry: /usr/bin/env npx prettier -c + files: '\.json$|\.yaml$|\.toml$' + language: script + description: "Checks config files according to the package's linter configuration" + - repo: local + hooks: + - id: lint-docs + name: "lint documentation files" + entry: /usr/bin/env npx prettier -c + files: '\.md$' + language: script + description: "Checks documentation files according to the package's linter configuration"