Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit e4b6fea

Browse files
authored
Merge branch 'master' into no-parameter-properties
2 parents b4e069c + 26f2609 commit e4b6fea

10 files changed

+3274
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ Then configure the rules you want to use under the rules section.
6363
* [`typescript/no-unused-vars`](./docs/rules/no-unused-vars.md) — prevents TypeScript-specific constructs from being erroneously flagged as unused
6464
* [`typescript/adjacent-overload-signatures`](./docs/rules/adjacent-overload-signatures.md) — enforces member overloads to be consecutive.
6565
* [`typescript/no-parameter-properties`](./docs/rules/no-parameter-properties.md) - disallows parameter properties in class constructors.
66+
* [`typescript/class-name-casing`](./docs/rules/adjacent-overload-signatures.md) - enforces PascalCased class and interface names. (`class-name` from TSLint)
67+
* [`typescript/member-delimiter-style`](./docs/rules/member-delimiter-style.md) - enforces a member delimiter style in interfaces and type literals.
68+
* [`typescript/no-empty-interface`](./docs/rules/no-empty-interface.md) - disallows the declaration of empty interfaces. (`no-empty-interface` from TSLint)

docs/rules/class-name-casing.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Enforces PascalCased class and interface names. (class-name-casing)
2+
3+
This rule enforces PascalCased names for classes and interfaces.
4+
5+
## Rule Details
6+
7+
This rule aims to make it easy to differentiate classes from regular variables at a glance.
8+
9+
Examples of **incorrect** code for this rule:
10+
11+
```ts
12+
13+
class invalidClassName {
14+
15+
}
16+
17+
class Another_Invalid_Class_Name {
18+
19+
}
20+
21+
var bar = class invalidName {}
22+
23+
interface someInterface {}
24+
25+
```
26+
27+
Examples of **correct** code for this rule:
28+
29+
```ts
30+
31+
class ValidClassName {
32+
33+
}
34+
35+
export default class {
36+
37+
}
38+
39+
var foo = class {};
40+
41+
interface SomeInterface {}
42+
43+
```
44+
45+
## When Not To Use It
46+
47+
You should turn off this rule if you do not care about class name casing, or if
48+
you use a different type of casing.
49+
50+
## Further Reading
51+
52+
* [`class-name`](https://palantir.github.io/tslint/rules/class-name/) in [TSLint](https://palantir.github.io/tslint/)

0 commit comments

Comments
 (0)