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

Enforce PascalCase on types #463

Closed
fregante opened this issue Apr 12, 2020 · 2 comments
Closed

Enforce PascalCase on types #463

fregante opened this issue Apr 12, 2020 · 2 comments

Comments

@fregante
Copy link
Member

This is possible with https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md

As suggested here: typescript-eslint/typescript-eslint#1882

Fails

type boolFunction = () => boolean
interface someObject {}

Passes

type BoolFunction = () => boolean
interface SomeObject {}
@sindresorhus
Copy link
Member

I have it ready here: https://github.com/xojs/eslint-config-xo-typescript/blob/3183fad515848e39d1e104598425a14a8a04a5c3/index.js#L179 However, I've disabled it for now as the rule has a lot of missing cases: https://github.com/typescript-eslint/typescript-eslint/search?q=%22naming-convention%22+is%3Aissue&state=open&type=Issues

@fregante
Copy link
Member Author

Indeed, I just saw that. Sorry for the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants