Skip to content

Commit 279f205

Browse files
feat: setup project
1 parent c7d89f1 commit 279f205

33 files changed

Lines changed: 15199 additions & 33646 deletions

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
node_modules
3+
public

.eslintrc.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"env":{
3+
"browser":true,
4+
"es2021":true
5+
},
6+
"extends":[
7+
"plugin:react/recommended",
8+
"airbnb",
9+
"plugin:@typescript-eslint/recommended",
10+
"prettier",
11+
"plugin:prettier/recommended"
12+
13+
],
14+
"parser":"@typescript-eslint/parser",
15+
"parserOptions":{
16+
"ecmaFeatures":{
17+
"jsx":true
18+
},
19+
"ecmaVersion":12,
20+
"sourceType":"module"
21+
},
22+
"plugins":[
23+
"react",
24+
"@typescript-eslint",
25+
"react-hooks"
26+
],
27+
"rules":{
28+
"react/react-in-jsx-scope":"off",
29+
"no-use-before-define":"off",
30+
"@typescript-eslint/no-use-before-define":[
31+
"error"
32+
],
33+
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
34+
35+
"react/jsx-filename-extension":[
36+
"warn",
37+
{
38+
"extensions":[
39+
".tsx"
40+
]
41+
}
42+
],
43+
"import/extensions":[
44+
"error",
45+
"ignorePackages",
46+
{
47+
"ts":"never",
48+
"tsx":"never"
49+
}
50+
],
51+
52+
"@typescript-eslint/explicit-function-return-type":[
53+
"error",
54+
{
55+
"allowExpressions":true
56+
}
57+
],
58+
"max-len":[
59+
"warn",
60+
{
61+
"code":80
62+
}
63+
],
64+
"react-hooks/rules-of-hooks":"error",
65+
"react-hooks/exhaustive-deps":"warn",
66+
"import/prefer-default-export":"off",
67+
"react/prop-types":"off"
68+
},
69+
"settings":{
70+
"import/resolver":{
71+
"typescript":{
72+
73+
}
74+
}
75+
}
76+
}

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
3+
*.json
4+
!tsconfig*.json

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "always",
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"semi": true,
6+
"trailingComma": "all"
7+
}

babel.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
plugins: ["@babel/plugin-transform-modules-commonjs"],
3+
presets: [
4+
"@babel/preset-typescript",
5+
[
6+
"@babel/preset-react",
7+
{ runtime: "automatic", importSource: "@emotion/react" },
8+
],
9+
],
10+
};

dist/index.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<!-- <link rel="shortcut icon" href="/favicon.ico" /> -->
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<title>NMRium Wrapper</title>
9+
10+
<style>
11+
html,
12+
body,
13+
#root {
14+
height: 100%;
15+
margin: 0;
16+
padding: 0;
17+
}
18+
</style>
19+
</head>
20+
<body>
21+
<noscript>You need to enable JavaScript to run this app.</noscript>
22+
<div id="root"></div>
23+
<script type="module" src="/src/index.tsx"></script>
24+
</body>
25+
</html>

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
testPathIgnorePatterns: ["/node_modules/"],
3+
// Remove /data to include component files when components are tested.
4+
collectCoverageFrom: ["src/**/*.{js,jsx,ts,tsx}"],
5+
};

0 commit comments

Comments
 (0)