Skip to content

Commit

Permalink
Merge pull request #247 from Shopify/restore-ts-naming-convention
Browse files Browse the repository at this point in the history
@shopify/eslint-plugin: merge typescript naming convention rules
  • Loading branch information
brendanrygus authored May 10, 2021
2 parents d7e431f + 04548f6 commit 0e1857c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 4 additions & 0 deletions packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->

### Changed

- Fix conflicting `@typescript-eslint/naming-convention` rules [[#247](https://github.com/Shopify/web-configs/pull/247)]

## 40.2.2 - 2021-05-05

### Changed
Expand Down
13 changes: 13 additions & 0 deletions packages/eslint-plugin/lib/config/rules/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ module.exports = {
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'typeParameter',
format: ['PascalCase'],
prefix: ['T'],
},
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false,
},
},
],
// Enforces naming of generic type variables
'@typescript-eslint/generic-type-naming': 'off',
Expand Down
17 changes: 0 additions & 17 deletions packages/eslint-plugin/lib/config/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,6 @@ module.exports = {
'@shopify/typescript/prefer-singular-enums': 'error',
// Prefer buildClientSchema for schema building.
'@shopify/typescript/prefer-build-client-schema': 'error',

'@typescript-eslint/naming-convention': [
'error',
{
selector: 'typeParameter',
format: ['PascalCase'],
prefix: ['T'],
},
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false,
},
},
],
}),
},
],
Expand Down

0 comments on commit 0e1857c

Please sign in to comment.