Skip to content

Commit

Permalink
Updated max-line-length ignore-pattern example (palantir#3834)
Browse files Browse the repository at this point in the history
The example uses:

```
class [a-zA-Z] implements 
```

but this only matches a class that has a single character as name. Even if it is an example, the rule should accept more than one character for the class name. I struggled with this ignore pattern in a project, because I didn't read the pattern itself completely. Therefore I want to give this feedback, such that other people don't have to search for the reason of a failing rule, like me.
  • Loading branch information
Janis Koehr authored and suchanlee committed Apr 16, 2018
1 parent e27439f commit fb0da64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules/maxLineLengthRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export class Rule extends Lint.Rules.AbstractRule {
* \`\/\/ \` pattern will ignore all in-line comments.
* \`^import \` pattern will ignore all import statements.
* \`^export \{(.*?)\}\` pattern will ignore all multiple export statements.
* \`class [a-zA-Z] implements \` pattern will ignore all class declarations implementing interfaces.
* \`^import |^export \{(.*?)\}|class [a-zA-Z] implements |// \` pattern will ignore all the cases listed above.
* \`class [a-zA-Z]+ implements \` pattern will ignore all class declarations implementing interfaces.
* \`^import |^export \{(.*?)\}|class [a-zA-Z]+ implements |// \` pattern will ignore all the cases listed above.
`,
options: {
type: "array",
Expand Down

0 comments on commit fb0da64

Please sign in to comment.