-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
The version of ESLint you are using.
v5.5.0
The problem you want to solve.
It's currently only possible to specify the extensions of the files to lint with the --ext
CLI flag. This creates an annoying user-experience for sharable configs that adds support for non-JS environments. For example, if someone wants to use my eslint-config-xo-typescript
shareable config, they need to run ESLint with eslint . --ext=ts
.
Your take on the correct solution to problem.
It should be possible to specify an extension in the ESLint config. This makes it possible to create a shareable config that can be used directly without having to use any CLI flags.
For example:
module.exports = {
extensions: [
'md'
]
rules: {
// …
}
};
I don't see any downside with supporting this. And it would also make it easier to use ESLint with non-JS files in non-CLI situations like editors and with wrappers like XO and Standard.