diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8cbd70..1c14f1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,11 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run package:lib + - name: Install Dependencies + run: npm ci + - name: Check code style + run: npm run lint + - name: Build Package + run: npm run package:lib env: CI: true diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 687fc5a..bd7ce8b 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -16,6 +16,8 @@ jobs: uses: actions/checkout@v2 - name: Install Dependencies run: npm ci + - name: Check code style + run: npm run lint - name: Build Project run: npm run build - name: Semantic Release diff --git a/package.json b/package.json index d7a7cb7..20d1989 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "package:lib": "npm run build && cp ./package.json build && cd build && npm version \"5.0.0\" && npm pack", "publish:lib": "npm run build && cd build && npm publish", "lint:fix": "npx prettier --write 'src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}'", - "lint": "tslint -p tsconfig.json", + "lint": "npx prettier --check 'src/**/*.{ts,tsx,js,jsx,html,css,sass,less,json,yml,md,graphql}'", "test": "jest", "prepublishOnly": "cp -r ./build/* . && rm -rf ./build", "postpublish": "git clean -fd", @@ -41,7 +41,6 @@ "cp": "^0.2.0", "jest": "^25.5.4", "path": "^0.12.7", - "prettier": "^2.1.1", "rimraf": "^3.0.2", "semantic-release": "^17.1.1", "ts-jest": "^25.5.1",