Skip to content

Commit

Permalink
chore: Add lint:fix script and fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Feb 9, 2023
1 parent 62c0f35 commit cc1ce08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"build": "rollup -c && tsc",
"prepare": "npm run build",
"lint": "eslint src/ tests/",
"lint:fix": "eslint --fix src/ tests/",
"pretest": "npm run build",
"test": "c8 mocha tests/*.test.js"
},
Expand Down
2 changes: 1 addition & 1 deletion src/astro-jekyll.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Data
//-----------------------------------------------------------------------------

const DATETIME = /^(\d{4})-(\d{2})-(\d{2})(?:\s+(\d{2})(?::(\d{2})(?::(\d{2}))?)?(?:\s*([+-]\d{4}))?)?/
const DATETIME = /^(\d{4})-(\d{2})-(\d{2})(?:\s+(\d{2})(?::(\d{2})(?::(\d{2}))?)?(?:\s*([+-]\d{4}))?)?/;

/**
* Parses a Jekyll-formatted datetime into a JavaScipt Date object.
Expand Down
2 changes: 1 addition & 1 deletion tests/astro-jekyll.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("parseJekyllDateTime()", () => {
it(`should return undefined for invalid datetime string: "${input}"`, () => {
expect(parseJekyllDateTime(input)).to.be.undefined;
});
})
});

it("should add hours automatically when not supplied", () => {
const input = "2023-01-02";
Expand Down

0 comments on commit cc1ce08

Please sign in to comment.