Skip to content

Commit

Permalink
Tiny improvements in order of require
Browse files Browse the repository at this point in the history
  • Loading branch information
edi9999 committed Jan 24, 2025
1 parent dacae41 commit 51ae8aa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions es6/memory-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const fs = require("fs");

const PizZip = require("pizzip");
const Docxtemplater = require("./docxtemplater.js");

const fs = require("fs");
const Docxtemplater = require("./docxtemplater.js");

const zip = new PizZip(fs.readFileSync("examples/memory-stress.docx"));
const doc = new Docxtemplater(zip, { paragraphLoop: true });
Expand Down
3 changes: 2 additions & 1 deletion es6/modules/rawxml.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ const {
getInvalidRawXMLValueException,
} = require("../errors.js");

const moduleName = "rawxml";
const wrapper = require("../module-wrapper.js");

const moduleName = "rawxml";

function getInner({ part, left, right, postparsed, index }) {
const paragraphParts = postparsed.slice(left + 1, right);
for (let i = 0, len = paragraphParts.length; i < len; i++) {
Expand Down
6 changes: 4 additions & 2 deletions es6/modules/render.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const wrapper = require("../module-wrapper.js");
const { getScopeCompilationError } = require("../errors.js");
const {
getScopeCompilationError,
getCorruptCharactersException,
} = require("../errors.js");
const {
utf8ToWord,
hasCorruptCharacters,
removeCorruptCharacters,
} = require("../doc-utils.js");
const { getCorruptCharactersException } = require("../errors.js");

const {
settingsContentType,
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ export default [
"import/no-cycle": 2,
"import/no-unresolved": 2,
"import/extensions": [2, "always"],
"no-duplicate-imports": 2,
"import/no-duplicates": ["error", { considerQueryString: true }],
"dot-location": [2, "property"],
"dot-notation": 2,
"eol-last": 2,
Expand Down

0 comments on commit 51ae8aa

Please sign in to comment.