Closed hb2708 closed 3 years ago
Okey so the above cases works but this cases like this fails.
nmf-app/app/utils/translations/resources.ts
See this from the the eslint doc
/* eslint import/order: ["error", {"newlines-between": "always-and-inside-groups"}] */
import fs from 'fs';
import path from 'path';
import index from './';
import sibling from './foo';
always-and-inside-groups
Is the culprit to give u the extra new line, and you get following output.
import React from "react";
import { ScrollView } from "react-native";
import { useSelector } from "react-redux";
import styles from "./BudgetScreen.styles";
import { Text, Button } from "../../components";
@hb2708 : almost there. However, you need to have the CI working before merging like mentionned in the contributing file.
To do so:
yarn lint:fix
/* eslint import/order:0 */
on top of the file so we can still have /* SCREENS */
, /* COMPONENTS */
etc...@PierreBresson Thanks for confirming about the case above. Applied the changes and pushed. CI Checks are passed now
@hb2708 thanks for the changes :)
✅ I have read the contributing file
Summary
Fixes #172 issue where auto save -> Reformat add extra new line in the imports
Changelog
Updated
newlines-between
toalways
as per https://dev.to/otamnitram/sorting-your-imports-correctly-in-react-213mDemo
On top of BudgetScreen.tsx, we have :
If changed it to the following :
And save the file, get the following :
Instead of :