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: ...@@ -119,6 +119,7 @@ overrides:
- '@graphql-eslint' - '@graphql-eslint'
parserOptions: parserOptions:
parser: '@graphql-eslint/eslint-plugin' parser: '@graphql-eslint/eslint-plugin'
schema: './tmp/tests/graphql/gitlab_schema_apollo.graphql'
operations: operations:
- '{,ee/,jh/}app/**/*.graphql' - '{,ee/,jh/}app/**/*.graphql'
# You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line # You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line
......
...@@ -95,7 +95,7 @@ jsdoc/ ...@@ -95,7 +95,7 @@ jsdoc/
webpack-dev-server.json webpack-dev-server.json
/.nvimrc /.nvimrc
.solargraph.yml .solargraph.yml
apollo.config.js ./apollo.config.js
/tmp/matching_foss_tests.txt /tmp/matching_foss_tests.txt
/tmp/matching_tests.txt /tmp/matching_tests.txt
ee/changelogs/unreleased-ee ee/changelogs/unreleased-ee
......
...@@ -51,13 +51,18 @@ eslint: ...@@ -51,13 +51,18 @@ eslint:
extends: extends:
- .static-analysis-base - .static-analysis-base
- .yarn-cache - .yarn-cache
- .static-analysis:rules:ee - .frontend:rules:default-frontend-jobs
needs: [] needs: ['graphql-schema-dump']
variables: variables:
USE_BUNDLE_INSTALL: "false" USE_BUNDLE_INSTALL: "false"
script: script:
- run_timed_command "retry yarn install --frozen-lockfile" - 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" - 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: eslint as-if-foss:
extends: 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 @@ ...@@ -256,8 +256,8 @@
:when: 2019-09-11 13:08:28.431132000 Z :when: 2019-09-11 13:08:28.431132000 Z
- - :permit - - :permit
- "(MIT OR CC0-1.0)" - "(MIT OR CC0-1.0)"
- :who: - :who:
:why: :why:
:versions: [] :versions: []
:when: 2019-11-08 10:03:31.787226000 Z :when: 2019-11-08 10:03:31.787226000 Z
- - :permit - - :permit
...@@ -362,3 +362,9 @@ ...@@ -362,3 +362,9 @@
- - :approve - - :approve
- 0.0.62 - 0.0.62
- *2 - *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 @@ ...@@ -209,6 +209,7 @@
"@testing-library/dom": "^7.16.2", "@testing-library/dom": "^7.16.2",
"@vue/test-utils": "1.2.0", "@vue/test-utils": "1.2.0",
"acorn": "^6.3.0", "acorn": "^6.3.0",
"apollo": "^2.33.8",
"axios-mock-adapter": "^1.15.0", "axios-mock-adapter": "^1.15.0",
"babel-jest": "^26.5.2", "babel-jest": "^26.5.2",
"babel-plugin-dynamic-import-node": "^2.3.3", "babel-plugin-dynamic-import-node": "^2.3.3",
...@@ -263,7 +264,8 @@ ...@@ -263,7 +264,8 @@
}, },
"resolutions": { "resolutions": {
"chokidar": "^3.4.0", "chokidar": "^3.4.0",
"@types/node": "14.17.5" "@types/node": "14.17.5",
"graphql": "^15.4.0"
}, },
"engines": { "engines": {
"node": ">=12.22.1", "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