Using `CLIEngine` Options for Defining a Configuration are not Fully Explained in the Docs.
See original GitHub issueWhat version of ESLint are you using?
eslint v3.0.0
What parser (default, Babel-ESLint, etc.) are you using?
default parser
Please show your full configuration:
(loaded via the CLIEngine
options)
{
'parserOptions': {
'ecmaVersion': 6,
'ecmaFeatures': {
'jsx': true,
'impliedStrict': true
},
env: {
'es6': true,
'node': true,
'mocha': true,
'browser': true
},
rules: {
// all rules are included
}
}
What did you do? Please include the actual source code causing the issue.
I’m trying to correctly configure the CLIEngine
in a project without a root .eslintrc.* or eslintConfig
property in package.json, but does contain a nested .eslintrc.* file. From what I understand from the docs, the 3 available options for my scenario are configFile
, baseConfig
and useSpecificConfig
.
Can anyone validate that these are the expected results?
baseConfig
has lower precedence than project root .eslintrc.* file (including descendent .eslintrc.* files). Therefore, the object passed tobaseConfig
can be extended (this not addressed in Configuration Cascading and Hierarchy)?baseConfig
does not satisfy the “requires configuration to run” rule.useSpecificConfig
does not satisfy the “requires configuration to run” rule (the opposite is stated in Requiring Configuration to Run).useSpecificConfig
only accepts an object (this option is not documented in the CLIEngine section).
What did you expect to happen?
a. I expected useSpecificConfig
to satisfy the “requires configuration to run” rule.
b. I expected to ascertain the precedence of useSpecificConfig
since it’s not documented.
c. I expected that baseConfig
would satisfy the “requires configuration to run” rule as it represents a configuration.
What actually happened? Please include the actual, raw output from ESLint.
The opposite results of what is stated in points a, b and c above.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:17 (17 by maintainers)
Top GitHub Comments
Alright folks, I’ll work on this. Here’s how I’m going to do this:
useSpecificConfig
).baseConfig
as a configuration and add that information to the migration guide.Let me know if there are any questions or concerns with this approach.
@nzakas Now that #6618 is merged, I should be able to open the second PR today or tonight. I’ve already committed the changes to a branch.
EDIT: This is done, see #6625.