forked from subquery/subql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ian He
committed
Dec 15, 2020
1 parent
e8ca6e9
commit 9b4a4ed
Showing
43 changed files
with
5,007 additions
and
605 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/build/** | ||
/api_docs/** | ||
**/node_modules/** | ||
**/test/**/* | ||
**/*.spec.* | ||
/scripts/* | ||
packages/**/dist/** | ||
packages/**/lib/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
👋 Hi! This file was autogenerated by tslint-to-eslint-config. | ||
https://github.com/typescript-eslint/tslint-to-eslint-config | ||
It represents the closest reasonable ESLint configuration to this | ||
project's original TSLint configuration. | ||
We recommend eventually switching this configuration to extend from | ||
the recommended rulesets in typescript-eslint. | ||
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md | ||
Happy linting! 💖 | ||
*/ | ||
module.exports = { | ||
env: { | ||
es6: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint', 'import'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
], | ||
rules: { | ||
// rules turned off in upstream project (also required when recommended-requiring-type-checking is extended) | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'@typescript-eslint/restrict-template-expressions': 'off', | ||
// Support recommended-requiring-type-checking (specific to this project) set them as warning | ||
'@typescript-eslint/unbound-method': 'warn', | ||
'@typescript-eslint/no-floating-promises': 'warn', | ||
// Making affected recommended types as warning for now | ||
'@typescript-eslint/explicit-module-boundary-types': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-var-requires': 'warn', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'@typescript-eslint/ban-ts-comment': 'warn', | ||
'@typescript-eslint/ban-types': 'warn', | ||
'@typescript-eslint/no-inferrable-types': 'warn', | ||
'@typescript-eslint/await-thenable': 'error', | ||
'@typescript-eslint/dot-notation': 'error', | ||
'@typescript-eslint/explicit-member-accessibility': [ | ||
'error', | ||
{ | ||
accessibility: 'no-public', | ||
}, | ||
], | ||
'@typescript-eslint/no-namespace': ['error', {"allowDeclarations": true }], | ||
// "@typescript-eslint/member-ordering": "error", | ||
// "@typescript-eslint/naming-convention": "error", | ||
// "@typescript-eslint/no-param-reassign": "error", | ||
'@typescript-eslint/promise-function-async': 'error', | ||
// "arrow-body-style": "error", | ||
complexity: 'error', | ||
curly: ['error', 'multi-line'], | ||
'default-case': 'error', | ||
eqeqeq: ['error', 'always'], | ||
'import/no-extraneous-dependencies': 'off', | ||
'import/order': 'error', | ||
'no-console': 'error', | ||
'no-duplicate-imports': 'error', | ||
// "no-magic-numbers": "error", | ||
'no-return-await': 'error', | ||
'no-undef-init': 'error', | ||
'prefer-template': 'error', | ||
'use-isnan': 'error', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**/CHANGELOG.md | ||
**/node_modules/** | ||
**/.*/** | ||
**/coverage/** | ||
**/dist/** | ||
*.d.ts | ||
**/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"printWidth": 120, | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"bracketSpacing": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# SubQl | ||
# SubQl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
/tmp | ||
/yarn.lock | ||
node_modules | ||
.data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ services: | |
- .data/postgres:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_PASSWORD: postgres | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
const { loadDocuments, loadSchema } = require('@graphql-tools/load'); | ||
const { GraphQLFileLoader } = require('@graphql-tools/graphql-file-loader'); | ||
const {loadDocuments, loadSchema} = require('@graphql-tools/load'); | ||
const {GraphQLFileLoader} = require('@graphql-tools/graphql-file-loader'); | ||
|
||
async function main() { | ||
const document = await loadDocuments('schema.graphql', { | ||
loaders: [ | ||
new GraphQLFileLoader() | ||
] | ||
loaders: [new GraphQLFileLoader()], | ||
}); | ||
} | ||
|
||
main(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
|
||
type Extrinsic @entity { | ||
|
||
id: ID! | ||
|
||
NumExtrinsic: Int! | ||
|
||
|
||
} | ||
|
||
|
||
type testEntity @entity { | ||
|
||
id: ID! | ||
|
||
NumExtrinsic: Int! | ||
|
||
NumEvent: Int | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
import {Command, flags} from '@oclif/command' | ||
import {Command, flags} from '@oclif/command'; | ||
|
||
export default class Hello extends Command { | ||
static description = 'describe the command here' | ||
static description = 'describe the command here'; | ||
|
||
static examples = [ | ||
`$ cli hello | ||
hello world from ./src/hello.ts! | ||
`, | ||
] | ||
]; | ||
|
||
static flags = { | ||
help: flags.help({char: 'h'}), | ||
// flag with a value (-n, --name=VALUE) | ||
name: flags.string({char: 'n', description: 'name to print'}), | ||
// flag with no value (-f, --force) | ||
force: flags.boolean({char: 'f'}), | ||
} | ||
}; | ||
|
||
static args = [{name: 'file'}] | ||
static args = [{name: 'file'}]; | ||
|
||
async run() { | ||
const {args, flags} = this.parse(Hello) | ||
const {args, flags} = this.parse(Hello); | ||
|
||
const name = flags.name ?? 'world' | ||
this.log(`hello ${name} from ./src/commands/hello.ts`) | ||
const name = flags.name ?? 'world'; | ||
this.log(`hello ${name} from ./src/commands/hello.ts`); | ||
if (args.file && flags.force) { | ||
this.log(`you input --force and --file: ${args.file}`) | ||
this.log(`you input --force and --file: ${args.file}`); | ||
} | ||
} | ||
} |
Oops, something went wrong.