Skip to content

Commit

Permalink
Update Tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez committed Aug 14, 2023
1 parent beec671 commit 5888d9e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 24 deletions.
16 changes: 3 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
{
"settings": {
"import/resolver": {
"node": {
"paths": ["./src"]
}
}
},
"env": {
"es6": true,
"jest": true
},
"extends": "eslint-config-unosquare",
"plugins": ["prettier"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"parser": "@typescript-eslint/parser",
"plugins": ["prettier", "@typescript-eslint"],
"rules": {
"no-extend-native": 0,
"no-param-reassign": 0,
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"test": "jest --runInBand",
"cest": "jest --collectCoverage --runInBand",
"lint": "eslint src/**/*.{js,ts}",
"lint:fix": "eslint src/**/*.{js,ts} --fix",
"lint": "eslint src/**/*.ts",
"lint:fix": "eslint src/**/*.ts --fix",
"build": "tsc",
"watch": "tsc -w",
"preparepackage": "npm run build && npm run copypackage",
Expand Down Expand Up @@ -71,7 +71,6 @@
"devDependencies": {
"@types/jest": "^29.5.3",
"eslint": "^8.47.0",
"eslint-config-unosquare": "^0.3.2",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
Expand Down
6 changes: 1 addition & 5 deletions src/nameof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ export const sumByName = <T>(data: T[], name: Extract<keyof T, string>, callBack
return selectNumberByName(data, name).reduce((acc, item) => innerCallback(acc + item), 0);
};

export const sumBy = <T>(
data: T[],
selector: (obj: T) => number,
callBack?: (x: number) => number,
): number => {
export const sumBy = <T>(data: T[], selector: (obj: T) => number, callBack?: (x: number) => number): number => {
const innerCallback = callBack || identity;
return selectNumberBy(data, selector).reduce((acc, item) => innerCallback(acc + item), 0);
};
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": { "*": ["types/*"] },
"target": "es6",
"lib": ["dom", "dom.iterable", "esnext"],
"target": "ES2016",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
Expand Down

0 comments on commit 5888d9e

Please sign in to comment.