Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eslint-plugin): [no-shadow] ignoreOnInitialization option #4603

Merged
merged 7 commits into from Mar 31, 2022
5 changes: 5 additions & 0 deletions packages/eslint-plugin/src/rules/no-shadow.ts
Expand Up @@ -18,6 +18,7 @@ type Options = [
allow?: string[];
builtinGlobals?: boolean;
hoist?: 'all' | 'functions' | 'never';
ignoreOnInitialization?: boolean;
ignoreTypeValueShadow?: boolean;
ignoreFunctionTypeParameterNameValueShadow?: boolean;
},
Expand Down Expand Up @@ -49,6 +50,9 @@ export default util.createRule<Options, MessageIds>({
type: 'string',
},
},
ignoreOnInitialization: {
type: 'boolean',
},
ignoreTypeValueShadow: {
type: 'boolean',
},
Expand All @@ -68,6 +72,7 @@ export default util.createRule<Options, MessageIds>({
allow: [],
builtinGlobals: false,
hoist: 'functions',
ignoreOnInitialization: false,
ignoreTypeValueShadow: true,
ignoreFunctionTypeParameterNameValueShadow: true,
},
Expand Down