File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
packages/eslint-plugin/src/rules Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,6 @@ export default util.createRule<Options, MessageIds>({
56
56
}
57
57
] ,
58
58
create ( context , [ { allowConstructorOnly, allowEmpty, allowStaticOnly } ] ) {
59
- function getReportNode ( node : TSESTree . ClassBody ) : TSESTree . Node {
60
- if ( ! node . parent ) {
61
- return node ;
62
- }
63
- if ( 'id' in node . parent && node . parent . id ) {
64
- return node . parent . id ;
65
- }
66
-
67
- return node . parent ;
68
- }
69
-
70
59
return {
71
60
ClassBody ( node : TSESTree . ClassBody ) {
72
61
const parent = node . parent as
@@ -78,7 +67,7 @@ export default util.createRule<Options, MessageIds>({
78
67
return ;
79
68
}
80
69
81
- const reportNode = getReportNode ( node ) ;
70
+ const reportNode = 'id' in parent && parent . id ? parent . id : parent ;
82
71
83
72
if ( node . body . length === 0 ) {
84
73
if ( allowEmpty ) {
You can’t perform that action at this time.
0 commit comments