Skip to content

Commit 599f9a9

Browse files
committed
chore: pnpm + latest boilerplate
1 parent 8f8a173 commit 599f9a9

10 files changed

Lines changed: 5450 additions & 4222 deletions

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
dist
22
node_modules
3+
build
4+
tmp

.eslintrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
root: true,
3-
extends: '@block65',
3+
extends: ['@block65/eslint-config', '@block65/eslint-config/javascript'],
44
parserOptions: {
5-
project: './tsconfig.json',
5+
project: true,
66
},
77
};

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist
2+
build
3+
coverage
4+
tmp
5+
.vscode
6+
.idea
7+
pnpm-lock.yaml

Makefile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@ SRCS = $(wildcard lib/**)
33

44
all: dist
55

6+
.PHONY: deps
7+
deps: node_modules
8+
69
.PHONY: clean
710
clean:
8-
yarn tsc -b --clean
11+
pnpm tsc -b --clean
912

1013
.PHONY: test
1114
test:
12-
NODE_OPTIONS=--experimental-vm-modules yarn jest --watchAll
15+
NODE_OPTIONS=--experimental-vm-modules pnpm jest
1316

1417
node_modules: package.json
15-
yarn install
18+
pnpm install
1619

1720
dist: node_modules tsconfig.json $(SRCS)
18-
yarn tsc
21+
pnpm tsc
22+
23+
.PHONY: dist-watch
24+
dist-watch:
25+
pnpm tsc -w --preserveWatchOutput
1926

20-
.PHONY: dev
21-
dev:
22-
yarn tsc -w
27+
.PHONY: pretty
28+
pretty: node_modules
29+
pnpm eslint --fix .
30+
pnpm prettier --write .

babel.config.js renamed to babel.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
presets: [
33
['@babel/preset-env', { targets: { node: 'current' }, modules: false }],
44
['@babel/preset-typescript'],

jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export default {
2-
modulePathIgnorePatterns: ['<rootDir>/dist', '<rootDir>/__tests__/example.*'],
3-
testMatch: ['<rootDir>/__tests__/**/*.test.ts'],
2+
modulePathIgnorePatterns: ['<rootDir>/dist'],
3+
testMatch: ['<rootDir>/__tests__/**/*.test.[jt]s?(x)'],
44
moduleNameMapper: {
55
'^(\\..*)\\.jsx?$': '$1', // support for ts imports with .js extensions
66
},
7-
extensionsToTreatAsEsm: ['.ts'],
7+
extensionsToTreatAsEsm: ['.ts', '.tsx'],
88
};

0 commit comments

Comments
 (0)