Skip to content

Commit ae60a56

Browse files
committed
remove flow
1 parent 54e17c2 commit ae60a56

18 files changed

+3
-306
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Set up `npm run lint` script.
2424
}
2525
```
2626

27-
The `github-lint` command will run `eslint`, `flow` and flow coverage checking depending on your project configuration.
27+
The `github-lint` command will run various checkers and linters depending on your project configuration.

bin/eslint-github-init.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ if (fs.existsSync(packagePath)) {
1818
const dependencies = Object.keys(packageJSON.dependencies || {})
1919
const devDependencies = Object.keys(packageJSON.devDependencies || {})
2020

21-
if (dependencies.includes('flow-bin') || devDependencies.includes('flow-bin')) {
22-
defaults.typeSystem = 'flow'
23-
}
2421
if (dependencies.includes('typescript') || devDependencies.includes('typescript')) {
2522
defaults.typeSystem = 'typescript'
2623
}
@@ -45,7 +42,7 @@ const questions = [
4542
type: 'list',
4643
name: 'typeSystem',
4744
message: 'What type system are you using?',
48-
choices: ['flow', 'typescript', 'none'],
45+
choices: ['typescript', 'none'],
4946
default: defaults.typeSystem
5047
}
5148
]
@@ -61,7 +58,6 @@ inquirer.prompt(questions).then(answers => {
6158
eslintrc.extends.push('plugin:github/browser')
6259
}
6360

64-
if (answers.typeSystem === 'flow') eslintrc.extends.push('plugin:github/flow')
6561
if (answers.typeSystem === 'typescript') {
6662
eslintrc.extends.push('plugin:github/typescript')
6763
eslintrc.parser = '@typescript-eslint/parser'
@@ -85,8 +81,6 @@ inquirer.prompt(questions).then(answers => {
8581
fs.writeFileSync(path.resolve(process.cwd(), '.eslintrc.json'), JSON.stringify(eslintrc, null, ' '), 'utf8')
8682

8783
const prettierConfig = []
88-
if (answers.typeSystem === 'flow') prettierConfig.push('/* @flow */')
89-
9084
prettierConfig.push("module.exports = require('eslint-plugin-github/prettier.config')")
9185
prettierConfig.push('')
9286

bin/flow-coverage.js

Lines changed: 0 additions & 119 deletions
This file was deleted.

bin/github-lint.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ function execFile(command, args) {
4343
commands.push(['tsc', ['--noEmit']])
4444
}
4545

46-
if (fs.existsSync('.flowconfig')) {
47-
commands.push(['flow', ['check']])
48-
}
49-
50-
if (packageJson && packageJson.flow && packageJson.flow.coverageThreshold) {
51-
commands.push(['flow-coverage', []])
52-
}
53-
5446
for (const [command, args] of commands) {
5547
if (runs > 0) process.stderr.write('\n')
5648
process.stderr.write(`> ${command} ${args.join(' ')}\n`)

docs/configs.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ A base layer of configuration recommended for any JS project. The [Prettier](htt
2626

2727
Recommended rules when using Babel to transpile features from ES2015+.
2828

29-
### `plugin:github/flow`
30-
31-
Recommended rules for projects using the [Flow type checker](https://flow.org/).
32-
3329
### `plugin:github/app`
3430

3531
Recommended rules when writing a browser application.

docs/package-requirements.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ Additional criteria for packages that are used at runtime rather than at build t
2020
* MUST not declare specific polyfills in `package.json` `"dependencies"`. However, they MAY implicitly depend on polyfills already present in the environment.
2121
* MUST not set or leak any global variables or monkey patch other object prototypes (with the exception of polyfills).
2222
* Polyfill libraries MUST have an associated [Working Draft](https://www.w3.org/2004/02/Process-20040205/tr.html#first-wd) specification published by a standards body. Polyfills based on Editor's Draft are too early to implement and depend on.
23-
* SHOULD provide [Flow](https://flowtype.org) type definitions.

docs/rules/no-flow-weak.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/rules/no-noflow.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/configs/flow.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ module.exports = {
55
'async-preventdefault': require('./rules/async-preventdefault'),
66
'authenticity-token': require('./rules/authenticity-token'),
77
'dependency-graph': require('./rules/dependency-graph'),
8-
'flow-to-typescript': require('./rules/flow-to-typescript'),
98
'get-attribute': require('./rules/get-attribute'),
109
'js-class-name': require('./rules/js-class-name'),
1110
'no-blur': require('./rules/no-blur'),
1211
'no-d-none': require('./rules/no-d-none'),
1312
'no-dataset': require('./rules/no-dataset'),
14-
'no-flow-weak': require('./rules/no-flow-weak'),
1513
'no-implicit-buggy-globals': require('./rules/no-implicit-buggy-globals'),
1614
'no-innerText': require('./rules/no-innerText'),
17-
'no-noflow': require('./rules/no-noflow'),
1815
'no-then': require('./rules/no-then'),
1916
'unescaped-html-literal': require('./rules/unescaped-html-literal'),
2017
'unused-export': require('./rules/unused-export'),
@@ -24,7 +21,6 @@ module.exports = {
2421
app: require('./configs/app'),
2522
browser: require('./configs/browser'),
2623
es6: require('./configs/es6'),
27-
flow: require('./configs/flow'),
2824
node: require('./configs/node'),
2925
recommended: require('./configs/recommended'),
3026
typescript: require('./configs/typescript')

lib/rules/flow-to-typescript.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

lib/rules/no-flow-weak.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

lib/rules/no-noflow.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

package-lock.json

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"eslint-github-init": "bin/eslint-github-init.js",
1111
"eslint-ignore-errors": "bin/eslint-ignore-errors.js",
1212
"eslint-unused-modules": "bin/eslint-unused-modules.js",
13-
"flow-coverage": "bin/flow-coverage.js",
1413
"github-lint": "bin/github-lint.js",
1514
"npm-check-github-package-requirements": "bin/npm-check-github-package-requirements.js"
1615
},
@@ -38,7 +37,6 @@
3837
"babel-eslint": ">=10.0.3",
3938
"eslint-config-prettier": ">=6.4.0",
4039
"eslint-plugin-eslint-comments": ">=3.0.1",
41-
"eslint-plugin-flowtype": ">=4.3.0",
4240
"eslint-plugin-import": ">=2.18.2",
4341
"eslint-plugin-jsdoc": ">=15.5.2",
4442
"eslint-plugin-prettier": ">=2.6.0",
@@ -50,8 +48,7 @@
5048
"svg-element-attributes": ">=1.2.1"
5149
},
5250
"peerDependencies": {
53-
"eslint": ">=4.19.0",
54-
"flow-bin": ">=0.70.0"
51+
"eslint": ">=4.19.0"
5552
},
5653
"files": [
5754
"bin/*",
@@ -60,7 +57,6 @@
6057
],
6158
"devDependencies": {
6259
"eslint": ">=6.5.1",
63-
"flow-bin": ">=0.110.1",
6460
"mocha": ">=6.2.2",
6561
"rimraf": "^3.0.0"
6662
}

tests/flow-to-typescript.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)