Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

Commit

Permalink
Everywhere: Qucik and dirty dep upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphsps committed Oct 23, 2023
1 parent ca72383 commit 6f0d320
Show file tree
Hide file tree
Showing 47 changed files with 6,148 additions and 19,503 deletions.
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MONGODB_URI=mongodb+srv://vercel-admin-user:[email protected]/myFirstDatabase?retryWrites=true&w=majority
67 changes: 20 additions & 47 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,62 +1,35 @@
{
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": [
"react",
"react-hooks",
"import"
],
"env": {
"es6": true,
"browser": true,
"node": true,
"jasmine": true,
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},

"ignorePatterns": ["node_modules/"],
"extends": ["next/core-web-vitals", "prettier"],
"plugins": ["unused-imports"],
"rules": {
"consistent-return": 2,
"no-mixed-operators": 0,
"no-useless-constructor": 0,
"standard/computed-property-even-spacing": 0,
"import/first": 0,
"react/no-find-dom-node": 0,
"react/prop-types": 1,
"react-hooks/rules-of-hooks": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/alt-text": 0,
"no-unused-vars": 1,
"no-console": 1,
"System": true,
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"semi": [
"error",
"always"
],
"no-console": ["error", { "allow": ["warn", "error"] }],
"indent": "off",
"semi": ["error", "always"],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"radix": [
"off"
"standard/computed-property-even-spacing": 0,
"import/first": 0,
"react/no-find-dom-node": 0,
"react/prop-types": 1,
"react-hooks/rules-of-hooks": 0,
"react/no-children-prop": 0,
"react/no-string-refs": 0,
"react-hooks/exhaustive-deps": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/alt-text": 0,
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
]
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
env:
CI: true
MONGODB: ${{ secrets.MONGODB }}
MONGODB_URI: ${{ secrets.MONGODB }}
steps:
- name: 🕶️ Checkout repository
uses: actions/checkout@v4
Expand All @@ -34,5 +34,8 @@ jobs:
- name: 📦 Download dependencies
run: npm ci

- name: 🧪 Lint
run: npm run lint

- name: 🧪 Test
run: npm run test
127 changes: 29 additions & 98 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,104 +1,35 @@
# Logs
logs
*.log
# dependencies
node_modules/
.pnp/
.pnp.js

# testing
/coverage

# next.js
.next/
next.lock/
out/
dist/
public/sitemap*.xml*
public/robots.txt*

# production
build/
.env.local

# misc
.DS_Store
.swc

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

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# deployment
.sentryclirc
.vercel

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
/node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
# typescript
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
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/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --allow-empty
4 changes: 0 additions & 4 deletions .jest/enzyme.ts

This file was deleted.

6 changes: 0 additions & 6 deletions .jest/jest-setup.ts

This file was deleted.

23 changes: 0 additions & 23 deletions .jest/jest.config.js

This file was deleted.

16 changes: 16 additions & 0 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import path from 'node:path';

const buildEslintCommand = (filenames) =>
`npm run lint:next -- --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(' --file ')}`;
const buildPrettierCommand = (filenames) =>
`npm run lint:prettier -- --write ${filenames
.filter((i) => ['package-lock.json'].includes(i))
.map((f) => path.relative(process.cwd(), f))
.join(' ')}`;

export default {
'*.(md|json|yml)': buildPrettierCommand,
'./src/**/*.(m|c)(js|ts)?(x)': [buildPrettierCommand, buildEslintCommand],
'./src/**/*.ts?(x)': () => 'npm run lint:types --',
'./src/**/*.(js|ts)?(x)': () => 'npm run test --'
};
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Ignore artifacts:
build
coverage
node_modules
.next

# Ignore mdoc till we PR a fix upstream.
**/*.mdoc
**/*.woff2
**/*.ttf
10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions .renovaterc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>NordcomInc/renovate-config"
]
}
34 changes: 34 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithEdge"
}
},
{
"name": "Build",
"type": "node-terminal",
"request": "launch",
"command": "npm run build"
},
{
"name": "Start",
"type": "node-terminal",
"request": "launch",
"command": "PORT=3000 npm run start"
}
]
}
14 changes: 14 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const nextJest = require('next/jest');

const createJestConfig = nextJest({
dir: './',
});

module.exports = createJestConfig({
moduleDirectories: ['node_modules', './src/'],
collectCoverage: true,
collectCoverageFrom: [
"./src/**/*.{js,ts,jsx,tsx}",
"!**/node_modules/**",
]
});
Loading

0 comments on commit 6f0d320

Please sign in to comment.