Skip to content

Commit

Permalink
fix(linter): align reportUnusedDisableDirectives default value (#13284)
Browse files Browse the repository at this point in the history
Co-authored-by: pfernandes <paulo.fernandes@dashlane.com>
  • Loading branch information
palexandrefernandes and pfernandes committed Nov 21, 2022
1 parent 7f48023 commit 2772fab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/generated/packages/linter.json
Expand Up @@ -206,7 +206,6 @@
},
"reportUnusedDisableDirectives": {
"type": "string",
"default": "off",
"enum": ["off", "warn", "error"],
"description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI."
}
Expand Down
1 change: 0 additions & 1 deletion packages/linter/src/executors/eslint/schema.json
Expand Up @@ -126,7 +126,6 @@
},
"reportUnusedDisableDirectives": {
"type": "string",
"default": "off",
"enum": ["off", "warn", "error"],
"description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI."
}
Expand Down
10 changes: 10 additions & 0 deletions packages/linter/src/executors/eslint/utility/eslint-utils.spec.ts
Expand Up @@ -156,5 +156,15 @@ describe('eslint-utils', () => {
useEslintrc: true,
});
});

it('should create a ESLint instance with no "reportUnusedDisableDirectives" if it is undefined', async () => {
await lint(undefined, {});

expect(ESLint).toHaveBeenCalledWith(
expect.objectContaining({
reportUnusedDisableDirectives: undefined,
})
);
});
});
});

1 comment on commit 2772fab

@vercel
Copy link

@vercel vercel bot commented on 2772fab Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.