Skip to content

Commit 37b0f90

Browse files
authoredApr 28, 2021
feat: drop flowtype support (#412)
BREAKING CHANGE: drop flowytpe support. remove `@cybozu/eslint-config/presets/flowtype`,`@cybozu/eslint-config/presets/flowtype`, and `@cybozu/eslint-config/presets/react-flowtype-prettier`
1 parent ebaa62c commit 37b0f90

13 files changed

+157
-5729
lines changed
 

‎.eslintrc.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
22
root: true,
3-
extends: "./presets/react-flowtype-prettier.js",
3+
extends: "./presets/react-typescript-prettier.js",
44
env: {
55
node: true,
6-
mocha: true
7-
}
6+
mocha: true,
7+
},
88
};

‎README.md

-5
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@ module.exports = {
8585
- ⚠️ A11y rules are being defined as warnings, which is an experimental so we might change the rules in later
8686
- `@cybozu/eslint-config/presets/react-typescript`
8787
- Including `@cybozu/eslint-config/presets/typescript` and `@cybozu/eslint-config/presets/react`
88-
- `@cybozu/eslint-config/presets/flowtype`
89-
- Including `eslint-plugin-flowtype`
90-
- `@cybozu/eslint-config/presets/react-flowtype`
91-
- Including `@cybozu/eslint-config/presets/react` and `eslint-plugin-flowtype`
9288
- `@cybozu/eslint-config/presets/es5`
9389

9490
## Prettier Support
@@ -114,7 +110,6 @@ In order to this, you have to install `prettier` and choose a preset from the fo
114110
- `@cybozu/eslint-config/presets/typescript-prettier`
115111
- `@cybozu/eslint-config/presets/react-typescript-prettier`
116112
- `@cybozu/eslint-config/presets/react-prettier`
117-
- `@cybozu/eslint-config/presets/react-flowtype-prettier`
118113
- `@cybozu/eslint-config/presets/es5-prettier`
119114

120115
**Currently, we don't support customized Prettier config**

‎lib/flowtype.js

-48
This file was deleted.

‎package-lock.json

+154-5,561
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"@typescript-eslint/parser": "^4.22.0",
4646
"babel-eslint": "^10.1.0",
4747
"eslint-config-prettier": "^8.1.0",
48-
"eslint-plugin-flowtype": "^5.4.0",
4948
"eslint-plugin-import": "^2.22.1",
5049
"eslint-plugin-jsx-a11y": "^6.4.1",
5150
"eslint-plugin-node": "^11.1.0",

‎presets/flowtype.js

-3
This file was deleted.

‎presets/react-flowtype-prettier.js

-8
This file was deleted.

‎presets/react-flowtype.js

-3
This file was deleted.

‎test/fixtures/flowtype/error.js

-10
This file was deleted.

‎test/fixtures/flowtype/ok.js

-24
This file was deleted.

‎test/fixtures/flowtype/warning.js

-10
This file was deleted.

‎test/flowtype-test.js

-18
This file was deleted.

‎test/presets-test.js

-35
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,6 @@ describe("presets", () => {
2424
);
2525
});
2626
});
27-
describe("flowtype", () => {
28-
it("should be able to use flowtype as well as lib/base and lib/flowtype", async () => {
29-
assert.deepStrictEqual(
30-
await runLintWithFixtures("flowtype"),
31-
await runLintWithFixtures("flowtype", "presets/flowtype.js")
32-
);
33-
assert.deepStrictEqual(
34-
await runLintWithFixtures("base"),
35-
await runLintWithFixtures("base", "presets/flowtype.js")
36-
);
37-
});
38-
});
39-
describe("react-flowtype", () => {
40-
it("should be able to use react-flowtype as well as lib/react and lib/flowtype", async () => {
41-
assert.deepStrictEqual(
42-
await runLintWithFixtures("react", "presets/react.js"),
43-
await runLintWithFixtures("react", "presets/react-flowtype.js")
44-
);
45-
assert.deepStrictEqual(
46-
await runLintWithFixtures("flowtype"),
47-
await runLintWithFixtures("flowtype", "presets/react-flowtype.js")
48-
);
49-
});
50-
});
5127
describe("node", () => {
5228
it("should be able to use node as well as lib/node", async () => {
5329
assert.deepStrictEqual(
@@ -92,17 +68,6 @@ describe("presets", () => {
9268
);
9369
});
9470
});
95-
describe("react-flowtype-prettier", () => {
96-
it("should be able to use react-flowtype-prettier as well as lib/prettier", async () => {
97-
assert.deepStrictEqual(
98-
await runLintWithFixtures("prettier"),
99-
await runLintWithFixtures(
100-
"prettier",
101-
"presets/react-flowtype-prettier.js"
102-
)
103-
);
104-
});
105-
});
10671
describe("node-prettier", () => {
10772
it("should be able to use node-prettier as well as lib/prettier", async () => {
10873
assert.deepStrictEqual(

0 commit comments

Comments
 (0)
Please sign in to comment.