Skip to content

Commit 320b04c

Browse files
committed
Fix: move copyLocationInfo outside main to follow ESLint rules
1 parent ad8f246 commit 320b04c

File tree

1 file changed

+20
-20
lines changed
  • lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-duplicate-headings-in-section/lib

1 file changed

+20
-20
lines changed

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-no-duplicate-headings-in-section/lib/main.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,26 @@ var rule;
3939

4040
// FUNCTIONS //
4141

42+
/**
43+
* Copies AST node location info.
44+
*
45+
* @private
46+
* @param {Object} loc - AST node location
47+
* @returns {Object} copied location info
48+
*/
49+
function copyLocationInfo( loc ) {
50+
return {
51+
'start': {
52+
'line': loc.start.line,
53+
'column': loc.start.column
54+
},
55+
'end': {
56+
'line': loc.end.line,
57+
'column': loc.end.column
58+
}
59+
};
60+
}
61+
4262
/**
4363
* Rule to prevent duplicate Markdown headings in the same section in JSDoc descriptions.
4464
*
@@ -112,26 +132,6 @@ function main( context ) {
112132
}
113133
}
114134

115-
/**
116-
* Copies AST node location info.
117-
*
118-
* @private
119-
* @param {Object} loc - AST node location
120-
* @returns {Object} copied location info
121-
*/
122-
function copyLocationInfo( loc ) {
123-
return {
124-
'start': {
125-
'line': loc.start.line,
126-
'column': loc.start.column
127-
},
128-
'end': {
129-
'line': loc.end.line,
130-
'column': loc.end.column
131-
}
132-
};
133-
}
134-
135135
/**
136136
* Reports an error message.
137137
*

0 commit comments

Comments
 (0)