-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: export meta object * Create hungry-geckos-dance.md * fix * fix
- Loading branch information
Showing
5 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"eslint-plugin-json-schema-validator": minor | ||
--- | ||
|
||
feat: export meta object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder | ||
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- Get meta data | ||
export const { name, version } = require("../package.json"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import assert from "assert"; | ||
import plugin from "../../src"; | ||
import { version } from "../../package.json"; | ||
const expectedMeta = { | ||
name: "eslint-plugin-json-schema-validator", | ||
version, | ||
}; | ||
|
||
describe("Test for meta object", () => { | ||
it("A plugin should have a meta object.", () => { | ||
assert.strictEqual(plugin.meta.name, expectedMeta.name); | ||
assert.strictEqual(plugin.meta.version, expectedMeta.version); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters