diff options
-rw-r--r-- | .config/eslint/annotations_formatter.js (renamed from annotations_formatter.js) | 0 | ||||
-rw-r--r-- | .config/husky/.gitignore | 1 | ||||
-rw-r--r-- | .config/husky/pre-commit | 4 | ||||
-rw-r--r-- | .github/workflows/test_and_lint.yml | 2 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | package.json | 8 |
6 files changed, 10 insertions, 8 deletions
diff --git a/annotations_formatter.js b/.config/eslint/annotations_formatter.js index b3a421d..b3a421d 100644 --- a/annotations_formatter.js +++ b/.config/eslint/annotations_formatter.js diff --git a/.config/husky/.gitignore b/.config/husky/.gitignore new file mode 100644 index 0000000..c9cdc63 --- /dev/null +++ b/.config/husky/.gitignore @@ -0,0 +1 @@ +_
\ No newline at end of file diff --git a/.config/husky/pre-commit b/.config/husky/pre-commit new file mode 100644 index 0000000..101f7b9 --- /dev/null +++ b/.config/husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint
\ No newline at end of file diff --git a/.github/workflows/test_and_lint.yml b/.github/workflows/test_and_lint.yml index 4767b3e..83e5cc1 100644 --- a/.github/workflows/test_and_lint.yml +++ b/.github/workflows/test_and_lint.yml @@ -44,4 +44,4 @@ jobs: run: yarn install - name: Lint - run: yarn run eslint --ext .ts,.tsx --format ./annotations_formatter.js src/ + run: yarn run eslint --ext .ts,.tsx --format .config/eslint/annotations_formatter.js src/ @@ -11,7 +11,8 @@ The project uses [yarn](https://yarnpkg.com/) for dependency and script manageme and [webpack](https://webpack.js.org/) for building and development. A full setup guide is available on [Notion](https://www.notion.so/pythondiscord/Forms-6312360495ff45f487da5b1924184a2d), -along with a troubleshooting guide. +along with a troubleshooting guide.<br/> +Run `yarn install --dev` and `yarn run pre-commit` to setup your dev environment. ## React & Dependency Info ### Project Info diff --git a/package.json b/package.json index baa257e..cbf8293 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "start": "webpack serve --node-env=development", "build": "webpack", "test": "jest", - "lint": "eslint --cache src/" + "lint": "eslint --cache src/", + "pre-commit": "husky install .config/husky" }, "eslintConfig": { "extends": "react-app" @@ -76,10 +77,5 @@ "jest-svg-transformer": "1.0.0", "jest-watch-typeahead": "0.6.1", "webpack-dev-server": "3.11.2" - }, - "husky": { - "hooks": { - "pre-commit": "yarn lint" - } } } |