Skip to content

Commit

Permalink
remove react config
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Mar 9, 2020
1 parent c21dd0d commit a6fc17f
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 345 deletions.
13 changes: 0 additions & 13 deletions bin/eslint-github-init.js
Expand Up @@ -8,7 +8,6 @@ const defaults = {
project: 'lib',
env: 'browser',
typeSystem: 'none',
react: true,
relay: true
}

Expand All @@ -20,7 +19,6 @@ if (fs.existsSync(packagePath)) {
const dependencies = Object.keys(packageJSON.dependencies || {})
const devDependencies = Object.keys(packageJSON.devDependencies || {})

defaults.react = dependencies.includes('react') || devDependencies.includes('react')
defaults.relay = dependencies.includes('relay') || devDependencies.includes('relay')

if (dependencies.includes('flow-bin') || devDependencies.includes('flow-bin')) {
Expand Down Expand Up @@ -58,13 +56,6 @@ const questions = [
name: 'relay',
message: 'Are you using Relay?',
default: defaults.relay
},
{
type: 'confirm',
name: 'react',
message: 'Are you using React?',
default: defaults.react,
when: answers => answers.env === 'browser'
}
]

Expand Down Expand Up @@ -96,14 +87,10 @@ inquirer.prompt(questions).then(answers => {
moduleResolution: 'node'
}
}
if (answers.react) {
tsconfigDefaults.compilerOptions.jsx = 'react'
}
fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfigDefaults, null, ' '), 'utf8')
}
}

if (answers.react) eslintrc.extends.push('plugin:github/react')
if (answers.relay) eslintrc.extends.push('plugin:github/relay')

fs.writeFileSync(path.resolve(process.cwd(), '.eslintrc.json'), JSON.stringify(eslintrc, null, ' '), 'utf8')
Expand Down
4 changes: 0 additions & 4 deletions docs/configs.md
Expand Up @@ -30,10 +30,6 @@ Recommended rules when using Babel to transpile features from ES2015+.

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

### `plugin:github/react`

Recommended rules for projects using [React](https://reactjs.org/).

### `plugin:github/relay`

Recommended rules for projects using [Relay](http://facebook.github.io/relay/) (and React).
Expand Down
136 changes: 0 additions & 136 deletions lib/configs/react.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/index.js
Expand Up @@ -26,7 +26,6 @@ module.exports = {
es6: require('./configs/es6'),
flow: require('./configs/flow'),
node: require('./configs/node'),
react: require('./configs/react'),
recommended: require('./configs/recommended'),
relay: require('./configs/relay'),
typescript: require('./configs/typescript')
Expand Down

0 comments on commit a6fc17f

Please sign in to comment.