Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cf1df300
Commit
cf1df300
authored
Nov 08, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GraphQL lint task with Apollo tooling
parent
1d759e9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
.eslintrc.yml
.eslintrc.yml
+1
-0
.gitlab/ci/static-analysis.gitlab-ci.yml
.gitlab/ci/static-analysis.gitlab-ci.yml
+6
-1
config/apollo.config.js
config/apollo.config.js
+10
-0
No files found.
.eslintrc.yml
View file @
cf1df300
...
...
@@ -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
...
...
.gitlab/ci/static-analysis.gitlab-ci.yml
View file @
cf1df300
...
...
@@ -52,12 +52,17 @@ eslint:
-
.static-analysis-base
-
.yarn-cache
-
.static-analysis:rules:ee
needs
:
[]
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
:
...
...
config/apollo.config.js
0 → 100644
View file @
cf1df300
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}/**/*
'
],
},
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment