From 43a25d93ebdabea52f99b05e15b06250cd8f07d7 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 17 May 2023 16:05:49 +0000 Subject: Add latest changes from gitlab-org/gitlab@16-0-stable-ee --- .eslintrc.yml | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to '.eslintrc.yml') diff --git a/.eslintrc.yml b/.eslintrc.yml index 4a7197e3bd5..ae0d4610927 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -28,11 +28,11 @@ rules: import/no-unresolved: - error - ignore: - # In FOSS, these import paths are rewritten using - # NormalModuleReplacementPlugin, which import/no-unresolved doesn't - # consider. See - # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/89831. - - '^(ee|jh)_component/' + # In FOSS, these import paths are rewritten using + # NormalModuleReplacementPlugin, which import/no-unresolved doesn't + # consider. See + # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/89831. + - '^(ee|jh)_component/' # Disabled for now, to make the airbnb-base 12.1.0 -> 13.1.0 update smoother no-else-return: - error @@ -48,12 +48,12 @@ rules: '@gitlab/vue-no-new-non-primitive-in-template': - error - allowNames: - - 'class(es)?$' - - '^style$' - - '^to$' - - '^$' - - '^variables$' - - 'attrs?$' + - 'class(es)?$' + - '^style$' + - '^to$' + - '^$' + - '^variables$' + - 'attrs?$' no-param-reassign: - error - props: true @@ -117,6 +117,11 @@ rules: message: 'Migrate to GlSkeletonLoader, or import GlDeprecatedSkeletonLoading.' - selector: ImportSpecifier[imported.name='GlSafeHtmlDirective'] message: 'Use directive at ~/vue_shared/directives/safe_html.js instead.' + no-restricted-imports: + - error + - paths: + - name: mousetrap + message: 'Import { Mousetrap } from ~/lib/mousetrap instead.' # See https://gitlab.com/gitlab-org/gitlab/-/issues/360551 vue/multi-word-component-names: off unicorn/prefer-dom-node-dataset: @@ -131,10 +136,11 @@ rules: methods: 'sanitize' overrides: - files: - - '{,ee/,jh/}spec/frontend*/**/*' + - '{,ee/,jh/}spec/frontend*/**/*' rules: '@gitlab/require-i18n-strings': off '@gitlab/no-runtime-template-compiler': off + 'require-await': error 'import/no-dynamic-require': off 'no-import-assign': off 'no-restricted-syntax': @@ -147,6 +153,8 @@ overrides: message: 'Prefer explicit waitForPromises (or equivalent), or jest.runAllTimers (or equivalent) to vague setImmediate calls.' - selector: ImportSpecifier[imported.name='GlSkeletonLoading'] message: 'Migrate to GlSkeletonLoader, or import GlDeprecatedSkeletonLoading.' + - selector: CallExpression[arguments.length=1][arguments.0.type='Literal'] CallExpression[callee.property.name='toBe'] CallExpression[callee.property.name='attributes'][arguments.length=1][arguments.0.value='disabled'] + message: Avoid asserting disabled attribute exact value, because Vue.js 2 and Vue.js 3 renders it differently. Use toBeDefined / toBeUndefined instead no-unsanitized/method: off no-unsanitized/property: off - files: @@ -174,8 +182,7 @@ overrides: - '@graphql-eslint' parserOptions: parser: '@graphql-eslint/eslint-plugin' - operations: - - '{,ee/,jh/}app/**/*.graphql' + operations: '{,ee/,jh/}app/**/*.graphql' schema: './tmp/tests/graphql/gitlab_schema_apollo.graphql' rules: filenames/match-regex: off @@ -193,6 +200,6 @@ overrides: '@graphql-eslint/no-unused-fragments': error '@graphql-eslint/no-duplicate-fields': error - files: - - '{,ee/}spec/contracts/consumer/**/*' + - '{,ee/}spec/contracts/consumer/**/*' rules: '@gitlab/require-i18n-strings': off -- cgit v1.2.3