Skip to content

Commit

Permalink
chore: remove url for external doc for eslint rules (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-zhang-at-salesforce authored Jun 20, 2024
1 parent fba613d commit 9a0bd9f
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 19 deletions.
5 changes: 2 additions & 3 deletions src/rules/apex/apex-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
import { ESLintUtils } from '@typescript-eslint/utils';

import { createRule } from '../../util/rule-helpers';
export const APEX_IMPORT_RULE_ID = 'lwc-offline-apex-import';

export const rule = createRule({
export const rule = ESLintUtils.RuleCreator.withoutDocs({
create(context) {
return {
ImportDeclaration(node) {
Expand All @@ -21,7 +21,6 @@ export const rule = createRule({
}
};
},
name: 'apex-import',
meta: {
docs: {
description:
Expand Down
2 changes: 0 additions & 2 deletions src/rules/graphql/no-aggregate-query-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import { Kind } from 'graphql';
import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin';
import { getDocUrl } from '../../util/rule-helpers';

export const NO_AGGREGATE_QUERY_SUPPORTED_RULE_ID = 'offline-graphql-no-aggregate-query-supported';

Expand All @@ -19,7 +18,6 @@ export const rule: GraphQLESLintRule = {
category: 'Operations',
description:
'Aggregate operations in a GraphQL query are not supported for Offline GraphQL.',
url: getDocUrl(NO_AGGREGATE_QUERY_SUPPORTED_RULE_ID),
examples: [
{
title: 'Incorrect',
Expand Down
2 changes: 0 additions & 2 deletions src/rules/graphql/no-fiscal-date-filtering-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import { ASTNode, Kind, ArgumentNode } from 'graphql';
import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin';
import { getDocUrl } from '../../util/rule-helpers';
import { getClosestAncestorByType } from '../../util/graphql-ast-utils';
import { GraphQLESTreeNode } from '@graphql-eslint/eslint-plugin/estree-converter/types';
export const NO_FISCAL_DATE_FILTER_SUPPORTED_RULE_ID =
Expand All @@ -19,7 +18,6 @@ export const rule: GraphQLESLintRule = {
docs: {
description: 'Fiscal date literals and ranges are not supported in Offline GraphQL',
category: 'Operations',
url: getDocUrl(NO_FISCAL_DATE_FILTER_SUPPORTED_RULE_ID),
recommended: true,
examples: [
{
Expand Down
2 changes: 0 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 @@ -6,7 +6,6 @@
*/

import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin';
import { getDocUrl } from '../../util/rule-helpers';
import { DocumentStat, ViolationType } from '../../util/entity-stats';

export const NO_MORE_THAN_1_PARENT_RECORD_RULE_ID = 'offline-graphql-no-more-than-1-parent-record';
Expand All @@ -18,7 +17,6 @@ export const rule: GraphQLESLintRule = {
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.`,
url: getDocUrl(NO_MORE_THAN_1_PARENT_RECORD_RULE_ID),
examples: [
{
title: 'Correct',
Expand Down
2 changes: 0 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 @@ -6,7 +6,6 @@
*/

import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin';
import { getDocUrl } from '../../util/rule-helpers';
import { DocumentStat, ViolationType } from '../../util/entity-stats';

export const NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID = 'offline-graphql-no-more-3-child-entities';
Expand All @@ -18,7 +17,6 @@ export const rule: GraphQLESLintRule = {
docs: {
category: 'Operations',
description: `Offline GraphQL: Do not fetch more than 3 child entities.`,
url: getDocUrl(NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID),
examples: [
{
title: 'Correct',
Expand Down
2 changes: 0 additions & 2 deletions src/rules/graphql/no-more-than-3-root-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin';
import { getDocUrl } from '../../util/rule-helpers';
import { DocumentStat, ViolationType } from '../../util/entity-stats';

export const NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID = 'offline-graphql-no-more-3-root-entities';
Expand All @@ -18,7 +17,6 @@ export const rule: GraphQLESLintRule = {
docs: {
category: 'Operations',
description: `Do not fetch more than 3 root entities.`,
url: getDocUrl(NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID),
examples: [
{
title: 'Correct',
Expand Down
2 changes: 0 additions & 2 deletions src/rules/graphql/no-mutation-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin';

import { getLocation } from '../../util/graphql-ast-utils';
import { getDocUrl } from '../../util/rule-helpers';

export const NO_MUTATION_SUPPORTED_RULE_ID = 'offline-graphql-no-mutation-supported';

Expand All @@ -19,7 +18,6 @@ export const rule: GraphQLESLintRule = {
docs: {
category: 'Operations',
description: 'Mutation (data modification) is not supported for mobile offline',
url: getDocUrl(NO_MUTATION_SUPPORTED_RULE_ID),
recommended: true,
examples: [
{
Expand Down
2 changes: 0 additions & 2 deletions src/rules/graphql/no-semi-anti-join-supported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin';
import { getDocUrl } from '../../util/rule-helpers';

export const NO_SEMI_ANTI_JOIN_SUPPORTED_RULE_ID = 'offline-graphql-no-semi-anti-join-supported';

Expand All @@ -18,7 +17,6 @@ export const rule: GraphQLESLintRule = {
description: 'Semi-join and anti-join filters are not supported for mobile offline',
category: 'Operations',
recommended: true,
url: getDocUrl(NO_SEMI_ANTI_JOIN_SUPPORTED_RULE_ID),
examples: [
{
title: 'Correct',
Expand Down
2 changes: 0 additions & 2 deletions src/rules/graphql/unsupported-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const UNSUPPORTED_SCOPE_RULE_ID = 'offline-graphql-unsupported-scope';
export const SCOPE_SUPPORTED_FOR_CERTAIN_ENTITIES_ONLY = 'ASSIGNED_TO_ME__SERVICEAPPOINTMENT_ONLY';
export const OTHER_UNSUPPORTED_SCOPE = 'OTHER_UNSUPPORTED_SCOPE';

import { getDocUrl } from '../../util/rule-helpers';
import { GraphQLESTreeNode } from '@graphql-eslint/eslint-plugin/estree-converter/types';

// Record key is scope name, value is the array of supported entities. Empty array
Expand All @@ -27,7 +26,6 @@ export const rule: GraphQLESLintRule = {
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.`,
url: getDocUrl(UNSUPPORTED_SCOPE_RULE_ID),
recommended: true,
examples: [
{
Expand Down

0 comments on commit 9a0bd9f

Please sign in to comment.