Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove flow check scripts #14785

Merged
merged 7 commits into from Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 0 additions & 38 deletions .flowconfig

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -171,7 +171,7 @@ jobs:
with:
name: babel-artifact
- name: Lint
run: make -j tscheck flowcheck-ci lint-ci
run: make -j tscheck lint-ci

test:
name: Test on Node.js # GitHub will add ${{ matrix.node-version }} to this title
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
BABEL_8_BREAKING: true
STRIP_BABEL_8_FLAG: true
- name: Lint
run: make -j tscheck flowcheck-ci lint-ci
run: make -j tscheck lint-ci
env:
BABEL_ENV: test
BABEL_8_BREAKING: true
Expand Down
1 change: 0 additions & 1 deletion .gitpod.yml
Expand Up @@ -37,4 +37,3 @@ vscode:
extensions:
- dbaeumer.vscode-eslint@2.1.5:9Wg0Glx/TwD8ElFBg+FKcQ==
- esbenp.prettier-vscode@5.0.0:qca7d0cHbKkrkb5rvNlpcg==
- flowtype.flow-for-vscode@1.5.0:AwOT6wgHTF43loZQCAUMLA==
8 changes: 1 addition & 7 deletions Makefile
Expand Up @@ -74,18 +74,12 @@ build-plugin-transform-runtime-dist:
watch: build-no-bundle
BABEL_ENV=development $(YARN) gulp watch

flowcheck-ci:
$(MAKE) flow

code-quality: tscheck flow lint
code-quality: tscheck lint

tscheck: generate-tsconfig
rm -rf dts
$(YARN) tsc -b .

flow: build-flow-typings
$(YARN) flow check --strip-root

lint-ci: lint check-compat-data-ci
liuxingbaoyu marked this conversation as resolved.
Show resolved Hide resolved

check-compat-data-ci:
Expand Down
4 changes: 2 additions & 2 deletions babel.config.js
Expand Up @@ -172,6 +172,8 @@ module.exports = function (api) {
.filter(Boolean)
.map(normalize),
presets: [
// presets are applied from right to left
["@babel/env", envOpts],
[
"@babel/preset-typescript",
{
Expand All @@ -180,8 +182,6 @@ module.exports = function (api) {
optimizeConstEnums: true,
},
],
["@babel/env", envOpts],
["@babel/preset-flow", { allowDeclareFields: true }],
],
plugins: [
["@babel/proposal-object-rest-spread", { useBuiltIns: true }],
Expand Down
6 changes: 1 addition & 5 deletions eslint/babel-eslint-config-internal/index.js
Expand Up @@ -3,9 +3,7 @@
module.exports = {
parser: "@babel/eslint-parser/experimental-worker",
extends: "eslint:recommended",
plugins: ["flowtype"],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
globals: {
Expand All @@ -15,7 +13,7 @@ module.exports = {
},
env: {
node: true,
es2020: true,
es2022: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-environments, es2022: true implies parserOptions.ecmaVersion: 2022, so I removed the former option.

browser: true,
},
rules: {
Expand All @@ -27,7 +25,5 @@ module.exports = {
"no-process-exit": "error",
"no-var": "error",
"prefer-const": "error",
"flowtype/define-flow-type": "warn",
"flowtype/use-flow-type": "warn",
},
};
3 changes: 1 addition & 2 deletions eslint/babel-eslint-config-internal/package.json
Expand Up @@ -10,7 +10,6 @@
"./package.json": "./package.json"
},
"peerDependencies": {
"@babel/eslint-parser": "^7.16.0",
"eslint-plugin-flowtype": "^8.0.3"
"@babel/eslint-parser": "^7.16.0"
}
}
2 changes: 1 addition & 1 deletion eslint/babel-eslint-plugin/src/rules/semi.cjs
Expand Up @@ -47,7 +47,7 @@ function isOneLinerBlock(context, node) {
);
}

function report(context, node, missing?) {
function report(context, node, missing) {
const lastToken = context.getSourceCode().getLastToken(node);

let message,
Expand Down