File tree 1 file changed +1
-30
lines changed
1 file changed +1
-30
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
const utils = require ( '../utils' ) ;
4
-
5
- /**
6
- * Checks if the given token is a comma token or not.
7
- * From: https://github.com/eslint/eslint/blob/master/lib/rules/utils/ast-utils.js
8
- * @param {Token } token The token to check.
9
- * @returns {boolean } `true` if the token is a comma token.
10
- */
11
- function isCommaToken ( token ) {
12
- return token . value === ',' && token . type === 'Punctuator' ;
13
- }
14
-
15
- /**
16
- * Checks if the given token is an opening brace token or not.
17
- * From: https://github.com/eslint/eslint/blob/master/lib/rules/utils/ast-utils.js
18
- * @param {Token } token The token to check.
19
- * @returns {boolean } `true` if the token is an opening brace token.
20
- */
21
- function isOpeningBraceToken ( token ) {
22
- return token . value === '{' && token . type === 'Punctuator' ;
23
- }
24
-
25
- /**
26
- * Checks if the given token is a closing brace token or not.
27
- * From: https://github.com/eslint/eslint/blob/master/lib/rules/utils/ast-utils.js
28
- * @param {Token } token The token to check.
29
- * @returns {boolean } `true` if the token is a closing brace token.
30
- */
31
- function isClosingBraceToken ( token ) {
32
- return token . value === '}' && token . type === 'Punctuator' ;
33
- }
4
+ const { isCommaToken, isOpeningBraceToken, isClosingBraceToken } = require ( 'eslint-utils' ) ;
34
5
35
6
module . exports = {
36
7
meta : {
You can’t perform that action at this time.
0 commit comments