Skip to content

Commit

Permalink
fix: run lint using standard 16
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Nov 21, 2020
1 parent 706a2d7 commit 34e4d49
Show file tree
Hide file tree
Showing 11 changed files with 241 additions and 242 deletions.
4 changes: 2 additions & 2 deletions lib/adapters/legacy-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ module.exports = class LegacyAdapter {
if (this.maxScrollTopCache != null && this.useCache) {
return this.maxScrollTopCache
}
var maxScrollTop = this.textEditor.displayBuffer.getMaxScrollTop()
var lineHeight = this.textEditor.getLineHeightInPixels()
let maxScrollTop = this.textEditor.displayBuffer.getMaxScrollTop()
const lineHeight = this.textEditor.getLineHeightInPixels()

if (this.scrollPastEnd) {
maxScrollTop -= this.getHeight() - 3 * lineHeight
Expand Down
7 changes: 3 additions & 4 deletions lib/decoration.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const _ = require('underscore-plus')
const {Emitter} = require('atom')
const { Emitter } = require('atom')

let idCounter = 0
const nextId = function () { return idCounter++ }
Expand All @@ -12,7 +12,6 @@ const nextId = function () { return idCounter++ }
* It has the same API than the `Decoration` class of a text editor.
*/
module.exports = class Decoration {

/**
* Returns `true` if the passed-in decoration properties matches the
* specified type.
Expand Down Expand Up @@ -167,10 +166,10 @@ module.exports = class Decoration {
setProperties (newProperties) {
if (this.destroyed) { return }

let oldProperties = this.properties
const oldProperties = this.properties
this.properties = newProperties
this.properties.id = this.id

this.emitter.emit('did-change-properties', {oldProperties, newProperties})
this.emitter.emit('did-change-properties', { oldProperties, newProperties })
}
}
15 changes: 8 additions & 7 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ class Main {
include(this, PluginManagement)
return this
}

/**
* Used only at export time.
*
* @access private
*/
constructor () {
if (!Emitter) { ({Emitter, CompositeDisposable} = require('atom')) }
if (!Emitter) { ({ Emitter, CompositeDisposable } = require('atom')) }

/**
* The activation state of the package.
Expand Down Expand Up @@ -91,7 +92,7 @@ class Main {
*/
activate () {
if (this.active) { return }
if (!CompositeDisposable) { ({Emitter, CompositeDisposable} = require('atom')) }
if (!CompositeDisposable) { ({ Emitter, CompositeDisposable } = require('atom')) }

this.subscriptionsOfCommands = atom.commands.add('atom-workspace', {
'minimap:toggle': () => {
Expand Down Expand Up @@ -194,7 +195,7 @@ class Main {
if (!MinimapPluginGeneratorElement) {
MinimapPluginGeneratorElement = require('./minimap-plugin-generator-element')
}
var view = new MinimapPluginGeneratorElement()
const view = new MinimapPluginGeneratorElement()
view.template = template
view.attach()
}
Expand Down Expand Up @@ -324,11 +325,11 @@ class Main {
if (!minimap) {
if (!Minimap) { Minimap = require('./minimap') }

minimap = new Minimap({textEditor})
minimap = new Minimap({ textEditor })
this.editorsMinimaps.set(textEditor, minimap)

const editorSubscription = textEditor.onDidDestroy(() => {
let minimaps = this.editorsMinimaps
const minimaps = this.editorsMinimaps
if (minimaps) { minimaps.delete(textEditor) }
editorSubscription.dispose()
})
Expand Down Expand Up @@ -387,8 +388,8 @@ class Main {
*/
initSubscriptions () {
this.subscriptions.add(atom.workspace.observeTextEditors((textEditor) => {
let minimap = this.minimapForEditor(textEditor)
let minimapElement = atom.views.getView(minimap)
const minimap = this.minimapForEditor(textEditor)
const minimapElement = atom.views.getView(minimap)

this.emitter.emit('did-create-minimap', minimap)
minimapElement.attach()
Expand Down
Loading

0 comments on commit 34e4d49

Please sign in to comment.