refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -6,24 +6,15 @@
|
||||
*
|
||||
* Location: `n8n-nodes-base.nodes.github.nodeView.<middleKey>.placeholder`
|
||||
*/
|
||||
export function deriveMiddleKey(
|
||||
path: string,
|
||||
parameter: { name: string; type: string; },
|
||||
) {
|
||||
export function deriveMiddleKey(path: string, parameter: { name: string; type: string }) {
|
||||
let middleKey = parameter.name;
|
||||
|
||||
if (
|
||||
isTopLevelCollection(path, parameter) ||
|
||||
isNestedInCollectionLike(path)
|
||||
) {
|
||||
if (isTopLevelCollection(path, parameter) || isNestedInCollectionLike(path)) {
|
||||
const pathSegments = normalize(path).split('.');
|
||||
middleKey = insertOptionsAndValues(pathSegments).join('.');
|
||||
}
|
||||
|
||||
if (
|
||||
isNestedCollection(path, parameter) ||
|
||||
isFixedCollection(path, parameter)
|
||||
) {
|
||||
if (isNestedCollection(path, parameter) || isFixedCollection(path, parameter)) {
|
||||
const pathSegments = [...normalize(path).split('.'), parameter.name];
|
||||
middleKey = insertOptionsAndValues(pathSegments).join('.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user