Skip to content

Commit 76e0607

Browse files
saihajIvanGoncharov
authored andcommitted
TS Migration: enable tests antd remove flow infra (#3091)
1 parent f1f26dc commit 76e0607

32 files changed

+128
-3793
lines changed

.babelrc-deno.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"plugins": [
3-
"@babel/plugin-transform-flow-strip-types",
4-
["./resources/add-extension-to-import-paths", { "extension": "js" }],
3+
"@babel/plugin-syntax-typescript",
4+
["./resources/add-extension-to-import-paths", { "extension": "ts" }],
55
"./resources/inline-invariant"
66
]
77
}

.babelrc-npm.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"plugins": [
3-
"@babel/plugin-transform-flow-strip-types",
3+
"@babel/plugin-transform-typescript",
44
"./resources/inline-invariant"
55
],
66
"env": {

.babelrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"plugins": ["@babel/plugin-transform-flow-strip-types"],
2+
"plugins": ["@babel/plugin-transform-typescript"],
33
"presets": [
44
[
55
"@babel/preset-env",

.eslintignore

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
/npm
88
/deno
99

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

.eslintrc.yml

+1-63
Original file line numberDiff line numberDiff line change
@@ -436,64 +436,6 @@ rules:
436436
yield-star-spacing: off
437437

438438
overrides:
439-
- files: 'src/**/*.js'
440-
parser: '@babel/eslint-parser'
441-
parserOptions:
442-
sourceType: module
443-
plugins:
444-
- flowtype
445-
446-
rules:
447-
##############################################################################
448-
# `eslint-plugin-flowtype` rule list based on `v5.7.x`
449-
# https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype
450-
##############################################################################
451-
452-
flowtype/array-style-complex-type: error
453-
flowtype/array-style-simple-type: error
454-
flowtype/define-flow-type: error
455-
flowtype/newline-after-flow-annotation: error
456-
flowtype/no-dupe-keys: error
457-
flowtype/no-existential-type: off # checked by Flow
458-
flowtype/no-flow-fix-me-comments: off
459-
flowtype/no-internal-flow-type: error
460-
flowtype/no-mixed: off
461-
flowtype/no-mutable-array: off
462-
flowtype/no-primitive-constructor-types: error
463-
flowtype/no-types-missing-file-annotation: off
464-
flowtype/no-unused-expressions: off
465-
flowtype/no-weak-types: [error, { any: false }]
466-
flowtype/require-compound-type-alias: off
467-
flowtype/require-exact-type: [error, never]
468-
flowtype/require-indexer-name: error
469-
flowtype/require-inexact-type: off # checked by Flow
470-
flowtype/require-parameter-type: off
471-
flowtype/require-readonly-react-props: off
472-
flowtype/require-return-type: off
473-
flowtype/require-types-at-top: off
474-
flowtype/require-valid-file-annotation: off
475-
flowtype/require-variable-type: off
476-
flowtype/sort-keys: off
477-
flowtype/spread-exact-type: off
478-
flowtype/type-id-match: [error, '^[A-Z]']
479-
flowtype/type-import-style: [error, declaration]
480-
flowtype/use-read-only-spread: error
481-
flowtype/use-flow-type: error
482-
483-
# Bellow rules are disabled because coflicts with Prettier, see:
484-
# https://github.com/prettier/eslint-config-prettier/blob/master/flowtype.js
485-
flowtype/arrow-parens: off
486-
flowtype/boolean-style: off
487-
flowtype/delimiter-dangle: off
488-
flowtype/generic-spacing: off
489-
flowtype/object-type-curly-spacing: off
490-
flowtype/object-type-delimiter: off
491-
flowtype/quotes: off
492-
flowtype/semi: off
493-
flowtype/space-after-type-colon: off
494-
flowtype/space-before-generic-bracket: off
495-
flowtype/space-before-type-colon: off
496-
flowtype/union-intersection-spacing: off
497439
- files: '**/*.ts'
498440
parser: '@typescript-eslint/parser'
499441
parserOptions:
@@ -642,7 +584,7 @@ overrides:
642584
'@typescript-eslint/require-await': error
643585
'@typescript-eslint/return-await': error
644586

645-
# Disable for JS, Flow and TS
587+
# Disable for JS and TS
646588
'@typescript-eslint/init-declarations': off
647589
'@typescript-eslint/no-magic-numbers': off
648590
'@typescript-eslint/no-use-before-define': off
@@ -665,10 +607,6 @@ overrides:
665607
'@typescript-eslint/space-before-function-paren': off
666608
'@typescript-eslint/space-infix-ops': off
667609
'@typescript-eslint/type-annotation-spacing': off
668-
- files: 'src/**/*.d.ts'
669-
rules:
670-
import/order: off
671-
import/newline-after-import: off
672610
- files: 'src/**/__*__/**'
673611
rules:
674612
node/no-unpublished-import: [error, { allowModules: ['chai', 'mocha'] }]

.flowconfig

-39
This file was deleted.

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ ensure your pull request matches the style guides, run `npm run prettier`.
7373
- 80 character line length strongly preferred.
7474
- Prefer `'` over `"`
7575
- ES6 syntax when possible. However do not rely on ES6-specific functions to be available.
76-
- Use [Flow types](https://flowtype.org/).
76+
- Use [TypeScript](https://www.typescriptlang.org).
7777
- Use semicolons;
7878
- Trailing commas,
7979
- Avd abbr wrds.

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Lint ESLint
3030
run: npm run lint
3131

32-
- name: Lint Flow
32+
- name: Check Types
3333
run: npm run check
3434

3535
- name: Lint Prettier

.mocharc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
throw-deprecation: true
22
check-leaks: true
33
require:
4-
- '@babel/register'
4+
- 'resources/ts-register.js'

.prettierignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/flow-typed
2-
31
# Copied from '.gitignore', please keep it in sync.
42
/.eslintcache
53
/node_modules

cspell.yml

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ words:
2424
- graphiql
2525
- sublinks
2626
- instanceof
27-
- flowtype
2827

2928
# Different names used inside tests
3029
- Skywalker

0 commit comments

Comments
 (0)