Skip to content

Commit

Permalink
chore: dependency updates and some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbieh committed Dec 30, 2019
1 parent 00a1935 commit 6383dd8
Show file tree
Hide file tree
Showing 9 changed files with 3,040 additions and 1,490 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
**/node_modules
**/public
src/frontend/config/env.js
**/build
*.d.ts
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: ['wiremore', 'wiremore/typescript'],
extends: ['@werkzeugkiste', '@werkzeugkiste/eslint-config/typescript'],
rules: {
'security/detect-object-injection': 0,
},
Expand Down
11 changes: 0 additions & 11 deletions .eslintrc.json

This file was deleted.

20 changes: 9 additions & 11 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"linters": {
"src/*.{js,ts}": [
"prettier --write",
"yarn lint --fix",
"yarn test --passWithNoTests",
"git add"
],
"src/*.ts": [
"yarn typecheck"
]
}
"src/*.{js,ts}": [
"prettier --write",
"yarn lint --fix",
"yarn test --passWithNoTests",
"git add"
],
"src/*.ts": [
"yarn typecheck"
]
}
65 changes: 33 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,40 @@
},
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/preset-typescript": "^7.3.3",
"@semantic-release/git": "^7.0.8",
"@semantic-release/npm": "^5.1.7",
"@types/jest": "^24.0.12",
"@types/node": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^1.7.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/preset-typescript": "^7.7.7",
"@semantic-release/git": "^7.0.18",
"@semantic-release/npm": "^5.3.5",
"@types/jest": "^24.0.25",
"@types/node": "^13.1.2",
"@typescript-eslint/eslint-plugin": "^2.14.0",
"@typescript-eslint/parser": "^2.14.0",
"@werkzeugkiste/eslint-config": "1.0.6",
"babel-eslint": "10.0.3",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.2.0",
"eslint-config-wiremore": "^3.0.2",
"eslint-import-resolver-typescript": "^1.1.1",
"eslint-plugin-babel": "^5.2.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^1.6.0",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-unicorn": "^8.0.2",
"husky": "^2.2.0",
"jest": "^24.8.0",
"lint-staged": "^8.1.6",
"prettier": "^1.17.0",
"rimraf": "^2.6.3",
"semantic-release": "^15.13.12",
"confusing-browser-globals": "1.0.9",
"eslint": "6.8.0",
"eslint-config-prettier": "^6.9.0",
"eslint-import-resolver-typescript": "2.0.0",
"eslint-plugin-babel": "5.3.0",
"eslint-plugin-import": "2.19.1",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-react": "7.17.0",
"eslint-plugin-react-hooks": "2.3.0",
"eslint-plugin-security": "1.4.0",
"eslint-plugin-unicorn": "15.0.1",
"husky": "^3.1.0",
"jest": "^24.9.0",
"lint-staged": "^9.5.0",
"prettier": "1.19.1",
"rimraf": "^3.0.0",
"semantic-release": "^15.14.0",
"semantic-release-conventional-commits": "^2.0.1",
"typescript": "^3.4.5",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.2"
"typescript": "3.7.4",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
}
}
2 changes: 1 addition & 1 deletion src/getCoordinateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getCoordinateKey = <Keys>(
throw new Error(`'${point}' is no valid coordinate.`);
}
if (
point.hasOwnProperty(key) &&
Object.prototype.hasOwnProperty.call(point, key) &&
typeof key !== 'undefined' &&
typeof foundKey === 'undefined'
) {
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export { default as getLongitude } from './getLongitude';
export { default as getPathLength } from './getPathLength';
export { default as getPreciseDistance } from './getPreciseDistance';
export { default as getRhumbLineBearing } from './getRhumbLineBearing';
export {
default as getRoughCompassDirection,
} from './getRoughCompassDirection';
export { default as getRoughCompassDirection } from './getRoughCompassDirection';
export { default as getSpeed } from './getSpeed';
export { default as isDecimal } from './isDecimal';
export { default as isPointInLine } from './isPointInLine';
Expand Down
17 changes: 15 additions & 2 deletions src/orderByDistance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,25 @@ describe('orderByDistance', () => {
[1, 37],
[1, 4],
])
).toEqual([[1, 2], [1, 4], [1, 12], [1, 15], [1, 37], [1, 74]]);
).toEqual([
[1, 2],
[1, 4],
[1, 12],
[1, 15],
[1, 37],
[1, 74],
]);
});

it('should use an optional getDistance function', () => {
const origin = [1, 1];
const dest = [[30, 28], [5, 0], [20, 17], [40, 39], [10, 6]];
const dest = [
[30, 28],
[5, 0],
[20, 17],
[40, 39],
[10, 6],
];
const subtractLatFromLon = (origin, dest) => dest[0] - dest[1];
expect(orderByDistance(origin, dest, subtractLatFromLon)).toEqual([
[40, 39],
Expand Down
Loading

0 comments on commit 6383dd8

Please sign in to comment.