fs_1.default.existsSync is not a function
Provide a broad description of the bug.
Reduced test-case
import { HtmlValidate } from "html-validate"
const htmlvalidate = new HtmlValidate({extends: ["html-validate:recommended"], root: true});
const report = htmlvalidate.validateString("<div>lorem ipsum</span>");
Configuration
{extends: ["html-validate:recommended"], root: true}
Expected result
I expect to get report with results
Actual result
The code is failing when trying to load config. html-validate/dist/config/config.js
527 | // eslint-disable-next-line no-constant-condition
528 | while (true) {
529 | const search = path_1.default.join(current, "package.json");
> 530 | if (fs_1.default.existsSync(search)) {
| ^ 531 | return (rootDirCache = current);
532 | }
533 | /* get the parent directory */
80 | };
81 | this.config = mergeInternal(initial, options || {});
82 | this.metaTable = null;
> 83 | this.rootDir = this.findRootDir();
| ^ 84 | this.initialized = false;
85 | /* load plugins */
86 | this.plugins = this.loadPlugins(this.config.plugins || []);
Version
-
html-validate
: 4.6.0
Edited by Evghenii G