Skip to content

Commit 70f4f10

Browse files
authored
Feat/add import order rules (#100)
2 parents 87afe69 + f7a3433 commit 70f4f10

File tree

94 files changed

+1448
-611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1448
-611
lines changed

.eslintrc.json

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": "next/core-web-vitals",
3+
"plugins": ["import"],
4+
"rules": {
5+
"import/order": [
6+
"warn",
7+
{
8+
"groups": [
9+
"type",
10+
"builtin",
11+
"external",
12+
"internal",
13+
"parent",
14+
"sibling",
15+
"index",
16+
"unknown"
17+
],
18+
"pathGroups": [
19+
{
20+
"pattern": "react*",
21+
"group": "external",
22+
"position": "before"
23+
},
24+
{
25+
"pattern": "@hooks/*",
26+
"group": "internal",
27+
"position": "after"
28+
},
29+
{
30+
"pattern": "@pages/*",
31+
"group": "internal",
32+
"position": "after"
33+
},
34+
{
35+
"pattern": "@components/*",
36+
"group": "internal",
37+
"position": "after"
38+
}
39+
],
40+
"alphabetize": {
41+
"order": "asc"
42+
}
43+
}
44+
]
45+
}
346
}

next.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ const nextConfig = {
1616

1717
module.exports = nextConfig;
1818

19-
2019
// Injected content via Sentry wizard below
2120

22-
const { withSentryConfig } = require("@sentry/nextjs");
21+
const { withSentryConfig } = require('@sentry/nextjs');
2322

2423
module.exports = withSentryConfig(
2524
module.exports,
@@ -29,8 +28,8 @@ module.exports = withSentryConfig(
2928

3029
// Suppresses source map uploading logs during build
3130
silent: true,
32-
org: "4m9d",
33-
project: "sroom",
31+
org: '4m9d',
32+
project: 'sroom'
3433
},
3534
{
3635
// For all available options, see:
@@ -43,12 +42,12 @@ module.exports = withSentryConfig(
4342
transpileClientSDK: true,
4443

4544
// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
46-
tunnelRoute: "/monitoring",
45+
tunnelRoute: '/monitoring',
4746

4847
// Hides source maps from generated client bundles
4948
hideSourceMaps: true,
5049

5150
// Automatically tree-shake Sentry logger statements to reduce bundle size
52-
disableLogger: true,
51+
disableLogger: true
5352
}
5453
);

0 commit comments

Comments
 (0)