diff --git a/index.js b/index.js index f8af6c3..f2e09db 100644 --- a/index.js +++ b/index.js @@ -1,19 +1,30 @@ module.exports = { plugins: ['@typescript-eslint'], + // Prerequisite `eslint-plugin-vue`, being extended, sets // root property `parser` to `'vue-eslint-parser'`, which, for code parsing, // in turn delegates to the parser, specified in `parserOptions.parser`: // https://github.com/vuejs/eslint-plugin-vue#what-is-the-use-the-latest-vue-eslint-parser-error parserOptions: { - parser: require.resolve('@typescript-eslint/parser'), + parser: { + 'js': 'espree', + 'jsx': 'espree', + + 'ts': require.resolve('@typescript-eslint/parser'), + 'tsx': require.resolve('@typescript-eslint/parser'), + + // Leave the template parser unspecified, so that it could be determined by `