Skip to content
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

decaffeinate and update deps #464

Merged
merged 2 commits into from
Feb 6, 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
1 change: 0 additions & 1 deletion .coffeelintignore

This file was deleted.

25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
jasmine: true,
atomtest: true
},
extends: [
'standard'
],
globals: {
atom: 'readonly',
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018
},
rules: {
"handle-callback-err": "off",
camelcase: "off"
}
}
37 changes: 0 additions & 37 deletions coffeelint.json

This file was deleted.

75 changes: 0 additions & 75 deletions lib/config.coffee

This file was deleted.

92 changes: 92 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
module.exports = {
personalAccessToken: {
description: 'Your personal GitHub access token',
type: 'string',
default: '',
order: 1
},
gistId: {
description: 'ID of gist to use for configuration storage',
type: 'string',
default: '',
order: 2
},
gistDescription: {
description: 'The description of the gist',
type: 'string',
default: 'automatic update by http://atom.io/packages/sync-settings',
order: 3
},
syncSettings: {
type: 'boolean',
default: true,
order: 4
},
blacklistedKeys: {
description: "Comma-seperated list of blacklisted keys (e.g. 'package-name,other-package-name.config-name')",
type: 'array',
default: [],
items: {
type: 'string'
},
order: 5
},
syncPackages: {
type: 'boolean',
default: true,
order: 6
},
syncKeymap: {
type: 'boolean',
default: true,
order: 7
},
syncStyles: {
type: 'boolean',
default: true,
order: 8
},
syncInit: {
type: 'boolean',
default: true,
order: 9
},
syncSnippets: {
type: 'boolean',
default: true,
order: 10
},
extraFiles: {
description: 'Comma-seperated list of files other than Atom\'s default config files in ~/.atom',
type: 'array',
default: [],
items: {
type: 'string'
},
order: 11
},
checkForUpdatedBackup: {
description: 'Check for newer backup on Atom start',
type: 'boolean',
default: true,
order: 12
},
_lastBackupHash: {
type: 'string',
default: '',
description: 'Hash of the last backup restored or created',
order: 13
},
quietUpdateCheck: {
type: 'boolean',
default: false,
description: "Mute 'Latest backup is already applied' message",
order: 14
},
removeObsoletePackages: {
description: 'Packages installed but not in the backup will be removed when restoring backups',
type: 'boolean',
default: false,
order: 15
}
}
40 changes: 0 additions & 40 deletions lib/fork-gistid-input-view.coffee

This file was deleted.

56 changes: 56 additions & 0 deletions lib/fork-gistid-input-view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const { CompositeDisposable } = require('atom')
const { TextEditorView, View } = require('atom-space-pen-views')

let oldView = null

module.exports = class ForkGistIdInputView extends View {
static content () {
return this.div({ class: 'command-palette' }, () => {
return this.subview('selectEditor', new TextEditorView({ mini: true, placeholderText: 'Gist ID to fork' }))
})
}

initialize () {
if (oldView != null) {
oldView.destroy()
}
oldView = this

this.disposables = new CompositeDisposable()
this.disposables.add(atom.commands.add('atom-text-editor', 'core:confirm', () => this.confirm()))
this.disposables.add(atom.commands.add('atom-text-editor', 'core:cancel', () => this.destroy()))
return this.attach()
}

destroy () {
this.disposables.dispose()
return this.detach()
}

attach () {
if (this.panel == null) { this.panel = atom.workspace.addModalPanel({ item: this }) }
this.panel.show()
return this.selectEditor.focus()
}

detach () {
this.panel.destroy()
return super.detach(...arguments)
}

confirm () {
const gistId = this.selectEditor.getText()
this.callbackInstance.forkGistId(gistId)
return this.destroy()
}

setCallbackInstance (callbackInstance) {
this.callbackInstance = callbackInstance
}
}
Loading