diff --git a/packages/typescript/CHANGELOG.md b/packages/typescript/CHANGELOG.md index e6ddba7..66e3156 100644 --- a/packages/typescript/CHANGELOG.md +++ b/packages/typescript/CHANGELOG.md @@ -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 diff --git a/packages/typescript/rules-snapshot.json b/packages/typescript/rules-snapshot.json index 93d7097..e76505f 100644 --- a/packages/typescript/rules-snapshot.json +++ b/packages/typescript/rules-snapshot.json @@ -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", diff --git a/packages/typescript/src/index.mjs b/packages/typescript/src/index.mjs index 7752811..9bdeb55 100644 --- a/packages/typescript/src/index.mjs +++ b/packages/typescript/src/index.mjs @@ -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',