Skip to content

Commit

Permalink
Tighten eslint rules for relative imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
programmiri committed Oct 26, 2022
1 parent 664d759 commit e70b823
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions coral/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ module.exports = {
},
"rules": {
"no-relative-import-paths/no-relative-import-paths": [
"warn",
{ "allowSameFolder": true, "rootDir": "src" }
"error"
]
}
}
2 changes: 1 addition & 1 deletion coral/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { RouterProvider } from "react-router-dom";
import router from "./router";
import router from "src/router";

import "@aivenio/design-system/dist/styles.css";

Expand Down
2 changes: 1 addition & 1 deletion coral/src/pages/hello/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import HelloPage from "./index";
import HelloPage from "src/pages/hello/index";
import { render, cleanup, screen } from "@testing-library/react";

describe("HelloPage", () => {
Expand Down
2 changes: 1 addition & 1 deletion coral/src/pages/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import HomePage from "./index";
import HomePage from "src/pages/index";
import { render, cleanup, screen } from "@testing-library/react";

describe("HomePage", () => {
Expand Down
4 changes: 2 additions & 2 deletions coral/src/router.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createBrowserRouter, Navigate, RouteObject } from "react-router-dom";
import HomePage from "./pages/index";
import HelloPage from "./pages/hello";
import HomePage from "src/pages/index";
import HelloPage from "src/pages/hello";

const routes: Array<RouteObject> = [
{
Expand Down

0 comments on commit e70b823

Please sign in to comment.