diff --git a/.eslintignore b/.eslintignore index f54646e..891be35 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,3 +3,6 @@ dist yarn-error.log *.json lib/ +example/ +playground/ +docs/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..99ff7db --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + + - run: yarn install --frozen-lockfile + + - run: yarn test + - run: yarn tsc + - run: yarn lint + - run: yarn build + - run: yarn tsd diff --git a/README.md b/README.md index b87be45..a4ba405 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ **Type safe** and **Zero-cost** React library to work with higher-order components (HOCs) [![NPM version](https://img.shields.io/npm/v/react-with-hoc)](https://www.npmjs.com/package/react-with-hoc) -[![Build](https://github.com/leobastiani/react-with-hoc/actions/workflows/publish.yml/badge.svg)](https://github.com/leobastiani/react-with-hoc/actions/workflows/publish.yml) +[![Build](https://github.com/leobastiani/react-with-hoc/actions/workflows/test.yml/badge.svg)](https://github.com/leobastiani/react-with-hoc/actions/workflows/test.yml) ![Typescript](https://img.shields.io/npm/types/react-with-hoc) [![Bundle size](https://img.shields.io/bundlephobia/minzip/react-with-hoc)](https://bundlephobia.com/package/react-with-hoc) [![Bundle dependency](https://badgen.net/bundlephobia/dependency-count/react-with-hoc)](https://www.npmjs.com/package/react-with-hoc?activeTab=dependencies) diff --git a/package.json b/package.json index e6e7db5..232d9bb 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "build": "yarn clean && bin/build-cjs && bin/build-esm && yarn build:types && bin/generate-mappings", "build:types": "npx tsc --outDir lib/module --emitDeclarationOnly --project tsconfig.build.json", "clean": "rimraf lib", - "lint": "eslint . --max-warnings=0", + "lint": "eslint . --max-warnings=0 --report-unused-disable-directives", "prepublishOnly": "yarn clean && yarn build && yarn test && yarn tsc && yarn lint && yarn tsd", "test": "jest", "tsc": "tsc --noEmit",