From 5540cbfcb96bb1839d3062032eb2c359f440f058 Mon Sep 17 00:00:00 2001 From: Florian Wendelborn <1133858+FlorianWendelborn@users.noreply.github.com> Date: Tue, 7 Sep 2021 15:46:53 +0000 Subject: [PATCH] chore(dependencies): Upgrade TS to 4.3.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TS 4.4.2 is unfortunately not possible yet, as there’s this rollup+typescript bug that will most likely be fixed in TS 4.4.3: https://github.com/rollup/plugins/issues/983 https://github.com/microsoft/TypeScript/issues/45633 Co-Authored-By: Moritz Vetter <16950410+HansAuger@users.noreply.github.com> --- .eslintrc.js | 33 ++--- package.json | 6 +- .../components/ComponentInfo.vue | 2 +- packages/documentation/pages/changelog.vue | 7 +- .../documentation/pages/foundations/units.vue | 6 +- .../documentation/pages/usage/utilities.vue | 6 +- packages/documentation/pages/utilities.ts | 2 +- .../source/kotti-button-group/types.ts | 2 +- .../kotti-field-number/KtFieldNumber.vue | 2 +- .../kotti-field-password/KtFieldPassword.vue | 2 +- .../kotti-field-select/KtFieldMultiSelect.vue | 1 + .../KtFieldSingleSelect.vue | 1 + .../source/kotti-field-text/KtFieldText.vue | 2 +- packages/kotti-ui/source/kotti-field/tests.ts | 7 +- .../KtFormControllerList.vue | 18 +-- .../kotti-form-controller-list/types.ts | 4 +- packages/kotti-ui/source/kotti-form/tests.ts | 12 +- .../kotti-ui/source/kotti-navbar/types.ts | 2 +- .../source/kotti-translation/types.ts | 2 +- .../source/kotti-translation/utilities.ts | 2 +- packages/kotti-ui/source/utilities.ts | 2 +- yarn.lock | 114 ++++++++++++------ 22 files changed, 147 insertions(+), 88 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b875f8e46c..ac4ee8ec1d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,22 +23,6 @@ module.exports = { 'prettier/vue', ], rules: { - 'no-magic-numbers': [ - 'warn', - { ignoreArrayIndexes: true, ignore: [0, 1, 2, -1, 10] }, - ], - 'no-param-reassign': 'warn', - 'no-console': process.env.NODE_ENV === 'development' ? 'off' : 'error', - 'no-debugger': process.env.NODE_ENV === 'development' ? 'off' : 'error', - 'vue/attribute-hyphenation': ['error', 'never'], - 'vue/require-default-prop': 'off', - 'vue/require-component-is': 'warn', - 'vue/html-indent': 'off', - 'sonarjs/no-duplicate-string': 'warn', - '@typescript-eslint/member-delimiter-style': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-namespace': 'off', - 'prettier/prettier': 'warn', 'import/order': [ 'warn', { @@ -49,8 +33,25 @@ module.exports = { 'newlines-between': 'always', }, ], + 'no-console': process.env.NODE_ENV === 'development' ? 'off' : 'error', + 'no-debugger': process.env.NODE_ENV === 'development' ? 'off' : 'error', + 'no-magic-numbers': [ + 'warn', + { ignoreArrayIndexes: true, ignore: [0, 1, 2, -1, 10] }, + ], + 'no-param-reassign': 'warn', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/member-delimiter-style': 'off', + '@typescript-eslint/no-extra-semi': 'off', // conflicts with prettier + '@typescript-eslint/no-namespace': 'off', + 'sonarjs/no-duplicate-string': 'warn', + 'prettier/prettier': 'warn', 'vue/attribute-hyphenation': ['error', 'never'], 'vue/attributes-order': ['error', { alphabetical: true }], + 'vue/html-indent': 'off', + 'vue/require-component-is': 'warn', + 'vue/require-default-prop': 'off', }, overrides: [ { diff --git a/package.json b/package.json index 13a261ab5a..72ceddc874 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ } ], "dependencies": { - "typescript": "^3.9.6" + "typescript": "4.3" }, "devDependencies": { "@babel/core": "7.x", @@ -57,8 +57,8 @@ "@babel/preset-env": "^7.11.0", "@babel/preset-typescript": "^7.10.4", "@types/jest": "^26.0.20", - "@typescript-eslint/eslint-plugin": "^2.26.0", - "@typescript-eslint/parser": "^2.26.0", + "@typescript-eslint/eslint-plugin": "^4.31.0", + "@typescript-eslint/parser": "^4.31.0", "@vue/eslint-config-typescript": "^5.0.2", "@vue/test-utils": "^1.1.2", "autoprefixer": "^9.8.5", diff --git a/packages/documentation/components/ComponentInfo.vue b/packages/documentation/components/ComponentInfo.vue index aa612a90bc..50bd122179 100644 --- a/packages/documentation/components/ComponentInfo.vue +++ b/packages/documentation/components/ComponentInfo.vue @@ -253,7 +253,7 @@ export default defineComponent<{ return result }), showProps: ref(false), - stringifyDefault: (defaultValue: Function | unknown) => + stringifyDefault: (defaultValue: (() => unknown) | unknown) => typeof defaultValue === 'function' ? `${JSON.stringify(defaultValue())} *` : JSON.stringify(defaultValue), diff --git a/packages/documentation/pages/changelog.vue b/packages/documentation/pages/changelog.vue index a886ef665d..abf8ffa75b 100644 --- a/packages/documentation/pages/changelog.vue +++ b/packages/documentation/pages/changelog.vue @@ -112,9 +112,9 @@ const convertPoundToIssueLink = (string: string) => '[#$1](https://github.com/3YOURMIND/kotti/issues/$1)', ) -// disable ban-ts-ignore because vscode sees this as an error but nuxt doesn’t -// eslint-disable-next-line @typescript-eslint/ban-ts-ignore -// @ts-ignored layout is not added to the type definition of defineComponent +// disable ban-ts-comment because vscode sees this as an error but nuxt doesn’t +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore layout is not added to the type definition of defineComponent export default defineComponent({ name: 'DocumentationPageChangelog', layout: 'fullpage', @@ -129,7 +129,6 @@ export default defineComponent({ releases.value = ( await octokit.repos.listReleases({ owner: '3yourmind', - // eslint-disable-next-line @typescript-eslint/camelcase per_page: 1000, repo: 'kotti', }) diff --git a/packages/documentation/pages/foundations/units.vue b/packages/documentation/pages/foundations/units.vue index ab22496a5e..697ab3b023 100644 --- a/packages/documentation/pages/foundations/units.vue +++ b/packages/documentation/pages/foundations/units.vue @@ -36,9 +36,9 @@ The following 3 types of margins or paddings are suggested: