Showing 49 of 211 total issues
File rxjs_v6.x.x.js
has 1648 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// flow-typed signature: 15a62627db10532a0d66de672b6a63b0
// flow-typed version: 17360d7665/rxjs_v6.x.x/flow_>=v0.34.x
type rxjs$PartialObserver<-T> =
| {
File reselect_v4.x.x.js
has 869 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// flow-typed signature: 2a02d1b60a5d489a02c844ca21f2c722
// flow-typed version: fba7eedc0c/reselect_v4.x.x/flow_>=v0.47.x
type ExtractReturnType = <Return>((...rest: any[]) => Return) => Return;
File moment_v2.x.x.js
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// flow-typed signature: b8d2d85f70b82d72377cf60c3606a2d9
// flow-typed version: 0cd8e983b3/moment_v2.x.x/flow_>=v0.25.x
type moment$MomentOptions = {
y?: number | string,
Function constructor
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
constructor() {
const title = "Textual Velocity";
const createNotificationHandler = (desc: string) => () => {
// until https://github.com/eslint/eslint/issues/12117 is resolved:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function previewEditor
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const previewEditor = (): PreviewEditor => {
const editor: PreviewEditor = (atom.workspace.buildTextEditor({
// autoHeight is necessay for scrolling to work as expected.
// It's also done internally when opening a new text editor:
// https://github.com/atom/atom/blob/3e97867f3e3ffd1b04a3b25978a40eb1d377f52f/src/workspace.js#L1266
File actions.js
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* @flow */
import type { FileReadResult, RawFile } from "../flow-types/File";
import type { NotePropName } from "../flow-types/Note";
import type { SortDirection } from "../flow-types/SortDirection";
Function fileReadsEpic
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function fileReadsEpic(
action$: rxjs$Observable<Action>,
state$: reduxRxjs$StateObservable<State>
) {
return merge(
Function previewNoteEpic
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function previewNoteEpic(
action$: rxjs$Observable<Action>,
state$: reduxRxjs$StateObservable<State>
) {
let preview: PreviewEditor | null = null;
Function constructor
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
const title = "Textual Velocity";
const createNotificationHandler = (desc: string) => () => {
// until https://github.com/eslint/eslint/issues/12117 is resolved:
Function notesReducer
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function notesReducer(state: Notes = {}, action: Action) {
switch (action.type) {
case A.READ_DIR_DONE:
return action.rawFiles.reduce((nextNotes, rawFile) => {
const note = state[rawFile.filename] || newNote(rawFile);
Function hiddenColumnsEpic
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function hiddenColumnsEpic(action$: rxjs$Observable<Action>) {
const disposableCommands = new Disposables(
...columns.map(column => {
const columnName = name(column);
return atom.commands.add(
Function selectedNoteReducer
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function selectedNoteReducer(
state: ?SelectedNote = null,
action: Action,
nextSifterResult: SifterResult
) {
Function sifterResultReducer
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function sifterResultReducer(
state: SifterResult = defaults,
action: Action,
nextNotes: Notes
) {
Function configChangesEpic
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function configChangesEpic(
action$: rxjs$Observable<Action>,
state$: reduxRxjs$StateObservable<State>
) {
return merge(
Function createNotificationHandler
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createNotificationHandler = (desc: string) => () => {
// until https://github.com/eslint/eslint/issues/12117 is resolved:
// eslint-disable-next-line no-unused-vars
for (let notification of atom.notifications
.getNotifications()
Function visibleRowsSelector
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(
dir: string,
editCellName: EditCellName,
notes: Notes,
pagination: Pagination,
Function componentDidMount
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
this._disposables = new Disposables();
this._focusInputSubject = new Subject();
this._focusInputSubscription = this._focusInputSubject
Function fileReadFailsReducer
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function fileReadFailsReducer(
state: FileReadFails = {},
action: Action
) {
let filename;
Function start
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start(dir: string) {
this._panel = atom.workspace.addTopPanel({
item: document.createElement("div")
});
Function renameNoteEpic
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function renameNoteEpic(
action$: rxjs$Observable<Action>,
state$: reduxRxjs$StateObservable<State>
) {
return merge(