Skip to content

Commit

Permalink
feat(api): convert filters API to TypeScript
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The filters are now written in TypeScript.

Flow types are no longer available, and TypeScript types are built-in.
  • Loading branch information
thibaudcolas committed Jun 6, 2022
1 parent 28e74f6 commit 1dfbf00
Show file tree
Hide file tree
Showing 44 changed files with 606 additions and 558 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
REACT_APP_RAVEN=""
SKIP_PREFLIGHT_CHECK=true
1 change: 0 additions & 1 deletion .env.production

This file was deleted.

25 changes: 0 additions & 25 deletions .flowconfig

This file was deleted.

8 changes: 4 additions & 4 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ PATCH_STAGED=$(git --no-pager diff --name-only --diff-filter=ACM $STAGED)
# Files which are fully staged.
FULLY_STAGED=$(comm -23 <(echo "$STAGED") <(echo "$PATCH_STAGED"))

JS_STAGED=$(grep -e '.js$' -e '.jsx$' <<< "$STAGED" || true)
JS_FULLY_STAGED=$(grep -e '.js$' -e '.jsx$' <<< "$FULLY_STAGED" || true)
JS_STAGED=$(grep -e '.js$' -e '.ts$' -e '.tsx$' <<< "$STAGED" || true)
JS_FULLY_STAGED=$(grep -e '.js$' -e '.ts$' -e '.tsx$' <<< "$FULLY_STAGED" || true)
SNAPSHOT_STAGED=$(grep .snap$ <<< "$STAGED" || true)
PRETTIER_STAGED=$(grep -E '.(md|css|scss|js|json|yaml|yml|html)$' <<< "$STAGED" || true)
PRETTIER_FULLY_STAGED=$(grep -E '.(md|css|scss|js|json|yaml|yml|html)$' <<< "$FULLY_STAGED" || true)
PRETTIER_STAGED=$(grep -E '.(md|css|scss|js|ts|tsx|json|yaml|yml|html)$' <<< "$STAGED" || true)
PRETTIER_FULLY_STAGED=$(grep -E '.(md|css|scss|js|ts|tsx|json|yaml|yml|html)$' <<< "$FULLY_STAGED" || true)

# Uncomment, and add more variables to the list, for debugging help.
# tr ' ' '\n' <<< "STAGED $STAGED PATCH_STAGED $PATCH_STAGED FULLY_STAGED $FULLY_STAGED JS_STAGED $JS_STAGED JS_FULLY_STAGED $JS_FULLY_STAGED SNAPSHOT_STAGED $SNAPSHOT_STAGED"
Expand Down
5 changes: 2 additions & 3 deletions .githooks/pre-commit.9.build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env bash

FLOW_STAGED=$(grep -e '.flowconfig$' <<< "$STAGED" || true)
TS_STAGED=$(grep 'tsconfig.json' <<< "$STAGED" || true)

if [ -n "$JS_STAGED" ] || [ -n "$FLOW_STAGED" ];
if [ -n "$JS_STAGED" ] || [ -n "$TS_STAGED" ];
then
npm run build
npx flow
fi
3 changes: 1 addition & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"draft-js",
"draft-js-10",
"normalize.css",
"flow-bin",
"react",
"react-dom",
"react-test-renderer",
Expand Down Expand Up @@ -41,7 +40,7 @@
// https://renovatebot.com/docs/node/#configuring-support-policy
supportPolicy: ["current"],
},
"vulnerabilityAlerts": {
vulnerabilityAlerts: {
automerge: true,
},
packageRules: [
Expand Down
2 changes: 0 additions & 2 deletions dangerfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @flow
// flowlint untyped-import:off
const { danger, message, warn, fail, schedule } = require("danger")
const semanticRelease = require("semantic-release")
const envCi = require("env-ci")
Expand Down
4 changes: 1 addition & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ nvm use
npm run start
# Runs linting.
npm run lint
# Start a Flow server for type errors.
npx flow
# Re-formats all of the files in the project (with Prettier).
npm run format
# Run tests in a watcher.
Expand All @@ -45,4 +43,4 @@ npm run

### Code style

This project uses [Prettier](https://prettier.io/), [ESLint](https://eslint.org/), and [Flow](https://flow.org/). All code should always be checked with those tools.
This project uses [Prettier](https://prettier.io/), [ESLint](https://eslint.org/), and [TypeScript](https://www.typescriptlang.org/). All code should always be checked with those tools.
113 changes: 0 additions & 113 deletions flow-typed/npm/react-dom_v16.x.x.js

This file was deleted.

0 comments on commit 1dfbf00

Please sign in to comment.