I'd really like to see the cascading functionality within a single .eslintrc file:
{
"includes": "**/*.js",
"rules": { "indent": [ 2, 4, { "SwitchCase": 1 }] },
"children": [
{
// overrides the parent includes and excludes for these rules
"includes": ["src/components/**/*.js", "src/routes/**/client.js"],
"excludes": ["*.min.js"],
"ecmaFeatures": { "modules": true },
"children": [
// additional children
]
},
{
"includes": "src/routes/**/server.js",
"ecmaFeatures": { "modules": false },
}
]
}
The proposal would add three additional properties to the config
- the optional "includes" glob property to which the entire parent rule tree would be applied
- the optional "excludes" glob property to which the entire parent rule tree would be excluded
- an optional "children" property which would be an array of children configurations. These would cascade in the same manner that actual .eslintrc files do currently
Cascaded actual .eslintrc files with "includes" and "excludes" properties would simply override the parents.