eslint-community / eslint-community/eslint-plugin-rulesdir
initialization doesn't work in VS Code
- Dominant language
- JavaScript
- Stars
- 53
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
OS: win 7
VS Code Version: 1.27.2
Using [Microsoft/vscode-eslint](https://github.com/Microsoft/vscode-eslint) extension.
throws:
```
[Error - 5:35:09 PM] Error: To use eslint-plugin-rulesdir, you must load it beforehand and set the `RULES_DIR` property on the module to a string.
at Object.get rules [as rules] (\node_modules\eslint-plugin-rulesdir\index.js:24:13)
at Rules.importPlugin (\node_modules\eslint\lib\rules.js:97:20)
at Plugins.define (\node_modules\eslint\lib\config\plugins.js:55:21)
at Plugins.load (\node_modules\eslint\lib\config\plugins.js:143:18)
at Array.forEach ()
at Plugins.loadAll (\node_modules\eslint\lib\config\plugins.js:166:21)
at loadFromDisk (\node_modules\eslint\lib\config\config-file.js:501:35)
at Object.load (\node_modules\eslint\lib\config\config-file.js:559:20)
at Config.getLocalConfigHierarchy (\node_modules\eslint\lib\config.js:227:44)
at Config.getConfigHierarchy (\node_modules\eslint\lib\config.js:179:43)
```
root `.eslintrc.js`:
```js
const rulesDirPlugin = require("eslint-plugin-rulesdir");
rulesDirPlugin.RULES_DIR = "eslint-rules";
module.exports = {
"parser": "babel-eslint",
"plugins": [
"rulesdir"
],
"rules": {
"rulesdir/spaced-comment-line": [ "warn", "always" ]
}
};
```
In Atom, this setup works fine.
To be honest, this is probably the extension's problem, but wanted to ensure it's not `eslint-plugin-rulesdir`'s problem before opening an issue over there.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the root .eslintrc.js and the stack-trace entry at node_modules/eslint-plugin-rulesdir/index.js, then reproduce the error through Microsoft/vscode-eslint using the shown configuration. Done means determining whether VS Code can initialize this configuration without the RULES_DIR error, with behavior matching the working Atom setup; no project test is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100