huridocs/uwazi

View on GitHub
app/react/Documents/components/ShowToc.js

Summary

Maintainability
A
0 mins
Test Coverage
F
20%

Anchor used as a button. Anchors are primarily expected to navigate. Use the button element instead. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
Open

                <a

For more information visit Source: http://eslint.org/docs/rules/

Prop type "array" is forbidden
Open

  toc: PropTypes.array,

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'node/no-restricted-import' was not found.
Open

import PropTypes from 'prop-types';

For more information visit Source: http://eslint.org/docs/rules/

Export statements should appear at the end of the file
Open

export class ShowToc extends Component {

For more information visit Source: http://eslint.org/docs/rules/

propType "scrollToToc" is not required, but has no corresponding defaultProps declaration.
Open

  scrollToToc: PropTypes.func,

For more information visit Source: http://eslint.org/docs/rules/

Prefer named exports.
Open

export default connect(null, mapDispatchToProps)(ShowToc);

For more information visit Source: http://eslint.org/docs/rules/

Do not use Array index in keys
Open

            <li className={`toc-indent-${tocElement.get('indentation')}`} key={index}>

For more information visit Source: http://eslint.org/docs/rules/

propType "readOnly" is not required, but has no corresponding defaultProps declaration.
Open

  readOnly: PropTypes.bool,

For more information visit Source: http://eslint.org/docs/rules/

There are no issues that match your filters.

Category
Status