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

TS Migration: enable tests and remove flow infra #3091

Merged
merged 5 commits into from
May 15, 2021
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
4 changes: 2 additions & 2 deletions .babelrc-deno.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"plugins": [
"@babel/plugin-transform-flow-strip-types",
["./resources/add-extension-to-import-paths", { "extension": "js" }],
"@babel/plugin-transform-typescript",
["./resources/add-extension-to-import-paths", { "extension": "ts" }],
"./resources/inline-invariant"
]
}
2 changes: 1 addition & 1 deletion .babelrc-npm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"plugins": [
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-transform-typescript",
"./resources/inline-invariant"
],
"env": {
Expand Down
2 changes: 1 addition & 1 deletion .babelrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"plugins": ["@babel/plugin-transform-flow-strip-types"],
"plugins": ["@babel/plugin-transform-typescript"],
"presets": [
[
"@babel/preset-env",
Expand Down
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
/npm
/deno

# Ignore Flow typings for 3rd-party libraries
/flow-typed
# Ignore TS files inside integration test
/integrationTests/ts/*.ts
60 changes: 1 addition & 59 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,64 +436,6 @@ rules:
yield-star-spacing: off

overrides:
- files: 'src/**/*.js'
parser: '@babel/eslint-parser'
parserOptions:
sourceType: module
plugins:
- flowtype

rules:
##############################################################################
# `eslint-plugin-flowtype` rule list based on `v5.7.x`
# https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype
##############################################################################

flowtype/array-style-complex-type: error
flowtype/array-style-simple-type: error
flowtype/define-flow-type: error
flowtype/newline-after-flow-annotation: error
flowtype/no-dupe-keys: error
flowtype/no-existential-type: off # checked by Flow
flowtype/no-flow-fix-me-comments: off
flowtype/no-internal-flow-type: error
flowtype/no-mixed: off
flowtype/no-mutable-array: off
flowtype/no-primitive-constructor-types: error
flowtype/no-types-missing-file-annotation: off
flowtype/no-unused-expressions: off
flowtype/no-weak-types: [error, { any: false }]
flowtype/require-compound-type-alias: off
flowtype/require-exact-type: [error, never]
flowtype/require-indexer-name: error
flowtype/require-inexact-type: off # checked by Flow
flowtype/require-parameter-type: off
flowtype/require-readonly-react-props: off
flowtype/require-return-type: off
flowtype/require-types-at-top: off
flowtype/require-valid-file-annotation: off
flowtype/require-variable-type: off
flowtype/sort-keys: off
flowtype/spread-exact-type: off
flowtype/type-id-match: [error, '^[A-Z]']
flowtype/type-import-style: [error, declaration]
flowtype/use-read-only-spread: error
flowtype/use-flow-type: error

# Bellow rules are disabled because coflicts with Prettier, see:
# https://github.com/prettier/eslint-config-prettier/blob/master/flowtype.js
flowtype/arrow-parens: off
flowtype/boolean-style: off
flowtype/delimiter-dangle: off
flowtype/generic-spacing: off
flowtype/object-type-curly-spacing: off
flowtype/object-type-delimiter: off
flowtype/quotes: off
flowtype/semi: off
flowtype/space-after-type-colon: off
flowtype/space-before-generic-bracket: off
flowtype/space-before-type-colon: off
flowtype/union-intersection-spacing: off
- files: '**/*.ts'
parser: '@typescript-eslint/parser'
parserOptions:
Expand Down Expand Up @@ -641,7 +583,7 @@ overrides:
'@typescript-eslint/require-await': error
'@typescript-eslint/return-await': error

# Disable for JS, Flow and TS
# Disable for JS and TS
'@typescript-eslint/init-declarations': off
'@typescript-eslint/no-magic-numbers': off
'@typescript-eslint/no-use-before-define': off
Expand Down
39 changes: 0 additions & 39 deletions .flowconfig

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ ensure your pull request matches the style guides, run `npm run prettier`.
- 80 character line length strongly preferred.
- Prefer `'` over `"`
- ES6 syntax when possible. However do not rely on ES6-specific functions to be available.
- Use [Flow types](https://flowtype.org/).
- Use [TypeScript](https://www.typescriptlang.org).
- Use semicolons;
- Trailing commas,
- Avd abbr wrds.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Lint ESLint
run: npm run lint

- name: Lint Flow
- name: Check Types
run: npm run check

- name: Lint Prettier
Expand Down
2 changes: 1 addition & 1 deletion .mocharc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
throw-deprecation: true
check-leaks: true
require:
- '@babel/register'
- 'resources/ts-register.js'
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/flow-typed

# Copied from '.gitignore', please keep it in sync.
/.eslintcache
/node_modules
Expand Down
1 change: 0 additions & 1 deletion cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ words:
- graphiql
- sublinks
- instanceof
- flowtype

# Different names used inside tests
- Skywalker
Expand Down
Loading