Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0.0] '--rulesdir' option doesn't work if a config file has 'root:true' #11888

Closed
mysticatea opened this issue Jun 24, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@mysticatea
Copy link
Member

commented Jun 24, 2019

Tell us about your environment

  • ESLint Version: 6.0.0
  • Node Version: 12.2.0
  • npm Version: 6.9.0

What parser (default, Babel-ESLint, etc.) are you using?

Default.

Please show your full configuration:

module.exports = {
    root: true,
    rules: {
        test: "error"
    }
};
// internal-rules/test.js
const { Linter } = require("eslint")
const linter = new Linter()
const rules = linter.getRules()

module.exports = rules.get("no-console")

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

console.log("hello")
eslint test.js --rulesdir internal-rules

What did you expect to happen?

The test rule in the internal-rules directory warns the code.

What actually happened? Please include the actual, raw output from ESLint.

C:\Users\t-nagashima.AD\dev\sandbox\test.js
  1:1  error  Definition for rule 'test' was not found  test

✖ 1 problem (1 error, 0 warnings)

Are you willing to submit a pull request to fix this bug?

Yes.

mysticatea added a commit that referenced this issue Jun 24, 2019

not-an-aardvark added a commit that referenced this issue Jun 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.