Skip to content

Commit

Permalink
add package base structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeirojose committed Sep 19, 2024
1 parent 8198e5c commit e1c6d79
Show file tree
Hide file tree
Showing 35 changed files with 884 additions and 12,594 deletions.
205 changes: 205 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
## Adapted from: https://github.com/alexkaratarakis/gitattributes
## Specific to yarn

/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated

# Specific for json5

turbo.json text=auto linguist-language=JSON-with-Comments
tsconfig.json text=auto linguist-language=JSON-with-Comments
tsconfig.*.json text=auto linguist-language=JSON-with-Comments
*.code-workspace text=auto linguist-language=JSON-with-Comments


* text eol=lf

# Source code
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.coffee text
*.css text
*.htm text diff=html
*.html text diff=html
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.ls text
*.map text -diff
*.od text
*.onlydata text
*.php text diff=php
*.pl text
*.ps1 text eol=crlf
*.py text diff=python
*.rb text diff=ruby
*.sass text
*.scm text
*.scss text diff=css
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text diff=html

# Docker
Dockerfile text

# Documentation
*.ipynb text
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

# Templates
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text
*.vue text

# Configs
*.cnf text
*.conf text
*.config text
.editorconfig text
.env text
.gitattributes text
.gitconfig text
.htaccess text
*.lock text -diff
package-lock.json text -diff
*.toml text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text

# Heroku
Procfile text

# Graphics
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.gifv binary
*.glb binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary
*.avif binary


# Audio
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

# Video
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary

# Archives
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

# Fonts
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary

# Executables
*.exe binary
*.pyc binary

# RC files (like .babelrc or .eslintrc)
*.*rc text

# Ignore files (like .npmignore or .gitignore)
*.*ignore text


73 changes: 67 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,74 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# and https://github.com/github/gitignore for examples

# local env files (followinf dotenv-flow / nextjs convention)

.env.local
.env.*.local

# security: atlassian/changeset

**/.netrc

# turbo
.turbo

# dependencies
node_modules
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

# testing
/coverage
.out/

# Debug

**/.debug

# Build directories (next.js...)
/.next/
/out/
/build

# Cache
**/tsconfig.tsbuildinfo
**/.eslintcache
.cache/*

# Misc
.DS_Store
*.pem

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*


# IDE
.idea/*
.project
.classpath
*.launch
*.sublime-workspace

.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Docker overrides

**.env*
!**.env.template
./docker-compose.override.yml

**.tsbuildinfo
# Deployment platforms

.vscode
# Local Netlify folder
.netlify
.vercel
16 changes: 16 additions & 0 deletions .ncurc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# npm-check-updates configuration used by yarn deps:check && yarn deps:update
# convenience scripts.
# @link https://github.com/raineorshine/npm-check-updates

# Add here exclusions on packages if any
reject:
[
'eslint',
'eslint-plugin-react-hooks',
'eslint-plugin-sonarjs',
'@pothos/plugin-prisma',
'@pothos/core',
'@pothos/plugin-errors',
'@typescript-eslint/parser',
'@typescript-eslint/eslint-plugin',
]
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# used in tandem with package.json engines section to only use yarn
engine-strict=true

7 changes: 7 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.github
.changeset
.husky
docker
README.md
CHANGELOG.md

19 changes: 19 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
compressionLevel: 0

defaultSemverRangePrefix: ''

enableGlobalCache: false

nmMode: hardlinks-local

nodeLinker: node-modules

npmRegistryServer: 'https://registry.npmjs.org/'

supportedArchitectures:
cpu:
- current
libc:
- current
os:
- current
36 changes: 36 additions & 0 deletions apps/claim-vesting/lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// @ts-check

/**
* This files overrides the base lint-staged.config.js present in the root directory.
* It allows to run eslint based the package specific requirements.
* {@link https://github.com/okonet/lint-staged#how-to-use-lint-staged-in-a-multi-package-monorepo}
* {@link https://github.com/belgattitude/nextjs-monorepo-example/blob/main/docs/about-lint-staged.md}
*/

const {
concatFilesForPrettier,
getEslintFixCmd,
} = require('../../lint-staged.common.js');

/**
* @type {Record<string, (filenames: string[]) => string | string[] | Promise<string | string[]>>}
*/
const rules = {
'**/*.{js,jsx,ts,tsx,mjs,cjs}': (filenames) => {
return getEslintFixCmd({
cwd: __dirname,
fix: true,
cache: true,
// when autofixing staged-files a good tip is to disable react-hooks/exhaustive-deps, cause
// a change here can potentially break things without proper visibility.
rules: ['react-hooks/exhaustive-deps: off'],
maxWarnings: 25,
files: filenames,
});
},
'**/*.{json,md,mdx,css,html,yml,yaml,scss}': (filenames) => {
return [`prettier --write ${concatFilesForPrettier(filenames)}`];
},
};

module.exports = rules;
Loading

0 comments on commit e1c6d79

Please sign in to comment.