Skip to content

Commit

Permalink
Removed console.logs
Browse files Browse the repository at this point in the history
* added eslint rule no-console
  • Loading branch information
storrisi committed Apr 3, 2019
1 parent cbe5b19 commit 4afa4cb
Show file tree
Hide file tree
Showing 21 changed files with 6 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"no-console": 0
"no-console": 1
}
}
1 change: 0 additions & 1 deletion src/actions/curationActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export function curateAction(token, spec) {
},
error => {
dispatch(actions.error(error))
console.log(error)
if (error.status === 400) {
const errors = flatten(error.body.errors)
errors.forEach(e => {
Expand Down
1 change: 0 additions & 1 deletion src/components/CrateSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default class CrateSelector extends Component {
const options = await getCrateSearch(this.props.token, value)
this.setState({ ...this.state, options, isLoading: false })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [], isLoading: false })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/CrateVersionPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default class CrateVersionPicker extends Component {
const options = await getCrateRevisions(this.props.token, name)
this.setState({ ...this.state, options })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [] })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/GitHubCommitPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default class GitHubCommitPicker extends Component {
const options = await getGitHubRevisions(path)
!this.isUnmounted && this.setState({ options, shouldUpdate: false })
} catch (error) {
console.log(error)
!this.isUnmounted && this.setState({ options: [], shouldUpdate: false })
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/GitHubSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default class GitHubSelector extends Component {
const options = await getGitHubSearch(this.props.token, value)
this.setState({ namespace: { options: options, isLoading: false } })
} catch (error) {
console.log(error)
this.setState({ namespace: { options: [], isLoading: false } })
}
}
Expand All @@ -65,7 +64,6 @@ export default class GitHubSelector extends Component {
const options = await getGitHubSearch(this.props.token, `${this.state.selectedNamespace}/${value}`)
this.setState({ component: { options: options, isLoading: false } })
} catch (error) {
console.log(error)
this.setState({ component: { options: [], isLoading: false } })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/MavenSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default class MavenSelector extends Component {
const options = await getMavenSearch(this.props.token, value.replace(':', '/'))
this.setState({ ...this.state, options, isLoading: false })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [], isLoading: false })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/MavenVersionPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default class MavenVersionPicker extends Component {
const options = await getMavenRevisions(this.props.token, path.replace(':', '/'))
this.setState({ ...this.state, options })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [] })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/Navigation/Ui/VersionSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class VersionSelector extends Component {
const options = await getRevisions(token, fullname, component.type, component.provider)
this.setState({ options, label })
} catch (error) {
console.log(error)
this.setState({ options: [] })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/NpmSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default class NpmSelector extends Component {
const options = await getNpmSearch(this.props.token, value)
this.setState({ ...this.state, options, isLoading: false })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [], isLoading: false })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/NpmVersionPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default class NpmVersionPicker extends Component {
const options = await getNpmRevisions(this.props.token, path)
this.setState({ ...this.state, options })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [] })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/NuGetSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default class NuGetSelector extends Component {
const options = await getNugetSearch(this.props.token, value)
this.setState({ ...this.state, options, isLoading: false })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [], isLoading: false })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/NuGetVersionPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default class NuGetVersionPicker extends Component {
const options = await getNugetRevisions(this.props.token, name)
this.setState({ ...this.state, options })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [] })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/PyPiSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default class PyPiSelector extends Component {
const options = await getPyPiSearch(this.props.token, value)
this.setState({ ...this.state, options, isLoading: false })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [], isLoading: false })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/PyPiVersionPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default class PyPiVersionPicker extends Component {
const options = await getPyPiRevisions(this.props.token, name)
this.setState({ ...this.state, options })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [] })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/RubyGemsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default class RubyGemsSelector extends Component {
const options = await getRubyGemsSearch(this.props.token, value)
this.setState({ ...this.state, options, isLoading: false })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [], isLoading: false })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/RubyGemsVersionPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default class RubyGemsVersionPicker extends Component {
const options = await getRubyGemsRevisions(this.props.token, name)
this.setState({ ...this.state, options })
} catch (error) {
console.log(error)
this.setState({ ...this.state, options: [] })
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/components/UserManagedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ export default class UserManagedList extends SystemManagedList {
const object = typeof content === 'string' ? JSON.parse(content) : content
if (this.isPackageLock(object)) return this.getListFromPackageLock(object.dependencies)
if (this.isClearlyDefinedList(object)) return object
} catch (error) {
console.log(error)
}
} catch (error) {}
return null
}

Expand Down
8 changes: 4 additions & 4 deletions src/registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ function registerValidSW(swUrl) {
// the fresh content will have been added to the cache.
// It's the perfect time to display a "New content is
// available; please refresh." message in your web app.
console.log('New content is available; please refresh.')
//console.log('New content is available; please refresh.')
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.')
//console.log('Content is cached for offline use.')
}
}
}
}
})
.catch(error => {
console.error('Error during service worker registration:', error)
//console.error('Error during service worker registration:', error)
})
}

Expand All @@ -91,7 +91,7 @@ function checkValidServiceWorker(swUrl) {
}
})
.catch(() => {
console.log('No internet connection found. App is running in offline mode.')
//console.log('No internet connection found. App is running in offline mode.')
})
}

Expand Down
1 change: 0 additions & 1 deletion src/utils/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default class Auth {
* Open the service's auth page and execute a callback with the returned data from the server
*/
static doLogin(callback) {
console.log('login')
window.open(url('auth/github'))
const tokenListener = e => {
if (e.data.type === 'github-token') {
Expand Down
1 change: 0 additions & 1 deletion src/utils/install-monaco.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// across windows and linux.
require('cpx').copy('node_modules/monaco-editor/min/vs/**/*', 'public/vs', error => {
if (error) {
console.log(error)
process.exit(1)
}
process.exit(0)
Expand Down

0 comments on commit 4afa4cb

Please sign in to comment.