From 13371bb757742648ff028c110897c09a8c7067ef Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 20 Jun 2023 13:46:23 +0200 Subject: [PATCH 1/2] feat: Split config + Fully support composition API by using the `vue-eslint-parser` parser Signed-off-by: Ferdinand Thiessen --- CHANGELOG.md | 7 ++ index.js | 175 +++------------------------- package-lock.json | 15 +-- package.json | 3 +- parts/base.js | 96 +++++++++++++++ parts/typescript.js | 36 ++++++ parts/vue.js | 42 +++++++ tests/eslint-config.test.ts | 7 +- tests/fixtures/composition-test.vue | 18 +++ 9 files changed, 230 insertions(+), 169 deletions(-) create mode 100644 parts/base.js create mode 100644 parts/typescript.js create mode 100644 parts/vue.js create mode 100644 tests/fixtures/composition-test.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 325d64c..6f7f4ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Unreleased + +[Full Changelog](https://github.com/nextcloud/eslint-config/compare/v8.2.1...master) + +**Features:** +- Fully support vue files using the Composition API ` From 05b788a0ce26b8048e4b730396f5d5c18a64eeda Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 20 Jun 2023 13:47:20 +0200 Subject: [PATCH 2/2] feat: Add extra config for vue+typescript projects Signed-off-by: Ferdinand Thiessen --- CHANGELOG.md | 1 + README.md | 14 ++++++++++++++ tests/eslint-typescript-config.test.ts | 19 +++++++++++++++++++ tests/fixtures/typescript-test.vue | 12 ++++++++++++ typescript.js | 25 +++++++++++++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 tests/eslint-typescript-config.test.ts create mode 100644 tests/fixtures/typescript-test.vue create mode 100644 typescript.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f7f4ff..abe194a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ [Full Changelog](https://github.com/nextcloud/eslint-config/compare/v8.2.1...master) **Features:** +- Provide config for vue files written in Typescript, use `extends: "@nextcloud/eslint-config/typescript"`. - Fully support vue files using the Composition API ` diff --git a/typescript.js b/typescript.js new file mode 100644 index 0000000..9642b46 --- /dev/null +++ b/typescript.js @@ -0,0 +1,25 @@ +const base = require('./parts/base.js') +const typescriptOverrides = require('./parts/typescript.js') +const vueOverrides = require('./parts/vue.js') + +/** + * Config for projects written in Typescript + vue including vue files written in Typescript (`