Showing 27 of 103 total issues
Function ADD_COLUMN
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
ADD_COLUMN: (state, action) => {
const { account, type, params } = action.payload;
const id = uuid.v4();
const title = type; // TODO: If mixed columns, custom timeline
const icon = iconSelector[type];
Function renderControls
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderControls() {
var extendedProps = Object.assign({
// The public methods that all controls should be able to
// use.
togglePlay: this.togglePlay,
Function subscribe
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const subscribe = (account: Account) => (
eventChannel((emit: EmitterFn) => {
ipcRenderer.on('filterstream-tweet', (_: any, tweet: Tweet, queries: Array<string>) => {
log.debug('Recieve serach tweet.');
window.requestIdleCallback(() => {
- 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 postTweet
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const postTweet = (account, status, replyTweet) => (dispatch, getState) => {
if (status === '') return;
const media = getState().tweetWindow.media;
const mediaIds = media.map(m => m.id).join(',');
const { accessToken, accessTokenSecret } = account;
- 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 RECIEVE_TWEET
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
RECIEVE_TWEET: (state, action) => {
// TODO: refactor
let results;
const { account: { id_str }, tweet, type, q } = action.payload;
const key = type === 'Search' ? `${q}:${type}` : `${id_str}:${type}`;
- 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 DELETE_COLUMN
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
DELETE_COLUMN: (state, action) => {
const { id, type, params } = action.payload;
const queries = [...state.filterQueries];
console.log(params.q);
if (type === 'Search') {
- 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 watchMediaUpload
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function* watchMediaUpload() {
while (true) {
const { payload: { account, files } } = yield take('UPLOAD_MEDIA');
const { accessToken, accessTokenSecret } = account;
const twitter = new T(accessToken, accessTokenSecret);
- 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"