diff --git a/.eslintrc.yaml b/.eslintrc.yaml index b3b571ef53d..c046d32d35c 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -30,7 +30,7 @@ extends: plugins: - jest - - flowtype + - ft-flow # - react-native # see commented-out rules config below env: @@ -321,28 +321,28 @@ rules: # # ================================================================ - # Flow; plugin `flowtype`. + # Flow; plugin `ft-flow`. # - flowtype/boolean-style: [error, boolean] - flowtype/define-flow-type: warn - flowtype/delimiter-dangle: off - flowtype/no-dupe-keys: error - flowtype/no-primitive-constructor-types: error - flowtype/no-types-missing-file-annotation: error - ################# flowtype/no-weak-types: error - # flowtype/require-parameter-type: error - flowtype/require-readonly-react-props: error - # flowtype/require-return-type: [error, always, {annotateUndefined: never}] - flowtype/require-valid-file-annotation: error - flowtype/semi: [error, always] - flowtype/space-before-generic-bracket: [error, never] - flowtype/space-before-type-colon: [error, never] + ft-flow/boolean-style: [error, boolean] + ft-flow/define-flow-type: warn + ft-flow/delimiter-dangle: off + ft-flow/no-dupe-keys: error + ft-flow/no-primitive-constructor-types: error + ft-flow/no-types-missing-file-annotation: error + ################# ft-flow/no-weak-types: error + # ft-flow/require-parameter-type: error + ft-flow/require-readonly-react-props: error + # ft-flow/require-return-type: [error, always, {annotateUndefined: never}] + ft-flow/require-valid-file-annotation: error + ft-flow/semi: [error, always] + ft-flow/space-before-generic-bracket: [error, never] + ft-flow/space-before-type-colon: [error, never] # For more formatting rules, see tools/formatting.eslintrc.yaml. - flowtype/type-id-match: [error, '^([A-Z][a-z0-9]+)+$'] - flowtype/union-intersection-spacing: [error, always] - flowtype/use-flow-type: warn - flowtype/valid-syntax: warn + ft-flow/type-id-match: [error, '^([A-Z][a-z0-9]+)+$'] + ft-flow/union-intersection-spacing: [error, always] + ft-flow/use-flow-type: warn + ft-flow/valid-syntax: warn overrides: diff --git a/package.json b/package.json index a752a8964ae..1a0c6d95e89 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "eslint": "^8.15.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-flowtype": "^8.0.3", + "eslint-plugin-ft-flow": "^2.0.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^26.1.5", "eslint-plugin-jsx-a11y": "^6.4.1", diff --git a/src/api/modelTypes.js b/src/api/modelTypes.js index 499b9496f2e..c98686a8e58 100644 --- a/src/api/modelTypes.js +++ b/src/api/modelTypes.js @@ -27,7 +27,7 @@ export type * from './idTypes'; * CustomProfileFieldTypeValues for a list of values. */ // This is an enum; see discussion on other enums. -// eslint-disable-next-line flowtype/type-id-match +// eslint-disable-next-line ft-flow/type-id-match export type CustomProfileFieldTypeT = 1 | 2 | 3 | 4 | 5 | 6 | 7; /** diff --git a/src/api/permissionsTypes.js b/src/api/permissionsTypes.js index 3af3f419221..3b29860eeb0 100644 --- a/src/api/permissionsTypes.js +++ b/src/api/permissionsTypes.js @@ -11,7 +11,7 @@ import { objectValues } from '../flowPonyfill'; // Or we could leapfrog TS and make this a Flow enum: // https://flow.org/en/docs/enums/ // (TS has its own enums, but they are a mess.) -// eslint-disable-next-line flowtype/type-id-match +// eslint-disable-next-line ft-flow/type-id-match export type RoleT = 100 | 200 | 300 | 400 | 600; /** @@ -49,7 +49,7 @@ export const RoleValues: $ReadOnlyArray = objectValues(Role); * * For the policy for web-public streams, see CreateWebPublicStreamPolicyT. */ -// eslint-disable-next-line flowtype/type-id-match +// eslint-disable-next-line ft-flow/type-id-match export type CreatePublicOrPrivateStreamPolicyT = 1 | 2 | 3 | 4; /** @@ -94,7 +94,7 @@ export const CreatePublicOrPrivateStreamPolicyValues: $ReadOnlyArray