Skip to content

Commit e278c1f

Browse files
authored
Merge pull request #93 from github/remove-flow-and-jsdoc
Remove flow and jsdoc
2 parents 54e17c2 + 47c398c commit e278c1f

19 files changed

+4
-365
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 & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
const childProcess = require('child_process')
77
const fs = require('fs')
8-
const path = require('path')
98
const supportsColors = require('supports-color')
109

1110
const hasBasicColorSupport = supportsColors.stdout.hasBasic && supportsColors.stderr.hasBasic
@@ -23,8 +22,6 @@ function execFile(command, args) {
2322
const codes = []
2423
const commands = []
2524

26-
const packageJson = fs.existsSync('package.json') ? require(path.join(process.cwd(), 'package.json')) : {}
27-
2825
let eslintOptions = ['--report-unused-disable-directives', '.']
2926

3027
if (hasBasicColorSupport) {
@@ -43,14 +40,6 @@ function execFile(command, args) {
4340
commands.push(['tsc', ['--noEmit']])
4441
}
4542

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-
5443
for (const [command, args] of commands) {
5544
if (runs > 0) process.stderr.write('\n')
5645
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/configs/recommended.js

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
plugins: ['github', 'prettier', 'eslint-comments', 'jsdoc'],
2+
plugins: ['github', 'prettier', 'eslint-comments'],
33
env: {
44
commonjs: true
55
},
@@ -14,27 +14,6 @@ module.exports = {
1414
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
1515
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
1616
'github/no-implicit-buggy-globals': 'error',
17-
'jsdoc/check-alignment': 'error',
18-
'jsdoc/check-examples': ['error', {rejectExampleCodeRegex: '<.*>'}],
19-
'jsdoc/check-param-names': 'error',
20-
'jsdoc/check-syntax': 'error',
21-
'jsdoc/check-tag-names': 'error',
22-
'jsdoc/check-types': 'error',
23-
'jsdoc/implements-on-classes': 'error',
24-
'jsdoc/match-description': 'error',
25-
'jsdoc/newline-after-description': 'error',
26-
'jsdoc/require-description': 'error',
27-
'jsdoc/require-description-complete-sentence': 'error',
28-
'jsdoc/require-hyphen-before-param-description': 'error',
29-
'jsdoc/require-param': 'error',
30-
'jsdoc/require-param-description': 'error',
31-
'jsdoc/require-param-name': 'error',
32-
'jsdoc/require-param-type': 'error',
33-
'jsdoc/require-returns': 'error',
34-
'jsdoc/require-returns-check': 'error',
35-
'jsdoc/require-returns-description': 'error',
36-
'jsdoc/require-returns-type': 'error',
37-
'jsdoc/valid-types': 'error',
3817
'no-case-declarations': 'error',
3918
'no-class-assign': 'error',
4019
'no-compare-neg-zero': 'error',

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.

0 commit comments

Comments
 (0)