Skip to content

Conversation

@MishaSeredenkoPushBased
Copy link
Contributor

Implemented the changes for the report.md file.
Added the following sections: Overview, Categories, Audits, About.
Note that the commit data at About section is in the scope of the task #192
Here's the example of the audit of our test react-todos-app, generated by nx run-collect cli:

Code PushUp Report

🏷 Category ⭐ Score 🛡 Audits
Bug prevention 68 🟡 16
Code style 54 🟡 13

🏷 Categories

🟡 Bug prevention: 68

🟡 Code style: 54

🛡️ Audits

Disallow assignment operators in conditional expressions (ESLint)

🟩 0 (score: 100) No details

Disallow reassigning const variables (ESLint)

🟩 0 (score: 100) No details

Disallow the use of debugger (ESLint)

🟩 0 (score: 100) No details

Disallow invalid regular expression strings in RegExp constructors (ESLint)

🟩 0 (score: 100) No details

Disallow the use of undeclared variables unless mentioned in /*global */ comments (ESLint)

🟩 0 (score: 100) No details

Disallow loops with a body that allows only one iteration (ESLint)

🟩 0 (score: 100) No details

Disallow negating the left operand of relational operators (ESLint)

🟩 0 (score: 100) No details

Disallow use of optional chaining in contexts where the undefined value is not allowed (ESLint)

🟩 0 (score: 100) No details

Disallow unused variables (ESLint)

