app/assets/javascripts/reducers/scoping_methods.js
Function course
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function course(state = initialState, action) {
switch (action.type) {
case TOGGLE_SCOPING_METHOD: {
if (state.selected.includes(action.method)) {
return {
Avoid too many return
statements within this function. Open
Open
return {
...state,
petscan: {
...state.petscan,
psids: action.psids
Avoid too many return
statements within this function. Open
Open
return {
...state,
pagepile: {
...state.pagepile,
ids: action.ids
Avoid too many return
statements within this function. Open
Open
return {
...state,
templates: {
...state.templates,
include: action.templates
Avoid too many return
statements within this function. Open
Open
return initialState;
Parsing error: Cannot find module 'babel-plugin-root-import'
Require stack:
- /usr/local/node_modules/@babel/core/lib/config/files/plugins.js
- /usr/local/node_modules/@babel/core/lib/config/files/index.js
- /usr/local/node_modules/@babel/core/lib/index.js
- /usr/local/node_modules/@babel/eslint-parser/lib/worker/babel-core.cjs
- /usr/local/node_modules/@babel/eslint-parser/lib/worker/handle-message.cjs
- /usr/local/node_modules/@babel/eslint-parser/lib/client.cjs
- /usr/local/node_modules/@babel/eslint-parser/lib/index.cjs
- /usr/local/node_modules/eslint/lib/cli-engine/config-array-factory.js
- /usr/src/app/lib/eslint6-patch.js
- /usr/src/app/lib/eslint.js
- /usr/src/app/bin/eslint.js Open
Open
import { RESET_SCOPING_METHODS, TOGGLE_SCOPING_METHOD, UPDATE_CATEGORIES, UPDATE_CATEGORY_DEPTH, UPDATE_PAGEPILE_IDS, UPDATE_PETSCAN_IDS, UPDATE_TEMPLATES } from '../constants/scoping_methods';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/