Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
- eslint flat config
- built in node test runner
  • Loading branch information
dangowans committed May 27, 2024
1 parent 7e57761 commit cd06ac4
Show file tree
Hide file tree
Showing 13 changed files with 1,188 additions and 781 deletions.
3 changes: 1 addition & 2 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ name = "javascript"

[analyzers.meta]
environment = [
"nodejs",
"mocha"
"nodejs"
]

[[analyzers]]
Expand Down
10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install Package
run: |
npm ci
npm install -g mocha c8
npm install -g c8
- name: Code Climate (Before)
if: ${{ github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
Expand All @@ -38,7 +38,7 @@ jobs:
./codeclimate-test-reporter before-build
- name: Run Coverage Testing
run: c8 --reporter=lcov --reporter=text --reporter=text-summary mocha
run: npm run coverage

- name: Code Climate (After)
if: ${{ always() && github.event_name != 'pull_request' && env.CC_TEST_REPORTER_ID != '' && matrix.node == 20 }}
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ test
_config.yml
.deepsource.toml
.eslintignore
.eslintrc.json
.gitignore
.npmignore
.prettierignore
.prettierrc.json
eslint.config.*
tsconfig.json
1 change: 1 addition & 0 deletions eslint.config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-cityssm';
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-cityssm';
1 change: 1 addition & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-cityssm'
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export function getDayOfYear(date, startAtZero = false) {
const year = date.getFullYear();
const januaryFirst = new Date(year, 0, 1);
const givenDate = new Date(year, date.getMonth(), date.getDate());
return (Math.round((givenDate.getTime() - januaryFirst.getTime()) / 86400000) +
return (Math.round((givenDate.getTime() - januaryFirst.getTime()) / 86_400_000) +
(startAtZero ? 0 : 1));
}
export function toModernJulianDate(date) {
Expand Down
Loading

0 comments on commit cd06ac4

Please sign in to comment.