💻
How are you using Babel?
@babel/eslint-parser
Input code
require('@babel/eslint-parser').parse('#[]', {requireConfigFile: false, babelOptions: { parserOpts: {plugins:[['recordAndTuple',{syntaxType: 'hash'}]], tokens: true}}}).tokens[0]
Configuration file name
No response
Configuration
No response
Current and expected behavior
Token {
type: TokenType {
label: '#[',
keyword: undefined,
beforeExpr: true,
startsExpr: true,
isLoop: false,
isAssign: false,
prefix: false,
postfix: false,
binop: null,
updateContext: null
},
value: undefined,
start: 0,
end: 2,
loc: SourceLocation {
start: Position { line: 1, column: 0 },
end: Position { line: 1, column: 2 },
filename: undefined,
identifierName: undefined
},
range: [ 0, 2 ]
}
Environment
Latest version of @babel/eslint-parser
Possible solution
No response
Additional context
The type property should be a string, and value property should not be undefined.
#{, {|, |}, |] tokens also need fix.
💻
How are you using Babel?
@babel/eslint-parser
Input code
Configuration file name
No response
Configuration
No response
Current and expected behavior
Environment
Latest version of
@babel/eslint-parserPossible solution
No response
Additional context
The
typeproperty should be a string, andvalueproperty should not beundefined.#{,{|,|},|]tokens also need fix.