Closed Flyingdot closed 1 year ago
From what I understand about eslint and the eslint-plugin-vue pluging you may need to adjust your eslint config to support parsing the .vue files along with other types of script in it. See: https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser and https://github.com/vuejs/vue-eslint-parser#parseroptionsparser
FYI . . . tecnically office-addin-lint is basically a cli for linting basic ts and js files with a default eslint config. The actual rules for office.js are in eslint-plugin-office-addins (which is a dependency of office-addin-lint) which are built for typescript and javascript.
Please comment when you get new information.
Prerequisites
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Expected behavior
Linter works in Vue Projects with SFC (Single File Components)
Current behavior
When linting a vue-component in SFC-syntax, it fails with errors like this:
a typical SFC looks like this (MyComponent.vue):
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
npm i -D office-addin-lint check
module.exports = { root: true, plugins: ['office-addins'], extends: [ 'plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript', '@vue/eslint-config-prettier/skip-formatting', 'plugin:office-addins/recommended' ], parserOptions: { ecmaVersion: 'latest' } }