🟥 1 warning (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warning'loading' is assigned a value but never used. src/App.jsx 8

ESLint rule no-unused-vars. 📖 Docs

Require calls to isNaN() when checking for NaN (ESLint)

🟩 0 (score: 100) No details

Enforce comparing typeof expressions against valid strings (ESLint)

🟩 0 (score: 100) No details

Require braces around arrow function bodies (ESLint)

🟥 1 warning (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warningUnexpected block statement surrounding arrow body; move the returned value immediately after the `=>`. src/components/TodoFilter.jsx 3

ESLint rule arrow-body-style. 📖 Docs

Enforce camelcase naming convention (ESLint)

🟩 0 (score: 100) No details

Enforce consistent brace style for all control statements (ESLint)

🟩 0 (score: 100) No details

Require the use of === and !== (ESLint)

🟥 1 warning (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warningExpected '===' and instead saw '=='. src/hooks/useTodos.js 41

ESLint rule eqeqeq. 📖 Docs

Enforce a maximum number of lines of code in a function (ESLint)

🟥 1 warning (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warningArrow function has too many lines (71). Maximum allowed is 50. src/hooks/useTodos.js 3

ESLint rule max-lines-per-function. 📖 Docs

Enforce a maximum number of lines per file (ESLint)

🟩 0 (score: 100) No details

Disallow variable declarations from shadowing variables declared in the outer scope (ESLint)

🟥 3 warnings (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warning'data' is already declared in the upper scope on line 5 column 10. src/hooks/useTodos.js 11
⚠️ warning'data' is already declared in the upper scope on line 5 column 10. src/hooks/useTodos.js 29
⚠️ warning'data' is already declared in the upper scope on line 5 column 10. src/hooks/useTodos.js 41

ESLint rule no-shadow. 📖 Docs

Require let or const instead of var (ESLint)

🟩 0 (score: 100) No details

Require or disallow method and property shorthand syntax for object literals (ESLint)

🟥 3 warnings (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warningExpected property shorthand. src/hooks/useTodos.js 19
⚠️ warningExpected property shorthand. src/hooks/useTodos.js 32
⚠️ warningExpected property shorthand. src/hooks/useTodos.js 33

ESLint rule object-shorthand. 📖 Docs

Require using arrow functions for callbacks (ESLint)

🟩 0 (score: 100) No details

Require const declarations for variables that are never reassigned after declared (ESLint)

🟥 1 warning (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warning'root' is never reassigned. Use 'const' instead. src/index.jsx 5

ESLint rule prefer-const. 📖 Docs

Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead (ESLint)

🟩 0 (score: 100) No details

Require or disallow "Yoda" conditions (ESLint)

🟩 0 (score: 100) No details

Disallow missing key props in iterators/collection literals (ESLint)

🟥 1 warning (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warningMissing "key" prop for element in iterator src/components/TodoList.jsx 7

ESLint rule jsx-key, from react plugin. 📖 Docs

Disallow missing props validation in a React component definition (ESLint)

🟥 6 warnings (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warning'onCreate' is missing in props validation src/components/CreateTodo.jsx 15
⚠️ warning'setQuery' is missing in props validation src/components/TodoFilter.jsx 10
⚠️ warning'setHideComplete' is missing in props validation src/components/TodoFilter.jsx 18
⚠️ warning'todos' is missing in props validation src/components/TodoList.jsx 6
⚠️ warning'todos.map' is missing in props validation src/components/TodoList.jsx 6
⚠️ warning'onEdit' is missing in props validation src/components/TodoList.jsx 13

ESLint rule prop-types, from react plugin. 📖 Docs

Disallow missing React when using JSX (ESLint)

🟩 0 (score: 100) No details

enforces the Rules of Hooks (ESLint)

🟩 0 (score: 100) No details

verifies the list of dependencies for Hooks like useEffect and similar (ESLint)

🟥 2 warnings (score: 0)
SeverityMessageSource fileLine(s)
⚠️ warningReact Hook useCallback does nothing when called with only one argument. Did you forget to pass an array of dependencies? src/hooks/useTodos.js 17
⚠️ warningReact Hook useCallback does nothing when called with only one argument. Did you forget to pass an array of dependencies? src/hooks/useTodos.js 40

ESLint rule exhaustive-deps, from react-hooks plugin. 📖 Docs

Disallow missing displayName in a React component definition (ESLint)

🟩 0 (score: 100) No details

Disallow comments from being inserted as text nodes (ESLint)

🟩 0 (score: 100) No details

Disallow duplicate properties in JSX (ESLint)

🟩 0 (score: 100) No details

Disallow target="_blank" attribute without rel="noreferrer" (ESLint)

🟩 0 (score: 100) No details

Disallow undeclared variables in JSX (ESLint)

🟩 0 (score: 100) No details

Disallow React to be incorrectly marked as unused (ESLint)

🟩 0 (score: 100) No details

Disallow variables used in JSX to be incorrectly marked as unused (ESLint)

🟩 0 (score: 100) No details

Disallow passing of children as props (ESLint)

🟩 0 (score: 100) No details

Disallow when a DOM element is using both children and dangerouslySetInnerHTML (ESLint)

🟩 0 (score: 100) No details

Disallow usage of deprecated methods (ESLint)

🟩 0 (score: 100) No details

Disallow direct mutation of this.state (ESLint)

🟩 0 (score: 100) No details

Disallow usage of findDOMNode (ESLint)

🟩 0 (score: 100) No details

Disallow usage of isMounted (ESLint)

🟩 0 (score: 100) No details

Disallow usage of the return value of ReactDOM.render (ESLint)

🟩 0 (score: 100) No details

Disallow using string references (ESLint)

🟩 0 (score: 100) No details

Disallow unescaped HTML entities from appearing in markup (ESLint)

🟩 0 (score: 100) No details

Disallow usage of unknown DOM property (ESLint)

🟩 0 (score: 100) No details

Enforce ES5 or ES6 class for returning value in render function (ESLint)

🟩 0 (score: 100) No details

About

Report was created by Code PushUp on Thu Nov 02 2023 12:02:52 GMT+0100 (Central European Standard Time)

Commit Version Duration Plugins Categories Audits
Implement todos list (3ac01d1) 0.0.1 0.31 s 1 2 47

The following plugins were run:

Plugin Audits Version Duration
ESLint 47 0.0.1 0.31 s

Made with ❤️ by code-pushup.dev

@MishaSeredenkoPushBased MishaSeredenkoPushBased added 🔬 testing writing tests ➕ enhancement new feature or request 🤓 UX UX improvement for CLI users labels Nov 2, 2023
Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small things I found:
image
No collapse for empty results
image
Linebreak

@matejchalk matejchalk linked an issue Nov 2, 2023 that may be closed by this pull request
52 tasks
@MishaSeredenkoPushBased
Copy link
Contributor Author

MishaSeredenkoPushBased commented Nov 3, 2023

Small things I found: No collapse for empty results

@BioPhoton Already fixed while fixing the comments of @matejchalk

Copy link
Collaborator

@matejchalk matejchalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some minor things, but overall this is looking fantastic, great job 👏

@MishaSeredenkoPushBased MishaSeredenkoPushBased dismissed BioPhoton’s stale review November 6, 2023 11:04

Quote "U are good to go"

@MishaSeredenkoPushBased MishaSeredenkoPushBased merged commit 346596d into main Nov 6, 2023
@MishaSeredenkoPushBased MishaSeredenkoPushBased deleted the implement-report-md-formatting branch November 6, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

➕ enhancement new feature or request 🔬 testing writing tests 🧩 utils 🤓 UX UX improvement for CLI users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement report.md formatting

5 participants