Skip to content

Remove flow and jsdoc #93

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

Merged
merged 3 commits into from
Mar 17, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Set up `npm run lint` script.
}
```

The `github-lint` command will run `eslint`, `flow` and flow coverage checking depending on your project configuration.
The `github-lint` command will run various checkers and linters depending on your project configuration.
8 changes: 1 addition & 7 deletions bin/eslint-github-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ if (fs.existsSync(packagePath)) {
const dependencies = Object.keys(packageJSON.dependencies || {})
const devDependencies = Object.keys(packageJSON.devDependencies || {})

if (dependencies.includes('flow-bin') || devDependencies.includes('flow-bin')) {
defaults.typeSystem = 'flow'
}
if (dependencies.includes('typescript') || devDependencies.includes('typescript')) {
defaults.typeSystem = 'typescript'
}
Expand All @@ -45,7 +42,7 @@ const questions = [
type: 'list',
name: 'typeSystem',
message: 'What type system are you using?',
choices: ['flow', 'typescript', 'none'],
choices: ['typescript', 'none'],
default: defaults.typeSystem
}
]
Expand All @@ -61,7 +58,6 @@ inquirer.prompt(questions).then(answers => {
eslintrc.extends.push('plugin:github/browser')
}

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

const prettierConfig = []
if (answers.typeSystem === 'flow') prettierConfig.push('/* @flow */')

prettierConfig.push("module.exports = require('eslint-plugin-github/prettier.config')")
prettierConfig.push('')

Expand Down
119 changes: 0 additions & 119 deletions bin/flow-coverage.js

This file was deleted.

11 changes: 0 additions & 11 deletions bin/github-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

const childProcess = require('child_process')
const fs = require('fs')
const path = require('path')
const supportsColors = require('supports-color')

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

const packageJson = fs.existsSync('package.json') ? require(path.join(process.cwd(), 'package.json')) : {}

let eslintOptions = ['--report-unused-disable-directives', '.']

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

if (fs.existsSync('.flowconfig')) {
commands.push(['flow', ['check']])
}

if (packageJson && packageJson.flow && packageJson.flow.coverageThreshold) {
commands.push(['flow-coverage', []])
}

for (const [command, args] of commands) {
if (runs > 0) process.stderr.write('\n')
process.stderr.write(`> ${command} ${args.join(' ')}\n`)
Expand Down
4 changes: 0 additions & 4 deletions docs/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ A base layer of configuration recommended for any JS project. The [Prettier](htt

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

### `plugin:github/flow`

Recommended rules for projects using the [Flow type checker](https://flow.org/).

### `plugin:github/app`

Recommended rules when writing a browser application.
Expand Down
1 change: 0 additions & 1 deletion docs/package-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ Additional criteria for packages that are used at runtime rather than at build t
* MUST not declare specific polyfills in `package.json` `"dependencies"`. However, they MAY implicitly depend on polyfills already present in the environment.
* MUST not set or leak any global variables or monkey patch other object prototypes (with the exception of polyfills).
* 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.
* SHOULD provide [Flow](https://flowtype.org) type definitions.
3 changes: 0 additions & 3 deletions docs/rules/no-flow-weak.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/rules/no-noflow.md

This file was deleted.

14 changes: 0 additions & 14 deletions lib/configs/flow.js

This file was deleted.

23 changes: 1 addition & 22 deletions lib/configs/recommended.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
plugins: ['github', 'prettier', 'eslint-comments', 'jsdoc'],
plugins: ['github', 'prettier', 'eslint-comments'],
env: {
commonjs: true
},
Expand All @@ -14,27 +14,6 @@ module.exports = {
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
'github/no-implicit-buggy-globals': 'error',
'jsdoc/check-alignment': 'error',
'jsdoc/check-examples': ['error', {rejectExampleCodeRegex: '<.*>'}],
'jsdoc/check-param-names': 'error',
'jsdoc/check-syntax': 'error',
'jsdoc/check-tag-names': 'error',
'jsdoc/check-types': 'error',
'jsdoc/implements-on-classes': 'error',
'jsdoc/match-description': 'error',
'jsdoc/newline-after-description': 'error',
'jsdoc/require-description': 'error',
'jsdoc/require-description-complete-sentence': 'error',
'jsdoc/require-hyphen-before-param-description': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-description': 'error',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/require-returns': 'error',
'jsdoc/require-returns-check': 'error',
'jsdoc/require-returns-description': 'error',
'jsdoc/require-returns-type': 'error',
'jsdoc/valid-types': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
Expand Down
4 changes: 0 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ module.exports = {
'async-preventdefault': require('./rules/async-preventdefault'),
'authenticity-token': require('./rules/authenticity-token'),
'dependency-graph': require('./rules/dependency-graph'),
'flow-to-typescript': require('./rules/flow-to-typescript'),
'get-attribute': require('./rules/get-attribute'),
'js-class-name': require('./rules/js-class-name'),
'no-blur': require('./rules/no-blur'),
'no-d-none': require('./rules/no-d-none'),
'no-dataset': require('./rules/no-dataset'),
'no-flow-weak': require('./rules/no-flow-weak'),
'no-implicit-buggy-globals': require('./rules/no-implicit-buggy-globals'),
'no-innerText': require('./rules/no-innerText'),
'no-noflow': require('./rules/no-noflow'),
'no-then': require('./rules/no-then'),
'unescaped-html-literal': require('./rules/unescaped-html-literal'),
'unused-export': require('./rules/unused-export'),
Expand All @@ -24,7 +21,6 @@ module.exports = {
app: require('./configs/app'),
browser: require('./configs/browser'),
es6: require('./configs/es6'),
flow: require('./configs/flow'),
node: require('./configs/node'),
recommended: require('./configs/recommended'),
typescript: require('./configs/typescript')
Expand Down
18 changes: 0 additions & 18 deletions lib/rules/flow-to-typescript.js

This file was deleted.

24 changes: 0 additions & 24 deletions lib/rules/no-flow-weak.js

This file was deleted.

24 changes: 0 additions & 24 deletions lib/rules/no-noflow.js

This file was deleted.

Loading