Skip to content

Commit

Permalink
feat(eslint-plugin): improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk committed Nov 21, 2019
1 parent 410b39a commit c0ffc4f
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion packages/eslint-plugin/tests/rules/camelcase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,22 @@ class Foo {
},
{
code: `
type Foo<T extends object> = {}
type Foo<T> = {}
`,
options: [{ genericType: 'always' }],
},
{
code: `
type Foo<t> = {}
`,
options: [{ genericType: 'always' }],
},
{
code: `
type Foo<t_object> = {}
`,
options: [{ genericType: 'never' }],
},
{
code: 'const foo = foo?.baz;',
},
Expand All @@ -161,6 +173,22 @@ type Foo<T extends object> = {}
code: 'const foo = foo_bar?.foo;',
options: [{ properties: 'never' }],
},
{
code: `
class Foo {
FOO_method() {}
}
`,
options: [{ allow: ['^FOO'] }],
},
{
code: `
class Foo {
method() {}
}
`,
options: [{}],
},
],

invalid: [
Expand Down

0 comments on commit c0ffc4f

Please sign in to comment.