Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Disable `promise/valid-params` because it's redundant in type-checked projects ([#425](https://github.com/MetaMask/eslint-config/pull/425))
- Disable `import-x/no-duplicates` ([#427](https://github.com/MetaMask/eslint-config/pull/427))
- It was a style preference that we may not want, and the auto-fix was broken.
- Loosen `@typescript-eslint/naming-convention` by not enforcing naming conventions for object literal properties ([#428](https://github.com/MetaMask/eslint-config/pull/428))
- Object literals are too often used as parameters for 3rd party libraries/services.

### Fixed

Expand Down
5 changes: 1 addition & 4 deletions packages/typescript/rules-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@
"selector": "objectLiteralMethod",
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
},
{
"selector": "objectLiteralProperty",
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
},
{ "selector": "objectLiteralProperty", "format": null },
{ "selector": "typeLike", "format": ["PascalCase"] },
{
"selector": "typeParameter",
Expand Down
4 changes: 3 additions & 1 deletion packages/typescript/src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ const config = createConfig({
},
{
selector: 'objectLiteralProperty',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
// Disabled because object literals are often parameters to 3rd party libraries/services,
// which we don't set the naming conventions for
format: null,
},
{
selector: 'typeLike',
Expand Down
Loading