From cf03b2b23f5f028767cf98e7e86a3bc8eecfd755 Mon Sep 17 00:00:00 2001 From: Kanwar Ujjaval Singh <4216199+kanwarujjaval@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:53:40 +0530 Subject: [PATCH 1/6] install eslint dependencies --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f3e5fee7d4..613658e1512 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,7 +105,7 @@ jobs: - name: ESLint shell: bash run: | - npm install eslint@8.57.0 + npm install eslint@8.57.0 eslint-plugin-vue@9.31.0 @stylistic/eslint-plugin@2.11.0 npx eslint . - name: NPM install From 3c20440aa10e6bef954dc8b4e72e302080e2287b Mon Sep 17 00:00:00 2001 From: Kanwar Ujjaval Singh <4216199+kanwarujjaval@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:35:37 +0530 Subject: [PATCH 2/6] update eslint config for contentV1 --- .eslintrc.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3ece0622897..2aa835fc55a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -142,7 +142,9 @@ { "files": [ "plugins/content/frontend/content-blocks/**/*.js", - "plugins/journey_engine/frontend/builder/**/*.js" + "plugins/journey_engine/frontend/builder/**/*.js", + "plugins/content/frontend/content-blocks/**/*.vue", + "plugins/journey_engine/frontend/builder/**/*.vue" ], "extends": [ "eslint:recommended", @@ -151,9 +153,11 @@ "plugin:vue/vue3-recommended" ], "rules": { + // override these post initial content release, to make them fit with countly convention "no-console": ["error"], "@stylistic/quotes": ["error", "single"], - "@stylistic/quote-props": ["error", "as-needed"] + "@stylistic/quote-props": ["error", "as-needed"], + "require-jsdoc": "off" // temporary addition }, "plugins": [ "vue", From a3a5a544912bb1e8a68d11d919ce3f867cb44054 Mon Sep 17 00:00:00 2001 From: Kanwar Ujjaval Singh <4216199+kanwarujjaval@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:11:09 +0530 Subject: [PATCH 3/6] temporary config --- .eslintrc.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 2aa835fc55a..feb3caaa982 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -156,8 +156,7 @@ // override these post initial content release, to make them fit with countly convention "no-console": ["error"], "@stylistic/quotes": ["error", "single"], - "@stylistic/quote-props": ["error", "as-needed"], - "require-jsdoc": "off" // temporary addition + "@stylistic/quote-props": ["error", "as-needed"] }, "plugins": [ "vue", @@ -259,7 +258,13 @@ "plugins/*/frontend/**/*.js", "plugins/*/extend/**/*.js" ], - "excludedFiles": "plugins/*/frontend/public/**/*.js", + "excludedFiles": [ + "plugins/*/frontend/public/**/*.js", + "plugins/content/frontend/content-blocks/**/*.js", + "plugins/journey_engine/frontend/builder/**/*.js", + "plugins/content/frontend/content-blocks/**/*.vue", + "plugins/journey_engine/frontend/builder/**/*.vue" + ], "env": { "es2023": true, "node": true From aba99657e321ada2d4a316c7ee973638c21f0060 Mon Sep 17 00:00:00 2001 From: Kanwar Ujjaval Singh <4216199+kanwarujjaval@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:02:11 +0530 Subject: [PATCH 4/6] convention for vue files --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 6744aa1e32e..ea4cd631fe7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,6 +4,6 @@ root = true end_of_line = lf insert_final_newline = false -[*.{js,html,scss,json}] +[*.{js,html,scss,json,vue}] indent_style = space indent_size = 4 From 7beab9d13ae452178fa65cd8e024fa407e0dc68a Mon Sep 17 00:00:00 2001 From: Kanwar Ujjaval Singh <4216199+kanwarujjaval@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:45:44 +0530 Subject: [PATCH 5/6] more vue specific lint fixes --- .eslintrc.json | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index feb3caaa982..ce496cb3e45 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -146,6 +146,10 @@ "plugins/content/frontend/content-blocks/**/*.vue", "plugins/journey_engine/frontend/builder/**/*.vue" ], + "plugins": [ + "vue", + "@stylistic" + ], "extends": [ "eslint:recommended", "plugin:vue/vue3-essential", @@ -156,12 +160,12 @@ // override these post initial content release, to make them fit with countly convention "no-console": ["error"], "@stylistic/quotes": ["error", "single"], - "@stylistic/quote-props": ["error", "as-needed"] + "@stylistic/quote-props": ["error", "as-needed"], + "no-unused-vars": "off", + "vue/no-unused-vars": ["error", { + "ignorePattern": "^_" + }] }, - "plugins": [ - "vue", - "@stylistic" - ], "parserOptions": { "ecmaVersion": 2023, "sourceType": "module", From 6894e2a0fdbfdb3f0625ab9605bec8f227f06c1f Mon Sep 17 00:00:00 2001 From: Kanwar Ujjaval Singh <4216199+kanwarujjaval@users.noreply.github.com> Date: Wed, 27 Nov 2024 17:54:48 +0530 Subject: [PATCH 6/6] add gitgnore for chrome --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 117de747049..a6b3e862aa7 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,5 @@ frontend/express/public/stylesheets/vue/clyvue.css.map log/ log/supervisord/ plugins/plugins.json.* -.sdk \ No newline at end of file +.sdk +dump \ No newline at end of file