Skip to content

Commit 20e6cce

Browse files
committed
Merge branch 'develop'
2 parents 7ddba22 + f728fd9 commit 20e6cce

File tree

11 files changed

+326
-505
lines changed

11 files changed

+326
-505
lines changed

.eslintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
],
66
"extends": [
77
"eslint:recommended",
8+
"airbnb-base",
89
"plugin:@typescript-eslint/eslint-recommended",
9-
"plugin:@typescript-eslint/recommended",
10-
"airbnb-base"
10+
"plugin:@typescript-eslint/recommended"
1111
],
1212
"settings": {
1313
"import/resolver": {

.github/workflows/ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@ jobs:
1414
test:
1515
name: Test
1616
runs-on: ubuntu-18.04
17+
strategy:
18+
matrix:
19+
node-version: [12.x, 13.x, 14.x]
20+
env:
21+
HUSKY: 0
1722
steps:
1823
- name: Checkout repo
19-
uses: actions/checkout@master
20-
- name: Setup Node.js version
21-
uses: actions/setup-node@master
24+
uses: actions/checkout@main
25+
- name: Setup Node.js version ${{ matrix.node-version }}
26+
uses: actions/setup-node@main
2227
with:
23-
node-version: '12.16.1'
28+
node-version: ${{ matrix.node-version }}
2429
- name: Get yarn cache directory path
2530
id: yarn-cache-dir-path
2631
run: echo "::set-output name=dir::$(yarn cache dir)"
@@ -38,6 +43,9 @@ jobs:
3843
- name: Install dependencies
3944
run: |
4045
yarn install --frozen-lockfile
46+
- name: List webpack version
47+
run: |
48+
yarn list --depth=0
4149
- name: Build package
4250
run: |
4351
yarn build

.github/workflows/rebase.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-18.04
1010
steps:
1111
- name: Checkout the latest code
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@main
1313
with:
1414
fetch-depth: 0
1515
- name: Automatic Rebase

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111

1212
steps:
1313
- name: Checkout repo
14-
uses: actions/checkout@master
14+
uses: actions/checkout@main
1515
- name: Setup Node.js version
16-
uses: actions/setup-node@master
16+
uses: actions/setup-node@main
1717
with:
1818
node-version: '12.16.1'
1919

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.huskyrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"build": "rm -rf ./dist && tsc --build --force --verbose",
88
"lint": "eslint --ext .ts,js src",
9-
"prepare": "install-peers",
9+
"prepare": "husky install && install-peers",
1010
"first-release": "npx standard-version --commit-all --tag-prefix v --first-release",
1111
"release": "npx standard-version --commit-all --tag-prefix v",
1212
"extract-latest-change-log": "node scripts/extractLatestChangeLog.js"
@@ -30,19 +30,20 @@
3030
"inline-script"
3131
],
3232
"devDependencies": {
33-
"@commitlint/cli": "^11.0.0",
34-
"@commitlint/config-conventional": "^11.0.0",
33+
"@commitlint/cli": "^12.0.0",
34+
"@commitlint/config-conventional": "^12.0.0",
3535
"@types/html-webpack-plugin": "^3.2.3",
3636
"@types/webpack": "^4.41.26",
3737
"@types/webpack-sources": "^1.4.0",
3838
"@typescript-eslint/eslint-plugin": "^4.0.0",
39-
"@typescript-eslint/parser": "^3.6.0",
39+
"@typescript-eslint/parser": "^4.15.2",
4040
"eslint": "^7.4.0",
4141
"eslint-config-airbnb-base": "^14.2.0",
4242
"eslint-plugin-import": "^2.22.0",
43-
"husky": "3.1.0",
43+
"husky": "^5.1.2",
4444
"install-peers-cli": "^2.2.0",
4545
"lint-staged": "^10.2.11",
46+
"pinst": "^2.1.6",
4647
"prettier": "^2.0.5",
4748
"typescript": "^4.1.3"
4849
},

src/HtmlInlineScriptPlugin.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { Compiler } from 'webpack';
2-
import { RawSource } from 'webpack-sources'; // eslint-disable-line import/no-extraneous-dependencies
3-
import htmlWebpackPlugin, { HtmlTagObject } from 'html-webpack-plugin';
1+
import type { Compiler, Plugin } from 'webpack';
2+
import type { RawSource } from 'webpack-sources';
3+
import htmlWebpackPlugin from 'html-webpack-plugin';
4+
import type { HtmlTagObject } from 'html-webpack-plugin';
45
import { PLUGIN_PREFIX } from './constants';
56

6-
class HtmlInlineScriptPlugin {
7+
class HtmlInlineScriptPlugin implements Plugin {
78
tests: RegExp[];
89

910
constructor(tests?: RegExp[]) {

0 commit comments

Comments
 (0)