generated from timelessco/next-ts-app-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 23beaf2
Showing
34 changed files
with
9,816 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
}; |
Oops, something went wrong.