Skip to content

Commit

Permalink
TS Migration: enable tests antd remove flow infra (#3091)
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj authored and IvanGoncharov committed May 24, 2021
1 parent 6dd98ab commit 98c3ca1
Show file tree
Hide file tree
Showing 32 changed files with 128 additions and 3,793 deletions.
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-syntax-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,8 +7,6 @@
/npm
/deno

# Ignore Flow typings for 3rd-party libraries
/flow-typed
# Ignore TS files inside integration test
/integrationTests/ts/*.ts

Expand Down
64 changes: 1 addition & 63 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 @@ -642,7 +584,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 All @@ -665,10 +607,6 @@ overrides:
'@typescript-eslint/space-before-function-paren': off
'@typescript-eslint/space-infix-ops': off
'@typescript-eslint/type-annotation-spacing': off
- files: 'src/**/*.d.ts'
rules:
import/order: off
import/newline-after-import: off
- files: 'src/**/__*__/**'
rules:
node/no-unpublished-import: [error, { allowModules: ['chai', 'mocha'] }]
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

0 comments on commit 98c3ca1

Please sign in to comment.