Skip to content

Commit

Permalink
Merge pull request #1791 from mightyiam/no-new-native-nonconstructor
Browse files Browse the repository at this point in the history
feat!: no-new-native-nonconstructor
  • Loading branch information
mightyiam authored Oct 5, 2024
2 parents fe993ba + a2b4e4b commit 5e4f73c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/_intentionally-unused-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export const intentionallyUnusedRules: string[] = [
// Made redundant by TS strict mode and `@typescript-eslint/explicit-function-return-type`
'@typescript-eslint/explicit-module-boundary-types',

// Made redundant by no-new-native-nonconstructor
'no-new-symbol',

// From rule documentation:
// > Requiring type annotations unnecessarily can be cumbersome to maintain and generally reduces code readability. TypeScript is often better at inferring types than easily written type annotations would allow.
// >
Expand Down
2 changes: 1 addition & 1 deletion src/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export const eslintRules: Record<string, TSESLint.SharedConfig.RuleEntry> = {
'no-multi-str': ['error'],
'no-new': ['error'],
'no-new-func': ['error'],
'no-new-symbol': ['error'],
'no-new-native-nonconstructor': ['error'],
'no-new-wrappers': ['error'],
'no-obj-calls': ['error'],
'no-object-constructor': ['error'],
Expand Down
2 changes: 1 addition & 1 deletion src/test/_expected-exported-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const expectedEslintRules: Record<
'no-multi-str': ['error'],
'no-new': ['error'],
'no-new-func': ['error'],
'no-new-symbol': ['error'],
'no-new-native-nonconstructor': ['error'],
'no-new-wrappers': ['error'],
'no-obj-calls': ['error'],
'no-object-constructor': ['error'],
Expand Down
1 change: 0 additions & 1 deletion src/test/_rules_to_consider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const eslintRulesToConsider = [
'no-multi-assign',
'no-negated-condition',
'no-nested-ternary',
'no-new-native-nonconstructor',
'no-nonoctal-decimal-escape',
'no-param-reassign',
'no-plusplus',
Expand Down

0 comments on commit 5e4f73c

Please sign in to comment.