Follow consistent formatting and syntax patterns to improve code readability and maintainability. This includes using compact formatting for test blocks, proper quote usage, positive-first conditionals, and preferred syntax patterns.
Key formatting guidelines:
describe('errors', { defaultCommandTimeout: 50 }, () => {
"foo"
instead of 'foo\'
if (state.initialBuildSucceed) { ... } else { ... }
return (expression)
instead of if (...) return true
.catch()
syntax over try/catch blocks for promise handling/* global jest */
at file top instead of inline eslint-disable-next-line no-undef
These patterns make code more readable and follow modern JavaScript conventions while reducing cognitive load for developers.
Enter the URL of a public GitHub repository