🚨(eslint-config-custom) prob order with windows

With Windows the order of the imports was not the same as with Linux,
this was causing the linter to fail with CI.
We force the import starting with ":" to the internal group to fix this
issue.
This commit is contained in:
Anthony Le Courric
2023-09-11 13:56:18 +02:00
committed by Anthony LC
parent c7000f37d2
commit e251bbb438
6 changed files with 12 additions and 6 deletions

View File

@@ -56,7 +56,13 @@
"sibling",
"index"
],
"alphabetize": { "order": "ignore" }
"alphabetize": { "order": "ignore" },
"pathGroups": [
{
"pattern": "+(:)/**",
"group": "internal"
}
]
}
],
"import/prefer-default-export": "off",

View File

@@ -25,7 +25,7 @@
"dist/"
],
"scripts": {
"lint": "eslint . 'src/**/*.{ts,tsx}'",
"lint": "eslint . \"src/**/*.{ts,tsx}\"",
"dev": "yarn storybook",
"build": "bash ./build",
"build:watch": "yarn build && vite build --mode watch",

View File

@@ -1,12 +1,12 @@
import userEvent from "@testing-library/user-event";
import React from "react";
import { render, screen } from "@testing-library/react";
import { FieldProps } from "../Field";
import {
Checkbox,
CheckboxGroup,
CheckboxOnlyProps,
} from ":/components/Forms/Checkbox/index";
import { FieldProps } from "../Field";
const spyError = vi.spyOn(global.console, "error");

View File

@@ -2,9 +2,9 @@ import { render, screen, waitFor } from "@testing-library/react";
import React, { useRef } from "react";
import userEvent from "@testing-library/user-event";
import { expect } from "vitest";
import { FieldProps } from "../Field";
import { Input, InputOnlyProps } from ":/components/Forms/Input/index";
import { Button } from ":/components/Button";
import { FieldProps } from "../Field";
const spyError = vi.spyOn(global.console, "error");

View File

@@ -1,12 +1,12 @@
import userEvent from "@testing-library/user-event";
import React from "react";
import { render, screen } from "@testing-library/react";
import { FieldProps } from "../Field";
import {
Radio,
RadioGroup,
RadioOnlyProps,
} from ":/components/Forms/Radio/index";
import { FieldProps } from "../Field";
const spyError = vi.spyOn(global.console, "error");

View File

@@ -1,8 +1,8 @@
import { render, screen } from "@testing-library/react";
import React from "react";
import userEvent from "@testing-library/user-event";
import { FieldProps } from "../Field";
import { Switch, SwitchOnlyProps } from ":/components/Forms/Switch/index";
import { FieldProps } from "../Field";
const spyError = vi.spyOn(global.console, "error");