Skip to content

Commit f5b33c8

Browse files
committed
fix: cleaned up editor configs. added job schema to package export
1 parent 2893026 commit f5b33c8

File tree

5 files changed

+32
-31
lines changed

5 files changed

+32
-31
lines changed

.editorconfig

-18
This file was deleted.

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true
3+
}
4+

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright © 2014 JSON Resume
3+
Copyright © 2024 JSON Resume
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ The current working version of the schema is `v1.0.0` that is represented by the
1515

1616
All PR's for the next version should be made against the `develop` branch.
1717

18-
This enforces that the schema package, always has the official stable release of the schema.
18+
This enforces that the schema package always has the official stable release of the schema.
19+
20+
### Homepage and Registry
21+
22+
If you are looking for the homepage, registry, tooling or themes, see the JSON Resume monorepo
23+
24+
[@jsonresume/jsonresume.org](https://github.com/jsonresume/jsonresume.org/)
25+
1926

2027
### Getting started
2128

@@ -26,9 +33,9 @@ npm install --save @jsonresume/schema
2633
To use
2734

2835
```js
29-
const resumeSchema = require("@jsonresume/schema");
36+
import resumeSchema from '@jsonresume/schema';
3037
resumeSchema.validate(
31-
{ name: "Thomas" },
38+
{ basics: { name: "Thomas" } },
3239
function (err, report) {
3340
if (err) {
3441
console.error("The resume was invalid:", err);
@@ -42,12 +49,12 @@ resumeSchema.validate(
4249
);
4350
```
4451

45-
More likely
52+
Or against a full `resume.json`
4653

4754
```js
48-
var fs = require("fs");
49-
var resumeSchema = require("resume-schema");
50-
var resumeObject = JSON.parse(fs.readFileSync("resume.json", "utf8"));
55+
import fs = require('fs');
56+
import schema from 'resume-schema';
57+
const resumeObject = JSON.parse(fs.readFileSync('./resume.json', 'utf8'));
5158
resumeSchema.validate(resumeObject);
5259
```
5360

@@ -87,6 +94,12 @@ Pull requests titles should be formatted as such
8794

8895
A draft schema for job descriptions is available in this project as well. It is not yet finalized, but we encourage you to check it out and provide feedback. See `job-schema.json` and `sample.job.json`.
8996

97+
The JSON Job schema is available from:
98+
99+
```js
100+
require("resume-schema").jobSchema;
101+
```
102+
90103
### Other resume standards
91104

92105
- [HR-XML](https://schemas.liquid-technologies.com/HR-XML/2007-04-15/)

validator.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
"use strict";
2-
var schema = require("./schema");
3-
var Validator = require("jsonschema").Validator;
1+
'use strict';
2+
const schema = require('./schema');
3+
const jobSchema = require('./job-schema');
4+
const Validator = require('jsonschema').Validator;
45

56
function validate(resumeJson, callback) {
6-
var v = new Validator();
7+
const v = new Validator();
78

89
const validation = v.validate(resumeJson, schema);
910

@@ -16,5 +17,6 @@ function validate(resumeJson, callback) {
1617

1718
module.exports = {
1819
validate: validate,
19-
schema: schema,
20+
schema,
21+
jobSchema,
2022
};

0 commit comments

Comments
 (0)