Skip to content

Commit

Permalink
remove not needed files, fix some lint issues (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfirst committed Aug 6, 2019
1 parent aa11cdc commit 5fb2538
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 171 deletions.
3 changes: 0 additions & 3 deletions .eslintignore-circle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ src/consumer/migrations/bit-map/index.js
src/environment/environment.js
src/git-hooks/exceptions/index.js
src/git-hooks/git-hook.js
src/jsdoc/formater.js
src/prompts/exceptions/index.js
src/remotes/remote-resolver/remote-resolver.js
src/scope/component-objects.js
Expand All @@ -40,7 +39,6 @@ src/utils/promise-to-result-object.js
src/utils/string/get-stringify-args.js
src/api/scope/lib/resolver.js
src/cli/cli-utils.js
src/cli/command.js
src/cli/commands/private-cmds/_fetch-cmd.js
src/cli/commands/private-cmds/scope-config-cmd.js
src/cli/commands/public-cmds/config-cmd.js
Expand All @@ -56,7 +54,6 @@ src/remotes/remotes.js
src/scope/migrations/component-version/remove-latest-from-compiler.js
src/search/serverless-index.js
src/utils/array/filter-async.js
src/utils/buffer/from.js
src/utils/path.js
src/api/scope/lib/put.js
src/cli/commands/private-cmds/ci-update-cmd.js
Expand Down
14 changes: 0 additions & 14 deletions gulpfile.js

This file was deleted.

12 changes: 0 additions & 12 deletions resources/impl.template.js

This file was deleted.

Empty file removed resources/specs.template.js
Empty file.
4 changes: 2 additions & 2 deletions src/cli/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Cmd {

// eslint-disable-next-line no-unused-vars
action(params: any, opts: { [string]: any }, packageManagerArgs: string[]): Promise<any> {
console.log('"action" method not implemented on this command');
console.log('"action" method not implemented on this command'); // eslint-disable-line no-console
return new Promise(resolve => resolve({}));
}

Expand All @@ -24,7 +24,7 @@ export default class Cmd {
return null;
}

splitList(val) {
splitList(val: string) {
return val.split(',');
}
}
4 changes: 2 additions & 2 deletions src/cli/commands/public-cmds/add-cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export default class Add extends Command {
}: {
id: ?string,
main: ?string,
tests: ?(string[]),
tests: ?string,
namespace: ?string,
exclude: ?(string[]),
exclude: ?string,
override: boolean
}
): Promise<*> {
Expand Down
2 changes: 1 addition & 1 deletion src/jsdoc/formater.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import { Doclet } from './parser';
import type { Doclet } from './parser';

export default function format(doc: Doclet): string {
let args;
Expand Down
4 changes: 2 additions & 2 deletions src/scope/models/scopeMeta.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import BitObject from '../objects/object';
import type Ref from '../objects/ref';
import { bufferFrom, getStringifyArgs } from '../../utils';
import { getStringifyArgs } from '../../utils';

type ScopeMetaProps = {
name: string,
Expand Down Expand Up @@ -35,7 +35,7 @@ export default class ScopeMeta extends BitObject {
}

toBuffer(pretty): Buffer {
return bufferFrom(this.toString(pretty));
return Buffer.from(this.toString(pretty));
}

static fromScopeName(name: string): Ref {
Expand Down
4 changes: 2 additions & 2 deletions src/scope/models/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import R from 'ramda';
import { Ref, BitObject } from '../objects';
import Source from './source';
import { filterObject, first, bufferFrom, getStringifyArgs } from '../../utils';
import { filterObject, first, getStringifyArgs } from '../../utils';
import type { customResolvedPath } from '../../consumer/component';
import ConsumerComponent from '../../consumer/component';
import { BitIds, BitId } from '../../bit-id';
Expand Down Expand Up @@ -341,7 +341,7 @@ export default class Version extends BitObject {
const args = getStringifyArgs(pretty);
const str = JSON.stringify(obj, ...args);
if (this.validateBeforePersist) this.validateBeforePersisting(str);
return bufferFrom(str);
return Buffer.from(str);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/scope/repositories/sources.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @flow */
import R from 'ramda';
import { bufferFrom, eol } from '../../utils';
import { BitObject } from '../objects';
import ComponentObjects from '../component-objects';
import type Scope from '../scope';
Expand Down Expand Up @@ -146,7 +145,7 @@ to quickly fix the issue, please delete the object at "${this.objects().objectPa

return this.findOrAddComponent(source).then((component) => {
return component.loadVersion(component.latest(), objectRepo).then((version) => {
const dist = source.dist ? Source.from(bufferFrom(source.dist.toString())) : null;
const dist = source.dist ? Source.from(Buffer.from(source.dist.toString())) : null;
version.setDist(dist);
objectRepo.add(dist).add(version);
return objectRepo.persist();
Expand Down
6 changes: 0 additions & 6 deletions src/utils/array-remote-first.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/utils/array/diff.js

This file was deleted.

72 changes: 0 additions & 72 deletions src/utils/buffer/from.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/utils/fs/list-directories.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/** @flow */
// @TODO refactor this file to include only exports
import first from './array/first';
import bufferFrom from './buffer/from';
import flatten from './array/flatten';
import filterAsync from './array/filter-async';
import resolveBoolean from './resolve-boolean';
import mapObject from './map-object';
import mkdirp from './mkdirp';
import forEach from './object/foreach';
Expand All @@ -24,7 +22,6 @@ import toBase64 from './string/to-base64';
import toBase64ArrayBuffer from './string/to-base64-array-buffer';
import fromBase64 from './string/from-base64';
import parseSSHUrl from './ssh/parse-url';
import listDirectories from './fs/list-directories';
import isDirEmptySync from './is-dir-empty-sync';
import isDirEmpty from './fs/is-dir-empty';
import isDir from './is-dir';
Expand All @@ -47,7 +44,6 @@ import isString from './string/is-string';
import removeChalkCharacters from './string/remove-chalk-characters';
import getStringifyArgs from './string/get-stringify-args';
import isNumeric from './number/is-numeric';
import diff from './array/diff';
import sharedStartOfArray from './array/shared-start';
import filterObject from './filter-object';
import isValidIdChunk from './is-valid-id-chunk';
Expand Down Expand Up @@ -92,7 +88,6 @@ export {
getStringifyArgs,
isNumeric,
inflate,
diff,
sharedStartOfArray,
filterAsync,
deflate,
Expand All @@ -101,7 +96,6 @@ export {
toBase64ArrayBuffer,
fromBase64,
glob,
resolveBoolean,
empty,
filter,
cleanChar,
Expand All @@ -121,7 +115,6 @@ export {
pathHasAll,
first,
bufferToReadStream,
listDirectories,
isDirEmpty,
isDirEmptySync,
flatten,
Expand All @@ -138,7 +131,6 @@ export {
outputFile,
camelCase,
stripTrailingChar,
bufferFrom,
getLatestVersionNumber,
calculateFileInfo,
getWithoutExt,
Expand Down
9 changes: 0 additions & 9 deletions src/utils/resolve-boolean.js

This file was deleted.

0 comments on commit 5fb2538

Please sign in to comment.