Showing 100 of 340 total issues
Avoid too many return
statements within this function. Open
return Object.assign({}, {
...state,
article: action.payload.article,
loadingArticle: false,
});
Avoid too many return
statements within this function. Open
return Date.parse(dateFrom) <= Date.parse(dateTo);
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loading: false} );
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loadingArticle: false});
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loadingVote: true});
Avoid too many return
statements within this function. Open
return adapter.updateOne(action.payload.draft, {...state, loading: false});
Avoid too many return
statements within this function. Open
return adapter.removeOne(action.payload.draft._id, {...state, loading: false});
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loading: true} );
Avoid too many return
statements within this function. Open
return adapter.removeMany(action.payload.ids, state);
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loading: false} );
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loading: false} );
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loadingArticle: false} );
Avoid too many return
statements within this function. Open
return Object.assign({}, {
...state,
article: {
...state.article,
vote: action.payload.vote
Avoid too many return
statements within this function. Open
return adapter.updateOne({
id: action.payload._idOfArticle,
changes: {
vote: action.payload.vote
}
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loadingArticle: true, article: null} );
Avoid too many return
statements within this function. Open
return Object.assign({}, {...state, loading: true});
Avoid too many return
statements within this function. Open
return Object.assign({}, {
...state,
article: null,
loadingArticle: false,
});
Function adjustIndent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private adjustIndent($event) {
const TAB = ' ';
// インデントを追加
if (!$event.shiftKey) {
if (this.extractListInfo().isListLine) {
- 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 dateRangeDisp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
dateRangeDisp(condition: SearchConditionModel): string {
const pattern = condition.dateSearchPattern;
const patternDisp = this.dateRangePatterns[pattern];
- 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 transform
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
transform(datetime: string, args?) {
if (!datetime) {
return datetime;
}
- 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"