forked from typescript-eslint/typescript-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
method.test.ts
46 lines (45 loc) · 1.21 KB
/
method.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { createTestCases } from './createTestCases';
createTestCases([
{
code: [
'class Ignored { private %() {} }',
'class Ignored { private "%"() {} }',
'class Ignored { private readonly %() {} }',
'class Ignored { private static %() {} }',
'class Ignored { private static readonly %() {} }',
'class Ignored { private % = () => {} }',
'class Ignored { abstract %() }',
'class Ignored { declare %() }',
'class Ignored { #%() }',
'class Ignored { static #%() }',
],
options: {
selector: 'classMethod',
},
},
{
code: [
'const ignored = { %() {} };',
'const ignored = { "%"() {} };',
'const ignored = { %: () => {} };',
],
options: {
selector: 'objectLiteralMethod',
},
},
{
code: [
'interface Ignored { %(): string }',
'interface Ignored { "%"(): string }',
'interface Ignored { %: () => string }',
'interface Ignored { "%": () => string }',
'type Ignored = { %(): string }',
'type Ignored = { "%"(): string }',
'type Ignored = { %: () => string }',
'type Ignored = { "%": () => string }',
],
options: {
selector: 'typeMethod',
},
},
]);