Conversation
|
These three ESLint rules can clash in certain cases: 'multiline-ternary': ['error', 'never'],
'max-len': ['error', { code: 120 }],
'react/jsx-curly-newline': ['error', { multiline: 'require' }]
For longer ternaries (especially in JSX), this can lead to situations where:
Just something to be aware of when formatting conditional expressions. |
|
These rules can interact in a slightly confusing way:
Since multiline ternaries are not allowed, the offsetTernaryExpressions option never really comes into effect. Just something to keep in mind when looking at the config. |
|
After reading through PR#1565, especially this part of |
|
@CalamityC https://eslint.org/docs/latest/rules/multiline-ternary We will remove |
|
@CalamityC I added some rules for the imports. It is now: import React from 'react'
import PropTypes from 'prop-types'
// all other external imports
// imports from rdmo
// components from rdmo
// imports from ..
// components from ..
// imports from .
// components from .The trick is that components have upper case filenames. I know this is not the case for |
|
Closed in favor of #1572. |
This PR adds rules to
.eslintrc.jsto ensure a consistent JS style. The rules cause a lot of issues which need to be resolved after we agreed on the rules and probably after other branches have been merged.