Skip to content
代码片段 群组 项目
提交 e674bde4 编辑于 作者: Natalia Tepluhina's avatar Natalia Tepluhina 提交者: Vitaly Slobodin
浏览文件

Add GraphQL ESLint plugin to the codebase

上级 721c7bbb
No related branches found
No related tags found
无相关合并请求
显示
41 个添加18 个删除
......@@ -7,3 +7,5 @@
/tmp/
/vendor/
/sitespeed-result/
/fixtures/**/*.graphql
spec/fixtures/**/*.graphql
......@@ -113,3 +113,24 @@ overrides:
- '*.stories.js'
rules:
filenames/match-regex: off
- files:
- '*.graphql'
plugins:
- '@graphql-eslint'
parserOptions:
parser: '@graphql-eslint/eslint-plugin'
operations:
- '{,ee/,jh/}app/**/*.graphql'
# You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line
# schema: './tmp/tests/graphql/gitlab_schema.graphql'
rules:
filenames/match-regex: off
spaced-comment: off
# TODO: We need a way to include this rule + support ee_else_ce fragments
#'@graphql-eslint/unique-fragment-name': error
# TODO: Uncomment these rules when then `schema` is available
#'@graphql-eslint/fragments-on-composite-type': error
#'@graphql-eslint/known-argument-names': error
#'@graphql-eslint/known-type-names': error
'@graphql-eslint/no-anonymous-operations': error
'@graphql-eslint/unique-operation-name': error
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
query getProjects(
query accessTokensGetProjects(
$search: String = ""
$after: String = ""
$first: Int = null
......
query getGroupProjects(
query analyticsGetGroupProjects(
$groupFullPath: ID!
$search: String!
$first: Int!
......
#import "./board_list.fragment.graphql"
mutation CreateBoardList($boardId: BoardID!, $backlog: Boolean, $labelId: LabelID) {
mutation createBoardList($boardId: BoardID!, $backlog: Boolean, $labelId: LabelID) {
boardListCreate(input: { boardId: $boardId, backlog: $backlog, labelId: $labelId }) {
list {
...BoardListFragment
......
#import "ee_else_ce/boards/graphql/board_list.fragment.graphql"
query ListIssues(
query BoardLists(
$fullPath: ID!
$boardId: ID!
$filters: BoardIssueInput
......
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
query getGroupProjects($fullPath: ID!, $search: String, $after: String) {
query boardsGetGroupProjects($fullPath: ID!, $search: String, $after: String) {
group(fullPath: $fullPath) {
projects(search: $search, after: $after, first: 100, includeSubgroups: true) {
nodes {
......
#import "ee_else_ce/boards/graphql/issue.fragment.graphql"
mutation IssueMoveList(
mutation issueMoveList(
$projectPath: ID!
$iid: String!
$boardId: ID!
......
#import "ee_else_ce/boards/graphql/issue.fragment.graphql"
query ListIssues(
query BoardListEE(
$fullPath: ID!
$boardId: ID!
$id: ID
......
query projectMilestones(
query boardProjectMilestones(
$fullPath: ID!
$state: MilestoneStateEnum
$includeAncestors: Boolean
......
mutation($environment: Environment) {
mutation cancelAutoStop($environment: Environment) {
cancelAutoStop(environment: $environment) @client {
errors
}
......
mutation($environment: Environment) {
mutation deleteEnvironment($environment: Environment) {
deleteEnvironment(environment: $environment) @client {
errors
}
......
mutation($environment: Environment) {
mutation rollbackEnvironment($environment: Environment) {
rollbackEnvironment(environment: $environment) @client {
errors
}
......
mutation($environment: Environment) {
mutation stopEnvironment($environment: Environment) {
stopEnvironment(environment: $environment) @client {
errors
}
......
mutation($input: EnvironmentsCanaryIngressUpdateInput!) {
mutation updateCanaryIngress($input: EnvironmentsCanaryIngressUpdateInput!) {
environmentsCanaryIngressUpdate(input: $input) {
errors
}
......
#import "../fragments/user.fragment.graphql"
#import "~/graphql_shared/fragments/user_availability.fragment.graphql"
query usersSearch($search: String!, $fullPath: ID!) {
query groupUsersSearch($search: String!, $fullPath: ID!) {
workspace: group(fullPath: $fullPath) {
id
users: groupMembers(search: $search, relations: [DIRECT, INHERITED]) {
......
#import "../fragments/user.fragment.graphql"
#import "~/graphql_shared/fragments/user_availability.fragment.graphql"
query usersSearch($search: String!, $fullPath: ID!) {
query projectUsersSearch($search: String!, $fullPath: ID!) {
workspace: project(fullPath: $fullPath) {
users: projectMembers(search: $search, relations: [DIRECT, INHERITED, INVITED_GROUPS]) {
nodes {
......
query($fullPath: ID!) {
query getIssuesListDetails($fullPath: ID!) {
project(fullPath: $fullPath) {
issues {
nodes {
......
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
query getProjects(
query jiraGetProjects(
$search: String!
$after: String = ""
$first: Int!
......
#import "./jira_import.fragment.graphql"
query($fullPath: ID!) {
query getJiraImportDetails($fullPath: ID!) {
project(fullPath: $fullPath) {
jiraImportStatus
jiraImports {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册