From 8c390ac77367e2bdbc0af1d32e68ab896b03af71 Mon Sep 17 00:00:00 2001 From: "Alex M. - Clockwork" Date: Tue, 30 Jan 2024 10:27:57 +0200 Subject: [PATCH] feat: Add linting scripts and workflow --- .github/workflows/lint.yml | 27 +++++++++++++++++++++++++++ package.json | 2 ++ src/index.ts | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9eef5ed --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,27 @@ +name: Linting + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + + +jobs: + lint: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Use Node.js 20 + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Lint + run: pnpm lint diff --git a/package.json b/package.json index d891bbd..2002dd1 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "build": "tsc", "coverage": "vitest run --coverage", "dev": "vitest", + "lint": "eslint -c .eslintrc.js './src/**/*.ts' --ignore-path .gitignore", + "lint:fix": "eslint -c .eslintrc.js './src/**/*.ts' --fix --ignore-path .gitignore", "test": "vitest run" }, "keywords": [], diff --git a/src/index.ts b/src/index.ts index ccaf054..178cd64 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1 @@ -export * from './utils' \ No newline at end of file +export * from "./utils";