From fb7fde6198dea327d27a503694da0fee6cdc384e Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Wed, 23 Dec 2020 17:32:32 +0530 Subject: [PATCH] enable linting via CI --- .github/workflows/lint.yml | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 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..9bb3003 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: Lint + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run lint diff --git a/package.json b/package.json index 810a0be..99e2667 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "TypeScript definitions for MediaWiki JS interface", "types": "index.d.ts", "scripts": { - "dtslint": "npx dtslint --localTs node_modules/typescript/lib ." + "lint": "npx dtslint --localTs node_modules/typescript/lib ." }, "repository": { "type": "git",