Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Text for mobile ESLint plugin GraphQL warnings #23

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
test-report.xml
junit.xml
tsconfig.tsbuildinfo
.DS_Store
4 changes: 2 additions & 2 deletions src/rules/apex/apex-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export const rule = ESLintUtils.RuleCreator.withoutDocs({
meta: {
docs: {
description:
'Using Apex in LWC Offline-enabled mobile apps requires additional considerations to ensure proper functioning in offline scenarios. See https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/apex.htm for more details.'
'Using Apex in LWC Offline-enabled mobile apps requires additional considerations to ensure proper functioning in offline scenarios. See Use Apex While Mobile and Offline (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/apex.htm) for more details.'
},
messages: {
[APEX_IMPORT_RULE_ID]:
'Using Apex in LWC Offline-enabled mobile apps requires careful consideration.'
'Using Apex in LWC Offline-enabled mobile apps requires careful consideration in offline scenarios.'
},
type: 'suggestion',
schema: []
Expand Down
4 changes: 2 additions & 2 deletions src/rules/graphql/no-aggregate-query-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const rule: GraphQLESLintRule = {
docs: {
category: 'Operations',
description:
'Aggregate operations in a GraphQL query are not supported for Offline GraphQL.',
'Aggregate operations in a GraphQL query are not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
examples: [
{
title: 'Incorrect',
Expand Down Expand Up @@ -48,7 +48,7 @@ export const rule: GraphQLESLintRule = {
},
messages: {
[NO_AGGREGATE_QUERY_SUPPORTED_RULE_ID]:
'Offline GraphQL: Aggregate operations in a query are not supported for mobile offline'
'Offline GraphQL: Aggregate operations in a query are not supported for mobile offline.'
},
schema: []
},
Expand Down
5 changes: 3 additions & 2 deletions src/rules/graphql/no-fiscal-date-filtering-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const rule: GraphQLESLintRule = {
meta: {
type: 'problem',
docs: {
description: 'Fiscal date literals and ranges are not supported in Offline GraphQL',
description:
'Fiscal date literals and ranges are not supported in filters for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
category: 'Operations',
recommended: true,
examples: [
Expand Down Expand Up @@ -94,7 +95,7 @@ export const rule: GraphQLESLintRule = {
},
messages: {
[NO_FISCAL_DATE_FILTER_SUPPORTED_RULE_ID]:
'Offline GraphQL: Date {{filterType}} "{{filterName}}" is not supported offline.'
'Offline GraphQL: Date {{filterType}} "{{filterName}}" is not supported for mobile offline.'
},
schema: []
},
Expand Down
4 changes: 2 additions & 2 deletions src/rules/graphql/no-more-than-1-parent-record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const rule: GraphQLESLintRule = {
hasSuggestions: false,
docs: {
category: 'Operations',
description: `Offline GraphQL: You should only query one parent entity, for queries fetching child entities. Set the parent's 'first' argument value to 1.`,
description: `Queries fetching child entities can only fetch 1 parent record. Set the parent's 'first' argument value to 1.`,
examples: [
{
title: 'Correct',
Expand Down Expand Up @@ -90,7 +90,7 @@ export const rule: GraphQLESLintRule = {
]
},
messages: {
[NO_MORE_THAN_1_PARENT_RECORD_RULE_ID]: `Offline GraphQL: Queries fetching child entities should only fetch 1 parent record. Currently it's "{{pageSize}}".`
[NO_MORE_THAN_1_PARENT_RECORD_RULE_ID]: `Offline GraphQL: Queries fetching child entities can only fetch 1 parent record. Currently it's "{{pageSize}}".`
},
schema: []
},
Expand Down
4 changes: 2 additions & 2 deletions src/rules/graphql/no-more-than-3-child-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const rule: GraphQLESLintRule = {
hasSuggestions: false,
docs: {
category: 'Operations',
description: `Offline GraphQL: Do not fetch more than 3 child entities.`,
description: `Do not fetch more than 3 child entities.`,
examples: [
{
title: 'Correct',
Expand Down Expand Up @@ -102,7 +102,7 @@ export const rule: GraphQLESLintRule = {
]
},
messages: {
[NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID]: `Offline GraphQL: fetch no more than 3 child entities.`
[NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID]: `Offline GraphQL: Do not fetch more than 3 child entities.`
},
schema: []
},
Expand Down
2 changes: 1 addition & 1 deletion src/rules/graphql/no-more-than-3-root-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const rule: GraphQLESLintRule = {
]
},
messages: {
[NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID]: `Offline GraphQL: fetch no more than 3 root entities.`
[NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID]: `Offline GraphQL: Do not fetch more than 3 root entities.`
},
schema: []
},
Expand Down
5 changes: 3 additions & 2 deletions src/rules/graphql/no-mutation-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const rule: GraphQLESLintRule = {
hasSuggestions: false,
docs: {
category: 'Operations',
description: 'Mutation (data modification) is not supported for mobile offline',
description:
'Mutation (data modification) is not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
recommended: true,
examples: [
{
Expand Down Expand Up @@ -62,7 +63,7 @@ export const rule: GraphQLESLintRule = {
},
messages: {
[NO_MUTATION_SUPPORTED_RULE_ID]:
'Offline GraphQL: Mutation (data modification) is not supported offline.'
'Offline GraphQL: Mutation (data modification) is not supported for mobile offline.'
},
schema: []
},
Expand Down
3 changes: 2 additions & 1 deletion src/rules/graphql/no-semi-anti-join-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const rule: GraphQLESLintRule = {
type: 'problem',
hasSuggestions: false,
docs: {
description: 'Semi-join and anti-join filters are not supported for mobile offline',
description:
'Semi-join and anti-join filters are not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
category: 'Operations',
recommended: true,
examples: [
Expand Down
4 changes: 2 additions & 2 deletions src/rules/graphql/unsupported-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const rule: GraphQLESLintRule = {
type: 'problem',
docs: {
category: 'Operations',
description: `Offline GraphQL supports the scope "MINE" for all entities, and "ASSIGNEDTOME" for ServiceAppointment. All other scopes (for example TEAM, QUEUE_OWNED and USER_OWNED) are not supported.`,
description: `Offline GraphQL supports the scope "MINE" for all entities, and "ASSIGNEDTOME" for ServiceAppointment. All other scopes (for example TEAM, QUEUE_OWNED and USER_OWNED) are not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.`,
recommended: true,
examples: [
{
Expand Down Expand Up @@ -68,7 +68,7 @@ export const rule: GraphQLESLintRule = {
},
messages: {
[SCOPE_SUPPORTED_FOR_CERTAIN_ENTITIES_ONLY]:
'Offline GraphQL: Scope "{{scopeName}}" is only supported for the "{{supportedEntities}}" entity for mobile offline use cases',
'Offline GraphQL: Scope "{{scopeName}}" is only supported for the "{{supportedEntities}}" entity for mobile offline use cases.',
[OTHER_UNSUPPORTED_SCOPE]:
'Offline GraphQL: Scope "{{scopeName}}" is unsupported for mobile offline use cases.'
},
Expand Down
Loading