Skip to content


Browse files Browse the repository at this point in the history
Fix: Remove default .js from --ext CLI option (#13176)
PR #12677, `Breaking: lint overrides files`, removed the default `.js`
value from the  default CLIEngine options. However, it did not remove
the same default value from the `--ext` option parsed by Optionator.
Because of this, when running `eslint .` without the `--ext` option,
Optionator would insert a default `--ext .js` value that would be passed
on to the CLIEngine. ESLint only lints `overrides` files if the `--ext`
CLI option is not passed, so the default `--ext .js` option prevented
ESLint from ever reaching the `overrides` file path checking flow.
  • Loading branch information
btmills committed Apr 23, 2020
1 parent 5c1bdeb commit ebc28d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/options.js
Expand Up @@ -46,7 +46,6 @@ module.exports = optionator({
option: "ext",
type: "[String]",
default: ".js",
description: "Specify JavaScript file extensions"
Expand Down
5 changes: 2 additions & 3 deletions tests/lib/options.js
Expand Up @@ -79,11 +79,10 @@ describe("options", () => {
assert.strictEqual(currentOptions.ext[1], ".js");

it("should return an array one item when not passed", () => {
it("should not exist when not passed", () => {
const currentOptions = options.parse("");

assert.strictEqual(currentOptions.ext[0], ".js");
assert.notProperty(currentOptions, "ext");

Expand Down

0 comments on commit ebc28d7

Please sign in to comment.