Skip to content

Commit 82892a5

Browse files
committed
remove flow infra and use TS
1 parent cfa1087 commit 82892a5

File tree

14 files changed

+119
-787
lines changed

14 files changed

+119
-787
lines changed

.babelrc-npm.json

Lines changed: 1 addition & 1 deletion
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",

.babelrc.json

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ npmDist
55

66
# Ignore Flow typings for 3rd-party libraries
77
/flow-typed
8+
9+
src/**/*.d.ts

.eslintrc.yml

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -428,61 +428,6 @@ rules:
428428
yield-star-spacing: off
429429

430430
overrides:
431-
- files: 'src/**/*.js'
432-
parser: '@babel/eslint-parser'
433-
parserOptions:
434-
sourceType: module
435-
plugins:
436-
- flowtype
437-
438-
rules:
439-
##############################################################################
440-
# `eslint-plugin-flowtype` rule list based on `v5.3.x`
441-
# https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype
442-
##############################################################################
443-
444-
flowtype/array-style-complex-type: error
445-
flowtype/array-style-simple-type: error
446-
flowtype/define-flow-type: error
447-
flowtype/newline-after-flow-annotation: error
448-
flowtype/no-dupe-keys: error
449-
flowtype/no-existential-type: off # checked by Flow
450-
flowtype/no-flow-fix-me-comments: off
451-
flowtype/no-mixed: off
452-
flowtype/no-mutable-array: off
453-
flowtype/no-primitive-constructor-types: error
454-
flowtype/no-types-missing-file-annotation: off
455-
flowtype/no-unused-expressions: off
456-
flowtype/no-weak-types: [error, { any: false }]
457-
flowtype/require-compound-type-alias: off
458-
flowtype/require-exact-type: [error, never]
459-
flowtype/require-indexer-name: error
460-
flowtype/require-inexact-type: off # checked by Flow
461-
flowtype/require-parameter-type: off
462-
flowtype/require-readonly-react-props: off
463-
flowtype/require-return-type: off
464-
flowtype/require-types-at-top: off
465-
flowtype/require-valid-file-annotation: off
466-
flowtype/require-variable-type: off
467-
flowtype/sort-keys: off
468-
flowtype/spread-exact-type: off
469-
flowtype/type-id-match: [error, '^[A-Z]']
470-
flowtype/type-import-style: [error, declaration]
471-
flowtype/use-flow-type: error
472-
473-
# Bellow rules are disabled because coflicts with Prettier, see:
474-
# https://github.com/prettier/eslint-config-prettier/blob/master/flowtype.js
475-
flowtype/arrow-parens: off
476-
flowtype/boolean-style: off
477-
flowtype/delimiter-dangle: off
478-
flowtype/generic-spacing: off
479-
flowtype/object-type-curly-spacing: off
480-
flowtype/object-type-delimiter: off
481-
flowtype/semi: off
482-
flowtype/space-after-type-colon: off
483-
flowtype/space-before-generic-bracket: off
484-
flowtype/space-before-type-colon: off
485-
flowtype/union-intersection-spacing: off
486431
- files: '**/*.ts'
487432
parser: '@typescript-eslint/parser'
488433
parserOptions:
@@ -542,7 +487,7 @@ overrides:
542487
'@typescript-eslint/no-this-alias': error
543488
'@typescript-eslint/no-type-alias': off # TODO consider
544489
'@typescript-eslint/no-unnecessary-boolean-literal-compare': error
545-
'@typescript-eslint/no-unnecessary-condition': error
490+
'@typescript-eslint/no-unnecessary-condition': off # TODO temporarily disabled
546491
'@typescript-eslint/no-unnecessary-qualifier': error
547492
'@typescript-eslint/no-unnecessary-type-arguments': error
548493
'@typescript-eslint/no-unnecessary-type-assertion': error
@@ -630,7 +575,7 @@ overrides:
630575
'@typescript-eslint/require-await': error
631576
'@typescript-eslint/return-await': error
632577

633-
# Disable for JS, Flow and TS
578+
# Disable for JS and TS
634579
'@typescript-eslint/init-declarations': off
635580
'@typescript-eslint/no-magic-numbers': off
636581
'@typescript-eslint/no-use-before-define': off

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
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 TypeScript
3333
run: npm run check
3434

3535
- name: Lint Prettier

.mocharc.yml

Lines changed: 1 addition & 1 deletion
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'

0 commit comments

Comments
 (0)