From 42f8664c41e84812f9f6e902cad6ab73c1635f22 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Wed, 20 Mar 2024 16:59:20 -0700 Subject: [PATCH 1/2] Add .cache/ to web gitignore Avoids formatting cypress cache --- web/.gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/.gitignore b/web/.gitignore index 0a05d9fab..95600e1a4 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -1,3 +1,5 @@ +.cache/ + # Logs logs videos @@ -26,4 +28,4 @@ dist-ssr .nyc_output coverage/ -vite.config.ts.* \ No newline at end of file +vite.config.ts.* From fc6fe62f6615969410f8ec28264d6c1c52482fe0 Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Wed, 20 Mar 2024 17:01:15 -0700 Subject: [PATCH 2/2] Run prettier format on web code --- web/.eslintrc.cjs | 669 ++++++----- web/README.md | 17 +- web/index.html | 24 +- web/src/App.vue | 13 +- web/src/api/README.md | 6 +- web/src/api/client.ts | 12 +- web/src/api/index.ts | 14 +- web/src/api/resources/Accounts.ts | 12 +- web/src/api/resources/Configurations.ts | 8 +- web/src/api/resources/Deployments.ts | 25 +- web/src/api/resources/EventStream.ts | 126 +- web/src/api/resources/Files.ts | 8 +- web/src/api/types/accounts.ts | 38 +- web/src/api/types/configurations.ts | 146 +-- web/src/api/types/connect.ts | 50 +- web/src/api/types/deployments.ts | 90 +- web/src/api/types/error.ts | 14 +- web/src/api/types/events.ts | 1054 +++++++++-------- web/src/api/types/files.ts | 44 +- web/src/components/AppHeader.vue | 12 +- web/src/components/AppMenu.vue | 27 +- web/src/components/DeploymentLogLink.vue | 36 +- web/src/components/DeploymentSection.vue | 10 +- web/src/components/DiffTag.vue | 13 +- web/src/components/ErrorBanner.vue | 20 +- web/src/components/FileTree.vue | 39 +- web/src/components/PButton.vue | 40 +- web/src/components/PCard.vue | 89 +- web/src/components/PLink.vue | 9 +- web/src/components/SelectAccount.vue | 41 +- web/src/components/config/ConfigAccess.vue | 14 +- web/src/components/config/ConfigConnect.vue | 19 +- .../components/config/ConfigConnectAccess.vue | 15 +- .../config/ConfigConnectKubernetes.vue | 15 +- .../config/ConfigConnectRuntime.vue | 16 +- .../components/config/ConfigDescription.vue | 3 +- .../components/config/ConfigEntrypoint.vue | 3 +- .../components/config/ConfigEnvironment.vue | 16 +- web/src/components/config/ConfigPython.vue | 16 +- web/src/components/config/ConfigQuarto.vue | 16 +- web/src/components/config/ConfigR.vue | 16 +- web/src/components/config/ConfigSchedules.vue | 12 +- web/src/components/config/ConfigSecrets.vue | 14 +- web/src/components/config/ConfigSection.vue | 29 +- web/src/components/config/ConfigSetting.vue | 27 +- web/src/components/config/ConfigSettings.vue | 38 +- web/src/components/config/ConfigTags.vue | 15 +- web/src/components/config/ConfigThumbnail.vue | 3 +- web/src/components/config/ConfigTitle.vue | 4 +- web/src/components/config/ConfigType.vue | 7 +- .../deploymentStatus/DeploymentStatus.vue | 25 +- .../StatusActiveDeployment.vue | 41 +- .../StatusDeploymentFileError.vue | 30 +- .../StatusErrorDeployment.vue | 36 +- .../StatusErrorPreDeployment.vue | 35 +- .../deploymentStatus/StatusPreDeployment.vue | 11 +- .../StatusSuccessDeployment.vue | 11 +- web/src/components/icons/WhitePositLogo.vue | 6 +- web/src/main.ts | 40 +- web/src/plugins/eventStream.ts | 12 +- web/src/router.ts | 44 +- web/src/stores/deployments.ts | 77 +- web/src/stores/events.ts | 620 ++++++---- web/src/style.css | 25 +- web/src/utils/accounts.ts | 10 +- web/src/utils/date.ts | 16 +- web/src/utils/errors.ts | 63 +- web/src/utils/provide.ts | 11 +- web/src/views/AgentLogPage.vue | 43 +- .../views/add-new-deployment/AccountRadio.vue | 46 +- .../add-new-deployment/AddNewDeployment.vue | 100 +- .../deploy-progress/DeployProgressPage.vue | 45 +- web/src/views/deploy-progress/DeployStep.vue | 83 +- .../views/deploy-progress/DeployStepper.vue | 63 +- .../steps/CheckCapabilities.vue | 27 +- .../deploy-progress/steps/CreateBundle.vue | 29 +- .../steps/CreateDeployment.vue | 27 +- .../steps/CreateNewDeployment.vue | 31 +- .../deploy-progress/steps/DeployBundle.vue | 24 +- .../steps/RestorePythonEnvironment.vue | 31 +- .../deploy-progress/steps/RunContent.vue | 25 +- .../deploy-progress/steps/SetEnvVars.vue | 25 +- .../deploy-progress/steps/UploadBundle.vue | 25 +- .../steps/ValidateDeployment.vue | 28 +- .../steps/WrappingUpDeployment.vue | 46 +- web/src/views/deploy-progress/steps/index.ts | 22 +- web/src/views/deployment/DeploymentHeader.vue | 93 +- web/src/views/deployment/DeploymentPage.vue | 34 +- web/src/views/fatal-error/FatalErrorPage.vue | 78 +- web/src/views/project-page/ConfigCard.vue | 12 +- web/src/views/project-page/DeploymentCard.vue | 32 +- .../views/project-page/DeploymentsSection.vue | 32 +- web/src/views/project-page/ProjectPage.vue | 61 +- web/src/vscode.ts | 40 +- web/tests/unit/test.test.ts | 4 +- web/vite.config.ts | 53 +- 96 files changed, 2657 insertions(+), 2619 deletions(-) diff --git a/web/.eslintrc.cjs b/web/.eslintrc.cjs index ad8bae026..40aad6444 100644 --- a/web/.eslintrc.cjs +++ b/web/.eslintrc.cjs @@ -3,83 +3,89 @@ module.exports = { env: { browser: true, - es2021: true + es2021: true, }, extends: [ // Core rules for common problems // https://eslint.org/docs/latest/use/configure/configuration-files#using-eslintrecommended - 'eslint:recommended', + "eslint:recommended", // Typescript recommended rules // https://typescript-eslint.io/linting/configs#recommended-configurations - 'plugin:@typescript-eslint/recommended', + "plugin:@typescript-eslint/recommended", // Includes vue3-essential and vue3-strongly-recommended // https://eslint.vuejs.org/user-guide/#bundle-configurations - 'plugin:vue/vue3-recommended', + "plugin:vue/vue3-recommended", // Avoid conflicts with the Prettier formatting - 'prettier' + "prettier", ], overrides: [ { env: { - node: true + node: true, }, - files: ['.eslintrc.{js,cjs}'], + files: [".eslintrc.{js,cjs}"], parserOptions: { - sourceType: 'script' - } + sourceType: "script", + }, }, { - files: ['*.ts', '*.mts', '*.cts', '*.tsx', '*.vue'], + files: ["*.ts", "*.mts", "*.cts", "*.tsx", "*.vue"], rules: { - 'no-undef': 'off', + "no-undef": "off", }, }, ], parserOptions: { - ecmaVersion: 'latest', - parser: '@typescript-eslint/parser', - sourceType: 'module' + ecmaVersion: "latest", + parser: "@typescript-eslint/parser", + sourceType: "module", }, - plugins: [ - '@typescript-eslint', - 'vue' - ], + plugins: ["@typescript-eslint", "vue"], rules: { // allow async-await - 'generator-star-spacing': 'off', + "generator-star-spacing": "off", // allow paren-less arrow functions - 'arrow-parens': 'off', + "arrow-parens": "off", - 'prefer-promise-reject-errors': 'off', + "prefer-promise-reject-errors": "off", - '@typescript-eslint/no-non-null-assertion': 'off', + "@typescript-eslint/no-non-null-assertion": "off", // this rule, if on, would require explicit return type on the `render` function - '@typescript-eslint/explicit-function-return-type': 'off', + "@typescript-eslint/explicit-function-return-type": "off", // in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled - '@typescript-eslint/no-var-requires': 'off', + "@typescript-eslint/no-var-requires": "off", - '@typescript-eslint/naming-convention': [ - 'error', - { selector: ['variableLike', 'classProperty'], format: ['camelCase'], leadingUnderscore: 'allow' }, - { selector: 'variable', modifiers: ['const'], format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' } + "@typescript-eslint/naming-convention": [ + "error", + { + selector: ["variableLike", "classProperty"], + format: ["camelCase"], + leadingUnderscore: "allow", + }, + { + selector: "variable", + modifiers: ["const"], + format: ["camelCase", "UPPER_CASE"], + leadingUnderscore: "allow", + }, ], // The core 'no-unused-vars' rules (in the eslint:recommended ruleset) // does not work with type definitions - 'no-unused-vars': 'off', + "no-unused-vars": "off", // allow debugger during development only - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", // from Connect project: // VUE project @@ -89,76 +95,80 @@ module.exports = { // errors, since that is our pattern with prettier // Vue Priority C: Recommended - 'vue/attributes-order': 'error', - 'vue/no-v-html': 'off', - 'vue/order-in-components': 'error', - 'vue/this-in-template': 'error', + "vue/attributes-order": "error", + "vue/no-v-html": "off", + "vue/order-in-components": "error", + "vue/this-in-template": "error", // Vue Priority B: Strongly Recommended - 'vue/attribute-hyphenation': 'error', - 'vue/html-closing-bracket-newline': 'error', - 'vue/html-closing-bracket-spacing': 'error', - 'vue/html-end-tags': 'error', - 'vue/html-indent': 'error', - 'vue/html-quotes': 'error', - 'vue/html-self-closing': 'error', - 'vue/max-attributes-per-line': 'error', - 'vue/multiline-html-element-content-newline': 'error', - 'vue/mustache-interpolation-spacing': 'error', - 'vue/no-multi-spaces': 'error', - 'vue/no-spaces-around-equal-signs-in-attribute': 'error', - 'vue/no-template-shadow': 'error', - 'vue/prop-name-casing': ['error', 'camelCase'], - 'vue/require-default-prop': 'error', - 'vue/require-prop-types': 'error', - 'vue/singleline-html-element-content-newline': 'error', - 'vue/v-bind-style': 'error', - 'vue/v-on-style': 'error', + "vue/attribute-hyphenation": "error", + "vue/html-closing-bracket-newline": "error", + "vue/html-closing-bracket-spacing": "error", + "vue/html-end-tags": "error", + "vue/html-indent": "error", + "vue/html-quotes": "error", + "vue/html-self-closing": "error", + "vue/max-attributes-per-line": "error", + "vue/multiline-html-element-content-newline": "error", + "vue/mustache-interpolation-spacing": "error", + "vue/no-multi-spaces": "error", + "vue/no-spaces-around-equal-signs-in-attribute": "error", + "vue/no-template-shadow": "error", + "vue/prop-name-casing": ["error", "camelCase"], + "vue/require-default-prop": "error", + "vue/require-prop-types": "error", + "vue/singleline-html-element-content-newline": "error", + "vue/v-bind-style": "error", + "vue/v-on-style": "error", // Vue Priority A: Essential (Error Prevention) - 'vue/no-async-in-computed-properties': 'error', - 'vue/no-dupe-keys': 'error', - 'vue/no-duplicate-attributes': 'error', - 'vue/no-parsing-error': 'error', - 'vue/no-reserved-keys': 'error', - 'vue/no-shared-component-data': 'error', - 'vue/no-side-effects-in-computed-properties': 'error', - 'vue/no-template-key': 'error', - 'vue/no-textarea-mustache': 'error', - 'vue/no-unused-components': 'error', - 'vue/no-unused-vars': 'error', - 'vue/no-use-v-if-with-v-for': 'error', - 'vue/require-component-is': 'error', - 'vue/require-prop-type-constructor': 'error', - 'vue/require-render-return': 'error', - 'vue/require-v-for-key': 'error', - 'vue/require-valid-default-prop': 'error', - 'vue/return-in-computed-property': 'error', - 'vue/use-v-on-exact': 'error', - 'vue/valid-template-root': 'error', - 'vue/valid-v-bind': 'error', - 'vue/valid-v-cloak': 'error', - 'vue/valid-v-else-if': 'error', - 'vue/valid-v-else': 'error', - 'vue/valid-v-for': 'error', - 'vue/valid-v-html': 'error', - 'vue/valid-v-if': 'error', - 'vue/valid-v-model': 'error', - 'vue/valid-v-on': 'error', - 'vue/valid-v-once': 'error', - 'vue/valid-v-pre': 'error', - 'vue/valid-v-show': 'error', - 'vue/valid-v-text': 'error', + "vue/no-async-in-computed-properties": "error", + "vue/no-dupe-keys": "error", + "vue/no-duplicate-attributes": "error", + "vue/no-parsing-error": "error", + "vue/no-reserved-keys": "error", + "vue/no-shared-component-data": "error", + "vue/no-side-effects-in-computed-properties": "error", + "vue/no-template-key": "error", + "vue/no-textarea-mustache": "error", + "vue/no-unused-components": "error", + "vue/no-unused-vars": "error", + "vue/no-use-v-if-with-v-for": "error", + "vue/require-component-is": "error", + "vue/require-prop-type-constructor": "error", + "vue/require-render-return": "error", + "vue/require-v-for-key": "error", + "vue/require-valid-default-prop": "error", + "vue/return-in-computed-property": "error", + "vue/use-v-on-exact": "error", + "vue/valid-template-root": "error", + "vue/valid-v-bind": "error", + "vue/valid-v-cloak": "error", + "vue/valid-v-else-if": "error", + "vue/valid-v-else": "error", + "vue/valid-v-for": "error", + "vue/valid-v-html": "error", + "vue/valid-v-if": "error", + "vue/valid-v-model": "error", + "vue/valid-v-on": "error", + "vue/valid-v-once": "error", + "vue/valid-v-pre": "error", + "vue/valid-v-show": "error", + "vue/valid-v-text": "error", // Vue Uncategorized Priority - 'vue/camelcase': 'error', - 'vue/comma-dangle': 'error', - 'vue/component-definition-name-casing': ['error', 'PascalCase'], - 'vue/component-name-in-template-casing': ['error', 'PascalCase'], - 'vue/component-tags-order': ['error', { order: ['template', 'script', 'style'] }], - 'vue/match-component-file-name': 'off', // can't enforce b/c of files named: index.vue - 'vue/max-len': [ - 'error', { + "vue/camelcase": "error", + "vue/comma-dangle": "error", + "vue/component-definition-name-casing": ["error", "PascalCase"], + "vue/component-name-in-template-casing": ["error", "PascalCase"], + "vue/component-tags-order": [ + "error", + { order: ["template", "script", "style"] }, + ], + "vue/match-component-file-name": "off", // can't enforce b/c of files named: index.vue + "vue/max-len": [ + "error", + { code: 100, ignoreComments: true, ignoreTrailingComments: true, @@ -168,271 +178,290 @@ module.exports = { ignoreRegExpLiterals: true, ignoreHTMLAttributeValues: true, ignoreHTMLTextContents: true, - } + }, ], - 'vue/no-deprecated-scope-attribute': 'error', - 'vue/no-deprecated-slot-attribute': 'error', - 'vue/no-deprecated-slot-scope-attribute': 'error', - 'vue/no-reserved-component-names': 'error', - 'vue/require-name-property': 'error', - 'vue/v-on-function-call': ['error', 'never'], - 'vue/v-slot-style': [ - 'error', { - atComponent: 'v-slot', - default: 'shorthand', - named: 'shorthand', - } + "vue/no-deprecated-scope-attribute": "error", + "vue/no-deprecated-slot-attribute": "error", + "vue/no-deprecated-slot-scope-attribute": "error", + "vue/no-reserved-component-names": "error", + "vue/require-name-property": "error", + "vue/v-on-function-call": ["error", "never"], + "vue/v-slot-style": [ + "error", + { + atComponent: "v-slot", + default: "shorthand", + named: "shorthand", + }, ], - 'vue/valid-v-slot': 'error', + "vue/valid-v-slot": "error", // 'vuejs-accessibility/no-onchange': 0, // 'vuejs-accessibility/interactive-supports-focus': ['warn'], - 'prefer-const': ['error'], + "prefer-const": ["error"], - eqeqeq: ['error', 'smart'], + eqeqeq: ["error", "smart"], - 'valid-jsdoc': [ - 'error', + "valid-jsdoc": [ + "error", { requireReturn: false, requireParamDescription: false, requireReturnDescription: false, }, ], - 'no-var': 'error', + "no-var": "error", - 'accessor-pairs': 'error', - complexity: 'warn', - 'global-require': 'error', - 'handle-callback-err': 'error', - 'lines-around-directive': 'error', - 'no-alert': 'error', - 'no-caller': 'error', - 'no-catch-shadow': 'error', - 'no-confusing-arrow': 'error', - 'no-div-regex': 'error', - 'no-empty': [ - 'error', + "accessor-pairs": "error", + complexity: "warn", + "global-require": "error", + "handle-callback-err": "error", + "lines-around-directive": "error", + "no-alert": "error", + "no-caller": "error", + "no-catch-shadow": "error", + "no-confusing-arrow": "error", + "no-div-regex": "error", + "no-empty": [ + "error", { allowEmptyCatch: true, }, ], - 'no-eval': 'error', - 'no-extend-native': 'error', - 'no-extra-bind': 'error', - 'no-extra-label': 'error', - 'no-implicit-coercion': [ - 'error', + "no-eval": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-label": "error", + "no-implicit-coercion": [ + "error", { boolean: false, number: false, string: false, }, ], - 'no-implicit-globals': 'error', - 'no-implied-eval': 'error', - 'no-inner-declarations': ['error', 'functions'], - 'no-iterator': 'error', - 'no-label-var': 'error', - 'no-labels': 'error', - 'no-lone-blocks': 'error', - 'no-loop-func': 'error', - 'no-mixed-requires': 'error', - 'no-multi-str': 'error', - 'no-native-reassign': 'error', - 'no-negated-in-lhs': 'error', - 'no-new': 'error', - 'no-new-func': 'error', - 'no-new-require': 'error', - 'no-new-wrappers': 'error', - 'no-octal-escape': 'error', - 'no-path-concat': 'error', - 'no-process-exit': 'error', - 'no-proto': 'error', - 'no-restricted-globals': 'error', - 'no-restricted-imports': 'error', - 'no-restricted-modules': 'error', - 'no-restricted-properties': 'error', - 'no-return-assign': 'error', - 'no-self-compare': 'error', - 'no-shadow-restricted-names': 'error', - 'no-sync': 'error', - 'no-template-curly-in-string': 'error', - 'no-undef-init': 'error', - 'no-unmodified-loop-condition': 'error', - 'no-useless-call': 'error', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'error', - 'no-useless-constructor': 'error', - 'no-useless-rename': 'error', - 'no-void': 'error', - 'no-with': 'error', - 'prefer-numeric-literals': 'error', - 'prefer-spread': 'error', - radix: 'error', - 'symbol-description': 'error', - yoda: ['error', 'never'], - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': [ - 'error', + "no-implicit-globals": "error", + "no-implied-eval": "error", + "no-inner-declarations": ["error", "functions"], + "no-iterator": "error", + "no-label-var": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-loop-func": "error", + "no-mixed-requires": "error", + "no-multi-str": "error", + "no-native-reassign": "error", + "no-negated-in-lhs": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-require": "error", + "no-new-wrappers": "error", + "no-octal-escape": "error", + "no-path-concat": "error", + "no-process-exit": "error", + "no-proto": "error", + "no-restricted-globals": "error", + "no-restricted-imports": "error", + "no-restricted-modules": "error", + "no-restricted-properties": "error", + "no-return-assign": "error", + "no-self-compare": "error", + "no-shadow-restricted-names": "error", + "no-sync": "error", + "no-template-curly-in-string": "error", + "no-undef-init": "error", + "no-unmodified-loop-condition": "error", + "no-useless-call": "error", + "no-useless-computed-key": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "no-useless-rename": "error", + "no-void": "error", + "no-with": "error", + "prefer-numeric-literals": "error", + "prefer-spread": "error", + radix: "error", + "symbol-description": "error", + yoda: ["error", "never"], + "no-shadow": "off", + "@typescript-eslint/no-shadow": [ + "error", { builtinGlobals: true, - hoist: 'functions', + hoist: "functions", }, ], - 'array-callback-return': 'error', - curly: 'error', + "array-callback-return": "error", + curly: "error", // Stylistic ESLint Rules (replaces prettier rules): - 'array-bracket-newline': ['error', { multiline: true, minItems: null }], // default - 'array-bracket-spacing': ['error', 'never'], // default - 'array-element-newline': ['error', 'consistent'], - 'block-spacing': ['error', 'always'], // default - 'brace-style': ['error', '1tbs', { allowSingleLine: true }], // default - camelcase: ['error', { properties: 'always', ignoreDestructuring: false, ignoreImports: false }], // default - 'capitalized-comments': 'off', - 'comma-dangle': [ - 'error', + "array-bracket-newline": ["error", { multiline: true, minItems: null }], // default + "array-bracket-spacing": ["error", "never"], // default + "array-element-newline": ["error", "consistent"], + "block-spacing": ["error", "always"], // default + "brace-style": ["error", "1tbs", { allowSingleLine: true }], // default + camelcase: [ + "error", + { + properties: "always", + ignoreDestructuring: false, + ignoreImports: false, + }, + ], // default + "capitalized-comments": "off", + "comma-dangle": [ + "error", { - arrays: 'only-multiline', - objects: 'only-multiline', - imports: 'only-multiline', - exports: 'only-multiline', - functions: 'only-multiline', + arrays: "only-multiline", + objects: "only-multiline", + imports: "only-multiline", + exports: "only-multiline", + functions: "only-multiline", }, ], - 'comma-spacing': ['error', { before: false, after: true }], // default - 'comma-style': ['error', 'last'], // default - 'computed-property-spacing': ['error', 'never', { enforceForClassMembers: true }], - 'consistent-this': 'off', - 'eol-last': ['error', 'always'], // default - 'func-call-spacing': ['error', 'never'], // default - 'func-name-matching': 'off', - 'func-names': 'off', - 'func-style': 'off', - 'function-call-argument-newline': ['error', 'consistent'], - 'function-paren-newline': ['error', 'multiline-arguments'], - 'id-blacklist': 'off', - 'id-length': 'off', - 'id-match': 'off', - 'implicit-arrow-linebreak': ['error', 'beside'], // default - indent: ['error', 2, { SwitchCase: 1 }], - 'jsx-quotes': 'off', - 'key-spacing': ['error', { beforeColon: false, afterColon: true, mode: 'strict' }], // default - 'keyword-spacing': ['error', { before: true, after: true }], // default - 'line-comment-position': 'off', - 'linebreak-style': ['error', 'unix'], // default - 'lines-around-comment': 'off', - 'lines-between-class-members': 'off', - 'max-depth': ['error', { max: 4 }], // default - 'max-len': 'off', // enforced by 'vue/max-len' - 'max-lines': 'off', - 'max-lines-per-function': 'off', - 'max-nested-callbacks': ['error', { max: 7 }], - 'max-params': ['error', { max: 7 }], - 'max-statements': 'off', - 'max-statements-per-line': 'off', - 'multiline-comment-style': 'off', - 'multiline-ternary': ['error', 'always-multiline'], // default - 'new-cap': 'off', - 'new-parens': ['error', 'always'], // default - 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 2 }], // default - 'no-array-constructor': 'off', - 'no-bitwise': 'off', - 'no-continue': 'off', - 'no-inline-comments': 'off', - 'no-lonely-if': 'error', // default - 'no-mixed-operators': 'off', - 'no-mixed-spaces-and-tabs': 'error', - 'no-multi-assign': 'error', - 'no-multiple-empty-lines': ['error', { max: 1 }], - 'no-negated-condition': 'off', - 'no-nested-ternary': 'off', - 'no-new-object': 'off', - 'no-plusplus': 'off', - 'no-restricted-syntax': [ - 'error', { - selector: 'ExportDefaultDeclaration', - message: 'Avoid default exports and instead use named exports.' - } + "comma-spacing": ["error", { before: false, after: true }], // default + "comma-style": ["error", "last"], // default + "computed-property-spacing": [ + "error", + "never", + { enforceForClassMembers: true }, ], - 'no-tabs': ['error', { allowIndentationTabs: false }], // default - 'no-ternary': 'off', - 'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false }], // default - 'no-underscore-dangle': 'off', - 'no-unneeded-ternary': 'error', - 'no-whitespace-before-property': 'error', - 'nonblock-statement-body-position': 'off', - 'object-curly-newline': ['error', { consistent: true }], // default - 'object-curly-spacing': ['error', 'always'], - 'object-property-newline': 'off', - 'one-var': 'off', - 'one-var-declaration-per-line': 'off', - 'operator-assignment': ['error', 'always'], // default - 'operator-linebreak': 'off', - 'padded-blocks': ['error', 'never'], - 'padding-line-between-statements': 'off', - 'prefer-exponentiation-operator': 'off', - 'prefer-object-spread': 'error', - 'quote-props': ['error', 'as-needed'], + "consistent-this": "off", + "eol-last": ["error", "always"], // default + "func-call-spacing": ["error", "never"], // default + "func-name-matching": "off", + "func-names": "off", + "func-style": "off", + "function-call-argument-newline": ["error", "consistent"], + "function-paren-newline": ["error", "multiline-arguments"], + "id-blacklist": "off", + "id-length": "off", + "id-match": "off", + "implicit-arrow-linebreak": ["error", "beside"], // default + indent: ["error", 2, { SwitchCase: 1 }], + "jsx-quotes": "off", + "key-spacing": [ + "error", + { beforeColon: false, afterColon: true, mode: "strict" }, + ], // default + "keyword-spacing": ["error", { before: true, after: true }], // default + "line-comment-position": "off", + "linebreak-style": ["error", "unix"], // default + "lines-around-comment": "off", + "lines-between-class-members": "off", + "max-depth": ["error", { max: 4 }], // default + "max-len": "off", // enforced by 'vue/max-len' + "max-lines": "off", + "max-lines-per-function": "off", + "max-nested-callbacks": ["error", { max: 7 }], + "max-params": ["error", { max: 7 }], + "max-statements": "off", + "max-statements-per-line": "off", + "multiline-comment-style": "off", + "multiline-ternary": ["error", "always-multiline"], // default + "new-cap": "off", + "new-parens": ["error", "always"], // default + "newline-per-chained-call": ["error", { ignoreChainWithDepth: 2 }], // default + "no-array-constructor": "off", + "no-bitwise": "off", + "no-continue": "off", + "no-inline-comments": "off", + "no-lonely-if": "error", // default + "no-mixed-operators": "off", + "no-mixed-spaces-and-tabs": "error", + "no-multi-assign": "error", + "no-multiple-empty-lines": ["error", { max: 1 }], + "no-negated-condition": "off", + "no-nested-ternary": "off", + "no-new-object": "off", + "no-plusplus": "off", + "no-restricted-syntax": [ + "error", + { + selector: "ExportDefaultDeclaration", + message: "Avoid default exports and instead use named exports.", + }, + ], + "no-tabs": ["error", { allowIndentationTabs: false }], // default + "no-ternary": "off", + "no-trailing-spaces": [ + "error", + { skipBlankLines: false, ignoreComments: false }, + ], // default + "no-underscore-dangle": "off", + "no-unneeded-ternary": "error", + "no-whitespace-before-property": "error", + "nonblock-statement-body-position": "off", + "object-curly-newline": ["error", { consistent: true }], // default + "object-curly-spacing": ["error", "always"], + "object-property-newline": "off", + "one-var": "off", + "one-var-declaration-per-line": "off", + "operator-assignment": ["error", "always"], // default + "operator-linebreak": "off", + "padded-blocks": ["error", "never"], + "padding-line-between-statements": "off", + "prefer-exponentiation-operator": "off", + "prefer-object-spread": "error", + "quote-props": ["error", "as-needed"], quotes: [ - 'error', - 'single', + "error", + "single", { allowTemplateLiterals: true, avoidEscape: false }, ], - semi: ['error', 'always'], // default - 'semi-spacing': ['error', { before: false, after: true }], // default - 'semi-style': ['error', 'last'], // default - 'sort-keys': 'off', - 'sort-vars': 'off', - 'space-before-blocks': 'off', - 'space-before-function-paren': ['error', 'never'], - 'space-in-parens': ['error', 'never'], - 'space-infix-ops': 'error', - 'space-unary-ops': ['error', { words: true, nonwords: false }], - 'spaced-comment': ['error', 'always', { markers: ['/'] }], - 'switch-colon-spacing': ['error', { after: true, before: false }], - 'template-tag-spacing': 'error', - 'unicode-bom': 'off', - 'wrap-regex': 'off', + semi: ["error", "always"], // default + "semi-spacing": ["error", { before: false, after: true }], // default + "semi-style": ["error", "last"], // default + "sort-keys": "off", + "sort-vars": "off", + "space-before-blocks": "off", + "space-before-function-paren": ["error", "never"], + "space-in-parens": ["error", "never"], + "space-infix-ops": "error", + "space-unary-ops": ["error", { words: true, nonwords: false }], + "spaced-comment": ["error", "always", { markers: ["/"] }], + "switch-colon-spacing": ["error", { after: true, before: false }], + "template-tag-spacing": "error", + "unicode-bom": "off", + "wrap-regex": "off", // Enabled Non-Stylistic ESLint Rules: - 'arrow-spacing': ['error', { before: true, after: true }], // default - 'block-scoped-var': 'error', - 'dot-notation': 'error', - 'no-duplicate-imports': 'off', - 'no-else-return': ['error', { allowElseIf: true }], - 'no-eq-null': 'error', - 'no-multi-spaces': ['error', { ignoreEOLComments: false }], - 'no-throw-literal': 'error', - 'no-useless-return': 'error', - 'prefer-template': 'error', + "arrow-spacing": ["error", { before: true, after: true }], // default + "block-scoped-var": "error", + "dot-notation": "error", + "no-duplicate-imports": "off", + "no-else-return": ["error", { allowElseIf: true }], + "no-eq-null": "error", + "no-multi-spaces": ["error", { ignoreEOLComments: false }], + "no-throw-literal": "error", + "no-useless-return": "error", + "prefer-template": "error", // Disabled Non-Stylistic ESLint Rules: - 'arrow-body-style': 'off', - 'class-methods-use-this': 'off', - 'consistent-return': 'off', - 'default-case': 'off', - 'guard-for-in': 'off', - 'init-declarations': 'off', - 'no-empty-function': 'off', - 'no-invalid-this': 'off', - 'no-magic-numbers': 'off', - 'no-param-reassign': 'off', - 'no-process-env': 'off', - 'no-prototype-builtins': 'off', - 'no-script-url': 'off', - 'no-sequences': 'off', - 'no-undefined': 'off', - 'no-unused-expressions': 'off', - 'no-use-before-define': 'off', - 'no-useless-escape': 'off', - 'no-warning-comments': 'off', - 'object-shorthand': 'off', - 'prefer-arrow-callback': 'off', - 'prefer-rest-params': 'off', - 'sort-imports': 'off', - 'vars-on-top': 'off', - 'wrap-iife': 'off', - } + "arrow-body-style": "off", + "class-methods-use-this": "off", + "consistent-return": "off", + "default-case": "off", + "guard-for-in": "off", + "init-declarations": "off", + "no-empty-function": "off", + "no-invalid-this": "off", + "no-magic-numbers": "off", + "no-param-reassign": "off", + "no-process-env": "off", + "no-prototype-builtins": "off", + "no-script-url": "off", + "no-sequences": "off", + "no-undefined": "off", + "no-unused-expressions": "off", + "no-use-before-define": "off", + "no-useless-escape": "off", + "no-warning-comments": "off", + "object-shorthand": "off", + "prefer-arrow-callback": "off", + "prefer-rest-params": "off", + "sort-imports": "off", + "vars-on-top": "off", + "wrap-iife": "off", + }, }; diff --git a/web/README.md b/web/README.md index cd177ccd6..32686ce50 100644 --- a/web/README.md +++ b/web/README.md @@ -1,15 +1,16 @@ # Web Application This application is built using: + - [VueJS](https://vuejs.org) - - Vue 3, Composition API w/ Setup API + - Vue 3, Composition API w/ Setup API - [Quasar Framework V2](https://quasar.dev/) - [Just (justfiles)](https://just.systems) - [Typescript](https://www.typescriptlang.org/) - [Vite](https://vitejs.dev/) - [Sass w/ SCSS syntax](https://sass-lang.com/documentation/syntax/) - [ESLint](https://eslint.org/) - - Using almost the same rules as Connect Dashboard project + - Using almost the same rules as Connect Dashboard project - [Pinia](https://pinia.vuejs.org/) - [Axios](https://axios-http.com/docs/intro) - [Vitest](https://vitest.dev/) @@ -18,17 +19,17 @@ This application is built using: # Installing the prerequisites 1. Node JS (LTS Version) - - NOTE: use of nvm is highly recommended: - - [NVM](https://github.com/nvm-sh/nvm#installing-and-updating) - - Global version of node is NOT recommended, but... - - [NodeJS](https://nodejs.org/en/download) + - NOTE: use of nvm is highly recommended: + - [NVM](https://github.com/nvm-sh/nvm#installing-and-updating) + - Global version of node is NOT recommended, but... + - [NodeJS](https://nodejs.org/en/download) 2. Install Just: - - `[Just](https://just.systems/man/en/) + - `[Just](https://just.systems/man/en/) # Building the client 1. Default recipe will clean, image, bootstrap, validate, build and test agent & client - - `just` + - `just` # Common Developer tasks diff --git a/web/index.html b/web/index.html index 171b9e081..8ebdd5745 100644 --- a/web/index.html +++ b/web/index.html @@ -1,17 +1,15 @@ + + + + + + Posit Publisher + - - - - - - Posit Publisher - - - -
- - - + +
+ + diff --git a/web/src/App.vue b/web/src/App.vue index 03514190d..6c0b44c07 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -2,9 +2,7 @@ diff --git a/web/src/components/AppMenu.vue b/web/src/components/AppMenu.vue index 7e6a102c7..bb42e6d80 100644 --- a/web/src/components/AppMenu.vue +++ b/web/src/components/AppMenu.vue @@ -33,18 +33,12 @@ diff --git a/web/src/components/ErrorBanner.vue b/web/src/components/ErrorBanner.vue index 2093d181a..cb5fae6bf 100644 --- a/web/src/components/ErrorBanner.vue +++ b/web/src/components/ErrorBanner.vue @@ -12,30 +12,21 @@ :key="i" class="text-caption q-ma-sm" > -
+
{{ line }}
diff --git a/web/src/components/FileTree.vue b/web/src/components/FileTree.vue index 46a4fee99..73e5df1fb 100644 --- a/web/src/components/FileTree.vue +++ b/web/src/components/FileTree.vue @@ -1,18 +1,9 @@