Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Dec 29, 2021
0 parents commit 23beaf2
Show file tree
Hide file tree
Showing 34 changed files with 9,816 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"projectName": "next-react-app",
"projectOwner": "navin-moorthy",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "navin-moorthy",
"name": "Navin Moorthy",
"avatar_url": "https://avatars.githubusercontent.com/u/39694575?v=4",
"profile": "https://navinmoorthy.me/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7
}
56 changes: 56 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# dotenv environment variable files
.env*

# Testing
/coverage

# Storybook Build
storybook-static

# Next JS
/.next/
/out/

# Vercel folder
.vercel

# Local Netlify
.netlify
.idea
*.env

# Optional eslint cache
.eslintcache

# Logs
*.log*

# Dependency directories
node_modules
jspm_packages

# Mac files
.DS_Store

# Optional npm cache directory
.npm

# Yarn 2
.pnp/
.pnp.*
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.yarn-integrity # Yarn Integrity file

# Lock files
package-lock.json
yarn.lock

## library folder
dist
CHANGELOG.md
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"extends": [
"react-app",
"react-app/jest",
"plugin:prettier/recommended",
"plugin:@next/next/recommended"
],
"plugins": ["simple-import-sort"],
"rules": {
"no-console": "off",
"simple-import-sort/imports": [
"error",
{
// https://github.com/lydell/eslint-plugin-simple-import-sort#custom-grouping
"groups": [
// Packages. `react` related packages come first.
[
"^react",
"^reakit-system",
"^reakit",
"^@renderlesskit/react",
"^@?\\w"
],
// Parent imports. Put `..` last.
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Other relative imports. Put same-folder imports and `.` last.
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
// Style imports.
["^.+\\.s?css$"]
]
}
],
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error"
}
}
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps
run: yarn

- name: Build
run: yarn build
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint

on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps
run: yarn

- name: Build
run: yarn lint
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "14.x"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup timezone
uses: zcong1993/setup-timezone@master
with:
timezone: Asia/Kolkata

- name: Install deps
run: yarn

- name: Test
run: yarn test:ci
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# dotenv environment variable files
.env*

# Testing
/coverage

# Storybook Build
storybook-static

# Next JS
/.next/
/out/

# Vercel folder
.vercel

# Local Netlify
.netlify
.idea
*.env

# Optional eslint cache
.eslintcache

# Logs
*.log*

# Dependency directories
node_modules
jspm_packages

# Mac files
.DS_Store

# Optional npm cache directory
.npm

# Yarn 2
.pnp/
.pnp.*
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.yarn-integrity # Yarn Integrity file

## library folder
build
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
56 changes: 56 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# dotenv environment variable files
.env*

# testing
/coverage

# next.js
/.next/
/out/

# Storybook build
storybook-static

# Local Netlify
.netlify
.idea
*.env

# Vercel folder
.vercel

# Optional eslint cache
.eslintcache

# Logs
*.log*

# Dependency directories
node_modules
jspm_packages

# Mac files
.DS_Store

# Optional npm cache directory
.npm

# Yarn 2
.pnp/
.pnp.*
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.yarn-integrity # Yarn Integrity file

# Lock files
package-lock.json
yarn.lock

# Library files
dist
CHANGELOG.md
39 changes: 39 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
// max 120 characters per line
printWidth: 80,
// use 2 spaces for indentation
tabWidth: 2,
// use spaces instead of indentations
useTabs: false,
// semicolon at the end of the line
semi: true,
// use single quotes
singleQuote: false,
// object's key is quoted only when necessary
quoteProps: "as-needed",
// use double quotes instead of single quotes in jsx
jsxSingleQuote: false,
// no comma at the end
trailingComma: "all",
// spaces are required at the beginning and end of the braces
bracketSpacing: true,
// brackets are not required for arrow function parameter, when there is only one parameter
arrowParens: "avoid",
// format the entire contents of the file
rangeStart: 0,
rangeEnd: Infinity,
// no need to write the beginning @prettier of the file
requirePragma: false,
// No need to automatically insert @prettier at the beginning of the file
insertPragma: false,
// use default break criteria
proseWrap: "always",
// decide whether to break the html according to the display style
htmlWhitespaceSensitivity: "css",
// vue files script and style tags indentation
vueIndentScriptAndStyle: false,
// lf for newline
endOfLine: "lf",
// formats quoted code embedded
embeddedLanguageFormatting: "auto",
};
Loading

0 comments on commit 23beaf2

Please sign in to comment.