Currently the plugin errors if you create a '.remarkrc.js' file: Cannot find module './.remarkrc.js'
The issue is that require resolves relative to the current file, while fs.exists resolves relative to cwd. The require wasn't reading the same path as the fs.exists, instead it was trying to read the file relative to this file i.e. ./node_modules/eslint-plugin-md/lib/rules/.remarkrc.js.
Currently the plugin errors if you create a '.remarkrc.js' file:
Cannot find module './.remarkrc.js'
The issue is thatrequire
resolves relative to the current file, whilefs.exists
resolves relative to cwd. Therequire
wasn't reading the same path as thefs.exists
, instead it was trying to read the file relative to this file i.e../node_modules/eslint-plugin-md/lib/rules/.remarkrc.js
.