app/assets/javascripts/reducers/alerts.js
Function alerts
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function alerts(state = initialState, action) {
switch (action.type) {
case RECEIVE_ALERTS: {
const newState = { ...state };
const sortedAlerts = sortByKey(action.data.alerts, 'created_at', null, SORT_DESCENDING.created_at);
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 { RECEIVE_ALERTS, SORT_ALERTS, FILTER_ALERTS, RESOLVE_ALERT } from '../constants';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/