Skip to content

Commit 9679699

Browse files
committed
fix: remove unused variables and empty functions
1 parent 65ccdb1 commit 9679699

8 files changed

+7
-12
lines changed

lib/buffer-search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { Point, Range, Emitter, CompositeDisposable, TextBuffer } = require('atom');
1+
const { Point, Range, Emitter, CompositeDisposable } = require('atom');
22
const FindOptions = require('./find-options');
33
const escapeHelper = require('./escape-helper');
44
const Util = require('./project/util');

lib/find-view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const _ = require('underscore-plus');
2-
const {TextBuffer, TextEditor, CompositeDisposable} = require('atom');
2+
const {TextEditor, CompositeDisposable} = require('atom');
33
const Util = require('./project/util');
44
const etch = require('etch');
55
const $ = etch.dom;

lib/get-icon-services.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const DefaultFileIcons = require('./default-file-icons')
2-
const {Emitter, Disposable, CompositeDisposable} = require('atom')
2+
const {Emitter, CompositeDisposable} = require('atom')
33

44
let iconServices
55
module.exports = function () {

lib/project-find-view.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const fs = require('fs-plus');
21
const path = require('path');
32
const _ = require('underscore-plus');
43
const { TextEditor, Disposable, CompositeDisposable } = require('atom');

lib/project/result-row-view.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const {
55
TrailingContextRow,
66
ResultPathRow,
77
MatchRow,
8-
ResultRowGroup
98
} = require('./result-row');
109
const {showIf} = require('./util');
1110

lib/project/results-view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { Range, CompositeDisposable, Disposable } = require('atom');
1+
const { CompositeDisposable } = require('atom');
22
const ResultRowView = require('./result-row-view');
33
const {
44
LeadingContextRow,

spec/project-find-view-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ describe(`ProjectFindView (ripgrep=${ripgrep})`, () => {
858858
describe("when no results exist", () => {
859859
beforeEach(() => {
860860
projectFindView.findEditor.setText('notintheprojectbro');
861-
spyOn(atom.workspace, 'scan').andCallFake(async () => {});
861+
spyOn(atom.workspace, 'scan').andCallFake(async () => {/* nothing */});
862862
});
863863

864864
it("displays no errors and no results", async () => {
@@ -878,7 +878,7 @@ describe(`ProjectFindView (ripgrep=${ripgrep})`, () => {
878878
atom.commands.dispatch(workspaceElement, 'project-find:show');
879879
spyOn(atom.workspace, 'scan').andCallFake(() => {
880880
const promise = Promise.resolve();
881-
promise.cancel = () => {};
881+
promise.cancel = () => {/* nothing */};
882882
return promise;
883883
});
884884

spec/select-next-spec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/** @babel */
22

33
const path = require('path');
4-
const SelectNext = require('../lib/select-next');
54
const dedent = require('dedent');
65

76
describe("SelectNext", () => {
@@ -31,8 +30,6 @@ describe("SelectNext", () => {
3130

3231
describe("when a word is selected", () => {
3332
describe("when the selection was created using select-next", () => {
34-
beforeEach(() => {});
35-
3633
it("selects the next occurrence of the selected word skipping any non-word matches", async () => {
3734
editor.setText(dedent`
3835
for
@@ -363,7 +360,7 @@ describe("SelectNext", () => {
363360
});
364361

365362
describe("find-and-replace:select-undo", () => {
366-
describe("when there is no selection", async () => {
363+
describe("when there is no selection", () => {
367364
it("does nothing", async () => {
368365
editor.setText(dedent`
369366
for

0 commit comments

Comments
 (0)