Skip to content

Commit 1704915

Browse files
author
AimePazzo
committed
added gitignore
2 parents b5205d1 + 04cc52d commit 1704915

22 files changed

+19397
-16
lines changed

.babelrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react",
5+
"@babel/preset-typescript"
6+
],
7+
"plugins": [
8+
[
9+
"@babel/plugin-transform-runtime",
10+
{
11+
"regenerator": true
12+
}
13+
]
14+
]
15+
}

.eslintrc.json

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"ecmaVersion": 2018,
5+
"sourceType": "module",
6+
"project": "./tsconfig.json"
7+
},
8+
"plugins": [
9+
"@typescript-eslint",
10+
"react-hooks",
11+
"import",
12+
"jsx-a11y"
13+
],
14+
"extends": [
15+
"airbnb",
16+
"airbnb-typescript",
17+
"plugin:react/recommended",
18+
"plugin:@typescript-eslint/recommended",
19+
"plugin:storybook/recommended"
20+
],
21+
"rules": {
22+
"react-hooks/rules-of-hooks": "error",
23+
"react-hooks/exhaustive-deps": "warn",
24+
"react/prop-types": "off",
25+
"import/extensions": [
26+
"error",
27+
"ignorePackages",
28+
{
29+
"ts": "never",
30+
"tsx": "never"
31+
}
32+
],
33+
"import/no-extraneous-dependencies": [
34+
"error",
35+
{
36+
"devDependencies": [
37+
"**/*.test.tsx",
38+
"**/*.test.ts"
39+
]
40+
}
41+
],
42+
"react/function-component-definition": [
43+
"error",
44+
{
45+
"namedComponents": "arrow-function"
46+
}
47+
],
48+
"eol-last": ["warn", "always"],
49+
"@typescript-eslint/comma-dangle": ["warn", {
50+
"arrays": "only-multiline",
51+
"objects": "only-multiline",
52+
"imports": "only-multiline",
53+
"exports": "only-multiline",
54+
"functions": "only-multiline"
55+
}],
56+
"linebreak-style": ["warn", "unix"],
57+
"no-param-reassign": "off",
58+
"arrow-body-style": ["warn", "as-needed"],
59+
"jsx-a11y/no-static-element-interactions": "off",
60+
"max-len": "off"
61+
},
62+
"settings": {
63+
"react": {
64+
"pragma": "React",
65+
"version": "detect"
66+
},
67+
"import/resolver": {
68+
"typescript": {
69+
"alwaysTryTypes": true,
70+
"project": "./tsconfig.json"
71+
}
72+
}
73+
}
74+
}

.gitignore

+20-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
# Build and Release Folders
2-
bin-debug/
3-
bin-release/
4-
[Oo]bj/
5-
[Bb]in/
1+
# dependencies
2+
/node_modules
3+
/.pnp
4+
.pnp.js
65

7-
# Other files and folders
8-
.settings/
6+
# testing
7+
/coverage
98

10-
# Executables
11-
*.swf
12-
*.air
13-
*.ipa
14-
*.apk
9+
# production
10+
/build
1511

16-
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
17-
# should NOT be excluded as they contain compiler settings and other important
18-
# information for Eclipse / Flash Builder.
19-
node_modules
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
22+
23+
*storybook.log

.storybook/main.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { StorybookConfig } from "@storybook/react-webpack5";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5+
addons: [
6+
"@storybook/addon-webpack5-compiler-swc",
7+
"@storybook/addon-onboarding",
8+
"@storybook/addon-links",
9+
"@storybook/addon-essentials",
10+
"@chromatic-com/storybook",
11+
"@storybook/addon-interactions",
12+
],
13+
framework: {
14+
name: "@storybook/react-webpack5",
15+
options: {},
16+
},
17+
};
18+
export default config;

.storybook/preview.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { Preview } from "@storybook/react";
2+
3+
const preview: Preview = {
4+
parameters: {
5+
controls: {
6+
matchers: {
7+
color: /(background|color)$/i,
8+
date: /Date$/i,
9+
},
10+
},
11+
},
12+
};
13+
14+
export default preview;

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
11
# e-commerce-ninjas-fe
22
Front end repository for the teams' project
3+
4+
## Completed features
5+
- Setup empty react
6+
- Setup Redux store
7+
- Setup StoryBook documentation
8+
9+
## Get started
10+
- Clone repository
11+
```bash
12+
git clone https://github.com/atlp-rwanda/e-commerce-ninjas-fe
13+
```
14+
- Install dependencies
15+
```bash
16+
npm install
17+
```
18+
- Run App - it will run on http://localhost:5000/
19+
```bash
20+
npm run dev
21+
```
22+
23+
24+
## StoryBook
25+
To run storybook for documentation, use the command
26+
```bash
27+
npm run storybook
28+
```

0 commit comments

Comments
 (0)