Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 842d7a6

Browse files
committed
refactor: move google analysis to services scope
ignore vscode, fix eslint cmd glob scope
1 parent bcca79b commit 842d7a6

File tree

15 files changed

+50
-39
lines changed

15 files changed

+50
-39
lines changed

.babelrc

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
2-
"presets": [
3-
["next/babel"]
4-
],
2+
"presets": [["next/babel"]],
53
"env": {
6-
"development": {
7-
"plugins": ["inline-dotenv"]
4+
"development": {
5+
"plugins": ["inline-dotenv"]
86
},
97
"production": {
108
"presets": [
11-
["next/babel", {
12-
"preset-env": {
13-
"targets": {
14-
"ie": "11"
15-
},
16-
"debug": false
9+
[
10+
"next/babel",
11+
{
12+
"preset-env": {
13+
"targets": {
14+
"ie": "11"
15+
},
16+
"debug": false
17+
}
1718
}
18-
}]
19+
]
1920
]
2021
},
2122
"test": {
@@ -47,20 +48,24 @@
4748
}
4849
],
4950
"ramda",
50-
["module-resolver", {
51-
"root": ["./"],
52-
"alias": {
53-
"@containers":"./containers",
54-
"@components":"./components",
55-
"@hooks":"./components/Hooks",
56-
"@config":"./config",
57-
"@stores":"./stores",
58-
"@model":"./stores/SharedModel",
59-
"@utils":"./utils",
60-
"@schemas":"./containers/schemas",
61-
"@Img": "./components/Img",
62-
"@SvgIcons": "./components/SvgIcons"
51+
[
52+
"module-resolver",
53+
{
54+
"root": ["./"],
55+
"alias": {
56+
"@containers": "./containers",
57+
"@components": "./components",
58+
"@services": "./services",
59+
"@hooks": "./components/Hooks",
60+
"@config": "./config",
61+
"@stores": "./stores",
62+
"@model": "./stores/SharedModel",
63+
"@utils": "./utils",
64+
"@schemas": "./containers/schemas",
65+
"@Img": "./components/Img",
66+
"@SvgIcons": "./components/SvgIcons"
67+
}
6368
}
64-
}]
69+
]
6570
]
6671
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ yarn-error.log
1212
schema.graphql
1313
cypress//integration/examples
1414
cypress/videos/
15+
.vscode/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"clean": "shjs ./utils/scripts/clean.js",
2424
"gen": "plop --plopfile ./utils/scripts/generators/index.js",
2525
"analyze": "cross-env ANALYZE=true next build",
26-
"lint": "eslint --fix pages/**/*.js components/**/*.js containers/**/*.js stores/**/*.js utils/**/*.js",
26+
"lint": "eslint ./pages/**/*.js ./components/**/*.js ./containers/**/*.js ./stores/**/*.js ./utils/**/*.js ./services/**/*.js",
2727
"lint:staged": "git diff --cached --name-only --diff-filter=ACRM | grep \".js$\" | xargs eslint",
2828
"test": "cross-env NODE_ENV=test jest --config .jest.config.js",
2929
"test:dev": "cross-env NODE_ENV=test jest --config .jest.config.js",

pages/_error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react'
22
import { Provider } from 'mobx-react'
33

4+
import AnalysisService from '@services/Analysis'
45
import ThemeWrapper from '@containers/ThemeWrapper'
5-
import AnalysisService from '@components/AnalysisService'
66
import ErrorPage from '@components/ErrorPage'
77

88
import initRootStore from '@stores/init'

pages/communities.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import React from 'react'
55
import { Provider } from 'mobx-react'
66
import R from 'ramda'
77

8+
import AnalysisService from '@services/Analysis'
9+
810
import GlobalLayout from '@containers/GlobalLayout'
911
import ThemeWrapper from '@containers/ThemeWrapper'
1012
import MultiLanguage from '@containers/MultiLanguage'
@@ -18,7 +20,7 @@ import CommunitiesContent from '@containers/CommunitiesContent'
1820
import Footer from '@containers/Footer'
1921

2022
import { P } from '@schemas'
21-
import AnalysisService from '@components/AnalysisService'
23+
2224
import {
2325
getJwtToken,
2426
makeGQClient,

pages/community.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import NextSeo from 'next-seo'
66
import { PAGE_SIZE, SITE_URL } from '@config'
77
import initRootStore from '@stores/init'
88

9+
import AnalysisService from '@services/Analysis'
910
import GlobalLayout from '@containers/GlobalLayout'
1011
import ThemeWrapper from '@containers/ThemeWrapper'
1112
import MultiLanguage from '@containers/MultiLanguage'
@@ -18,8 +19,6 @@ import CommunityBanner from '@containers/CommunityBanner'
1819
import CommunityContent from '@containers/CommunityContent'
1920
import Footer from '@containers/Footer'
2021
import ErrorBox from '@containers/ErrorBox'
21-
22-
import AnalysisService from '@components/AnalysisService'
2322
import ErrorPage from '@components/ErrorPage'
2423

2524
import {

pages/home/posts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import NextSeo from 'next-seo'
66
import { PAGE_SIZE, SITE_URL } from '@config'
77
import initRootStore from '@stores/init'
88

9+
import AnalysisService from '@services/Analysis'
10+
911
import GlobalLayout from '@containers/GlobalLayout'
1012
import ThemeWrapper from '@containers/ThemeWrapper'
1113
import MultiLanguage from '@containers/MultiLanguage'
@@ -19,7 +21,6 @@ import CommunityContent from '@containers/CommunityContent'
1921
import Footer from '@containers/Footer'
2022
import ErrorBox from '@containers/ErrorBox'
2123

22-
import AnalysisService from '@components/AnalysisService'
2324
import ErrorPage from '@components/ErrorPage'
2425

2526
import {

pages/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React from 'react'
22
import { Provider } from 'mobx-react'
33
import R from 'ramda'
44

5+
import AnalysisService from '@services/Analysis'
6+
57
import GlobalLayout from '@containers/GlobalLayout'
68
import ThemeWrapper from '@containers/ThemeWrapper'
79
import MultiLanguage from '@containers/MultiLanguage'
@@ -15,7 +17,6 @@ import Content from '@containers/Content'
1517
import Footer from '@containers/Footer'
1618
import ErrorBox from '@containers/ErrorBox'
1719

18-
import AnalysisService from '@components/AnalysisService'
1920
import ErrorPage from '@components/ErrorPage'
2021
import initRootStore from '@stores/init'
2122
// import { AnalysisService, ErrorPage } from '@components'

pages/job.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { BlogJsonLd } from 'next-seo'
55

66
import { PAGE_SIZE, SITE_URL } from '@config'
77

8+
import AnalysisService from '@services/Analysis'
9+
810
import GlobalLayout from '@containers/GlobalLayout'
911
import ThemeWrapper from '@containers/ThemeWrapper'
1012
import MultiLanguage from '@containers/MultiLanguage'
@@ -18,7 +20,6 @@ import Footer from '@containers/Footer'
1820
import ErrorBox from '@containers/ErrorBox'
1921

2022
import { P } from '@schemas'
21-
import AnalysisService from '@components/AnalysisService'
2223
import ErrorPage from '@components/ErrorPage'
2324

2425
// import { AnalysisService, ErrorPage } from '@components'

pages/oauth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Provider } from 'mobx-react'
33

44
import ThemeWrapper from '@containers/ThemeWrapper'
55

6-
import AnalysisService from '@components/AnalysisService'
6+
import AnalysisService from '@services/Analysis'
77
import OauthHinter from '@components/OauthHinter'
88

99
import initRootStore from '@stores/init'

0 commit comments

Comments
 (0)