Skip to content

Commit

Permalink
Merge pull request #338 from Fdawgs/chore/tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Nov 29, 2023
2 parents 31972e5 + 162716c commit 0342c28
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 24 deletions.
10 changes: 1 addition & 9 deletions .eslintrc.js
Expand Up @@ -12,7 +12,6 @@ module.exports = {
"plugin:promise/recommended",
"plugin:regexp/recommended",
"plugin:security/recommended",
"plugin:security-node/recommended",
"prettier",
],
overrides: [
Expand Down Expand Up @@ -40,14 +39,7 @@ module.exports = {
// Explicitly tell ESLint to parse JavaScript as CommonJS, as airbnb-base sets this to "modules" for ECMAScript
sourceType: "script",
},
plugins: [
"import",
"jsdoc",
"promise",
"regexp",
"security",
"security-node",
],
plugins: ["import", "jsdoc", "promise", "regexp", "security"],
root: true,
rules: {
"@eslint-community/eslint-comments/disable-enable-pair": "off",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -57,10 +57,10 @@ const { UnRTF } = require("node-unrtf");

### Async Await

Example of an `async` `await` call to convert an RTF file to HTML, and then output the result to console:
Example of an `async` `await` call to convert an RTF file to HTML in an ESM environment:

```js
const { UnRTF } = require("node-unrtf");
import { UnRTF } from "node-unrtf";

const file = "test_document.rtf";
const unRtf = new UnRTF();
Expand All @@ -74,7 +74,7 @@ console.log(res);

### Promise chaining

Example of calling unRTF.convert with a promise chain:
Example of calling unRTF.convert with a promise chain in a CJS environment:

```js
const { UnRTF } = require("node-unrtf");
Expand Down
19 changes: 9 additions & 10 deletions package.json
Expand Up @@ -70,28 +70,27 @@
"testTimeout": 10000
},
"devDependencies": {
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
"@types/jest": "^29.5.5",
"eslint": "^8.50.0",
"@types/jest": "^29.5.10",
"eslint": "^8.54.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jest": "^27.4.0",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-jsdoc": "^46.9.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-regexp": "^2.1.1",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-security-node": "^1.1.1",
"husky": "^8.0.3",
"is-html": "^2.0.0",
"jest": "^29.7.0",
"jsdoc-to-markdown": "^8.0.0",
"license-checker": "^25.0.1",
"prettier": "^3.0.3",
"prettier": "^3.1.0",
"spdx-copyleft": "^1.0.0",
"typescript": "^5.2.2"
"typescript": "^5.3.2"
},
"dependencies": {
"semver": "^7.5.4",
Expand Down
4 changes: 2 additions & 2 deletions src/index.test.js
Expand Up @@ -115,11 +115,11 @@ describe("Convert function", () => {
{ outputVt: true },
]);

const unRtf = new UnRTF(testBinaryPath);

expect.assertions(optionCombos.length);
await Promise.all(
optionCombos.map(async (options) => {
const unRtf = new UnRTF(testBinaryPath);

await expect(
unRtf.convert(file, options)
).resolves.toStrictEqual(expect.any(String));
Expand Down

0 comments on commit 0342c28

Please sign in to comment.