-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate codebase on typescript
BREAKING CHANGE: removed flowtype definitions; min supported nodejs version is 8
- Loading branch information
Showing
72 changed files
with
2,104 additions
and
12,925 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
flow-typed | ||
lib | ||
mjs | ||
.eslintrc.js |
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,54 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', | ||
], | ||
parserOptions: { | ||
sourceType: 'module', | ||
useJSXTextNode: true, | ||
project: [ | ||
path.resolve(__dirname, 'tsconfig.json'), | ||
path.resolve(__dirname, 'examples/tsconfig.json'), | ||
], | ||
}, | ||
rules: { | ||
'no-underscore-dangle': 0, | ||
'arrow-body-style': 0, | ||
'no-unused-expressions': 0, | ||
'no-plusplus': 0, | ||
'no-console': 0, | ||
'func-names': 0, | ||
'comma-dangle': [ | ||
'error', | ||
{ | ||
arrays: 'always-multiline', | ||
objects: 'always-multiline', | ||
imports: 'always-multiline', | ||
exports: 'always-multiline', | ||
functions: 'ignore', | ||
}, | ||
], | ||
'no-prototype-builtins': 0, | ||
'prefer-destructuring': 0, | ||
'no-else-return': 0, | ||
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], | ||
'@typescript-eslint/explicit-member-accessibility': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/no-inferrable-types': 0, | ||
'@typescript-eslint/explicit-function-return-type': 0, | ||
'@typescript-eslint/no-use-before-define': 0, | ||
'@typescript-eslint/no-empty-function': 0, | ||
'@typescript-eslint/camelcase': 0, | ||
'@typescript-eslint/ban-ts-comment': 0, | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], | ||
}, | ||
env: { | ||
jasmine: true, | ||
jest: true, | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ notifications: | |
node_js: | ||
- "10" | ||
- "12" | ||
- "14" | ||
script: | ||
- yarn run test | ||
- yarn run build | ||
|
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
2 changes: 0 additions & 2 deletions
2
examples/introspection/generate.js → examples/introspection/generate.ts
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,5 +1,3 @@ | ||
/* @flow */ | ||
|
||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { printSchema } from 'graphql'; | ||
|
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
2 changes: 0 additions & 2 deletions
2
examples/partialApi/schema.js → examples/partialApi/schema.ts
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,31 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"esModuleInterop": true, | ||
"sourceMap": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"removeComments": true, | ||
"resolveJsonModule": true, | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedParameters": true, | ||
"noUnusedLocals": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"lib": ["es2017", "esnext.asynciterable"], | ||
"types": ["node", "jest"], | ||
"baseUrl": ".", | ||
"paths": { | ||
"*" : ["types/*"] | ||
}, | ||
"rootDir": "../", | ||
}, | ||
"include": ["./**/*"], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
Oops, something went wrong.