Commit aec8fc7a authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'vs/add-fe-graphql-apollo-lint' into 'master'

Add new CI task for linting GraphQL with Apollo tooling

See merge request gitlab-org/gitlab!74013
parents ec9a1f48 43e00680
......@@ -119,6 +119,7 @@ overrides:
- '@graphql-eslint'
parserOptions:
parser: '@graphql-eslint/eslint-plugin'
schema: './tmp/tests/graphql/gitlab_schema_apollo.graphql'
operations:
- '{,ee/,jh/}app/**/*.graphql'
# You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line
......
......@@ -95,7 +95,7 @@ jsdoc/
webpack-dev-server.json
/.nvimrc
.solargraph.yml
apollo.config.js
./apollo.config.js
/tmp/matching_foss_tests.txt
/tmp/matching_tests.txt
ee/changelogs/unreleased-ee
......
......@@ -51,13 +51,18 @@ eslint:
extends:
- .static-analysis-base
- .yarn-cache
- .static-analysis:rules:ee
needs: []
- .frontend:rules:default-frontend-jobs
needs: ['graphql-schema-dump']
variables:
USE_BUNDLE_INSTALL: "false"
script:
- run_timed_command "retry yarn install --frozen-lockfile"
- yarn run apollo client:download-schema --config=config/apollo.config.js tmp/tests/graphql/gitlab_schema_apollo.graphql
- run_timed_command "yarn run lint:eslint:all"
artifacts:
name: graphql-schema-apollo
paths:
- tmp/tests/graphql/gitlab_schema_apollo.graphql
eslint as-if-foss:
extends:
......
module.exports = {
client: {
service: {
name: 'gitlab',
localSchemaFile: './tmp/tests/graphql/gitlab_schema.graphql',
},
includes: ['../{ee/,jh/,}app/assets/javascripts/**/*.{js,graphql}'],
excludes: ['../{ee/,jh/,}spec/{frontend,frontend_integration}/**/*'],
},
};
......@@ -256,8 +256,8 @@
:when: 2019-09-11 13:08:28.431132000 Z
- - :permit
- "(MIT OR CC0-1.0)"
- :who:
:why:
- :who:
:why:
:versions: []
:when: 2019-11-08 10:03:31.787226000 Z
- - :permit
......@@ -362,3 +362,9 @@
- - :approve
- 0.0.62
- *2
- - :approve
- sha.js
- :who: Vitaly Slobodin
:why: Dual license BSD-3-Clause and MIT. See https://gitlab.com/gitlab-com/legal-and-compliance/-/issues/686
:versions: []
:when: 2021-11-12 18:08:27.036400090 Z
......@@ -209,6 +209,7 @@
"@testing-library/dom": "^7.16.2",
"@vue/test-utils": "1.2.0",
"acorn": "^6.3.0",
"apollo": "^2.33.8",
"axios-mock-adapter": "^1.15.0",
"babel-jest": "^26.5.2",
"babel-plugin-dynamic-import-node": "^2.3.3",
......@@ -263,7 +264,8 @@
},
"resolutions": {
"chokidar": "^3.4.0",
"@types/node": "14.17.5"
"@types/node": "14.17.5",
"graphql": "^15.4.0"
},
"engines": {
"node": ">=12.22.1",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment