Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import defaultParserInterface from './utils/defaultESTreeParserInterface';
import pkg from '@typescript-eslint/parser/package.json';
const ID = '@typescript-eslint/parser';
export default {
...defaultParserInterface,
id: ID,
displayName: ID,
version: pkg.version,
homepage: pkg.homepage || 'https://typescript-eslint.io/',
locationProps: new Set(['loc', 'start', 'end', 'range']),
loadParser(callback) {
require(['@typescript-eslint/parser'], callback);
},
parse(parser, code, options) {
return parser.parse(code, options);
},
getDefaultOptions() {
return {
range: true,
loc: false,
tokens: false,
comment: false,