Skip to content

Commit

Permalink
Housekeeping: Refactor code and make code coverage to 100% (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennypradipta authored Jun 3, 2024
1 parent 940bd9a commit c2f10e3
Show file tree
Hide file tree
Showing 10 changed files with 268 additions and 140 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ module.exports = {
env: {
browser: true,
es2021: true,
node: true,
node: true
},
extends: 'standard-with-typescript',
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
project: './tsconfig.json'
},
ignorePatterns: ['dist/**/*', 'tests/**/*'],
rules: {
'@typescript-eslint/comma-dangle': 'off',
'@typescript-eslint/semi': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
},
'@typescript-eslint/indent': 'off'
}
}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

npm run format
npm run lint:fix
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"trailingComma": "none",
"useTabs": false
}
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
testEnvironment: 'node'
}
59 changes: 52 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"start": "tsc && node dist/index.js",
"build": "tsc",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"format": "prettier --write src/*",
"format:check": "prettier --check src/*",
"test": "jest --runInBand",
Expand Down Expand Up @@ -47,7 +48,8 @@
"dependencies": {
"@types/node": "^20.2.3",
"debug": "^4.3.4",
"node-fetch": "^2.6.11",
"jest-fetch-mock": "^3.0.3",
"node-fetch": "^2.7.0",
"node-html-parser": "^6.1.13"
}
}
Loading

0 comments on commit c2f10e3

Please sign in to comment.