diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..526e129 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +**/*.js +node_modules +build +public +dist \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..e0066e9 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,57 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": [ + "plugin:react/recommended", + "airbnb", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": [ + "react", + "@typescript-eslint", + "react-hooks", + "prettier" + ], + "rules": { + "prettier/prettier": "error", + "@typescript-eslint/explicit-module-boundary-types": "off", + "react/jsx-one-expression-per-line": "off", + "no-use-before-define": "off", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn", + "@typescript-eslint/ban-ts-comment": "off", + "react/jsx-filename-extension": [ + 1, + { + "extensions": [ + ".tsx" + ] + } + ], + "import/prefer-default-export": "off", + "import/extensions": [ + "error", + "ignorePackages", + { + "ts": "never", + "tsx": "never" + } + ] + }, + "settings": { + "import/resolver": { + "typescript": {} + } + } +} \ No newline at end of file diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..d866b94 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: [ revamp ] + pull_request: + branches: [ revamp ] + +jobs: + Code-Quality-Check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: 14.x + - name: Install dependencies + run: npm install -g yarn && yarn + - name: Run Linter + run: yarn lint + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [12.x, 14.x, 15.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install requirements + run: npm install -g yarn && yarn + - name: Run Build + run: yarn run build --if-present + unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: 14.x + - name: Install requirements + run: npm install -g yarn && yarn + - name: Run Unit tests + run: yarn test + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b8a075 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +src/*.d.ts +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2428d99 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,71 @@ +### Few points to follow + +- Follow proper HTML [Semantics](https://www.w3schools.com/html/html5_semantic_elements.asp) + +- Each Component must have proper description about their functionality + +### Commit Message Format + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +