-
Notifications
You must be signed in to change notification settings - Fork 2
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
Miscellaneous cleanup #14
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did this just so any potential formatter conflict configured locally wouldn't wreak havoc when formatting in VSCode. Prettier will automatically read its configuration from its standard locations in the project, so we don't need to configure it here, more than just saying that this is the formatter we use. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ import { NO_SEMI_ANTI_JOIN_SUPPORTED_RULE_ID } from '../rules/graphql/no-semi-an | |
import { NO_MORE_THAN_1_PARENT_RECORD_RULE_ID } from '../rules/graphql/no-more-than-1-parent-record.js'; | ||
import { NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID } from '../rules/graphql/no-more-than-3-child-entities.js'; | ||
import { NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID } from '../rules/graphql/no-more-than-3-root-entities.js'; | ||
import { createScopedModuleRuleName } from '../util/createScopedModuleRuleName.js'; | ||
import { createScopedModuleRuleName } from '../util/rule-helpers.js'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I consolidated these into an aggregate helper utility module, just because it didn't seem like the ones I consolidated, needed to have their own separate space. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good idea moving createRule, createScopedModuleRuleName into graphql-ast-utils.ts. |
||
|
||
export = { | ||
extends: ['./configs/base'], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { ASTNode, Kind, ArgumentNode } from 'graphql'; | ||
import { GraphQLESLintRule, GraphQLESLintRuleContext } from '@graphql-eslint/eslint-plugin'; | ||
import getDocUrl from '../../util/getDocUrl'; | ||
import { getClosestAncestorByType } from '../../util/graphqlAstUtils'; | ||
import { GraphQLESTreeNode } from './types'; | ||
import { getDocUrl } from '../../util/rule-helpers'; | ||
import { getClosestAncestorByType } from '../../util/graphql-ast-utils'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also renamed a couple of modules/files like this, just for more consistent TypeScript naming conventions. |
||
import { GraphQLESTreeNode } from '../../util/types'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved everything that wasn't explicitly a rule, out of the |
||
export const NO_FISCAL_DATE_FILTER_SUPPORTED_RULE_ID = | ||
'offline-graphql-no-fiscal-date-filter-supported'; | ||
|
||
export const rule: GraphQLESLintRule = { | ||
meta: { | ||
type: 'problem', | ||
docs: { | ||
description: 'fiscal date literals/ranges are not supported offline', | ||
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, | ||
|
@@ -40,7 +40,7 @@ export const rule: GraphQLESLintRule = { | |
` | ||
}, | ||
{ | ||
title: 'InCorrect', | ||
title: 'Incorrect', | ||
code: /* GraphQL */ ` | ||
{ | ||
uiapi { | ||
|
@@ -62,7 +62,7 @@ export const rule: GraphQLESLintRule = { | |
` | ||
}, | ||
{ | ||
title: 'InCorrect', | ||
title: 'Incorrect', | ||
code: /* GraphQL */ ` | ||
{ | ||
uiapi { | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to be safe, I added the full copy/paste of the license as worded in the original project. I want to make sure we give proper attribution. I think there's a good chance that if we can properly tweak our project configuration, we'll be able to remove this file in favor of referencing it from the original project. 🤞 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we are baffled when seeing mousing over shows the type correctly, but has wiggling line. will spend more fiddling around project setting to see if we can cure this dark spot. |
||
* MIT License | ||
* | ||
* Copyright (c) 2022 Dimitri POSTOLOV | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
/* | ||
* File: types.ts | ||
* Author: Dimitri POSTOLOV <[email protected]> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: should we rename this file apex-import.ts to apex-import.spec.ts to keep the name consistent with other tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's a good idea. I'll rename it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured we may as well recommend the ESLint and Pretter extensions, since we make use of both.