Skip to content

Commit

Permalink
test: introduce size-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
slavik-chapelskyi committed Nov 3, 2023
1 parent 46794c9 commit 234da51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ jobs:
- checkout
- install_deps
- run: yarn test
- run: yarn type-check
- run: yarn build
- run: yarn lint:ci
- run: yarn lint:size
6 changes: 1 addition & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
"root": true,
"extends": [
"@shelf/eslint-config/typescript"
],
"rules": {
"jest/no-identical-title": "off",
"@typescript-eslint/no-empty-function": "off"
}
]
}
4 changes: 4 additions & 0 deletions .size-limit.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = [{
path: "lib/index.js",
limit: "1.9 KB"
}];
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"coverage": "yarn test --coverage",
"lint": "yarn lint:ci --fix",
"lint:ci": "eslint . --ext .js,.ts,.json",
"lint:size": "size-limit",
"prepack": "yarn build",
"test": "TZ=UTC jest src",
"type-check": "tsc --noEmit",
Expand All @@ -38,7 +39,10 @@
]
},
"prettier": "@shelf/prettier-config",
"dependencies": {},
"dependencies": {
"@size-limit/preset-small-lib": "10.0.2",
"size-limit": "10.0.2"
},
"devDependencies": {
"@babel/cli": "7.22.5",
"@babel/core": "7.22.5",
Expand Down

0 comments on commit 234da51

Please sign in to comment.