Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor adapter/db/order includeBodyQuantityProductInProductDb function #9

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dist
dist
72 changes: 36 additions & 36 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'plugin:jest/recommended',
'standard',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
],
rules: {
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
camelcase: 'off',
'no-warning-comments': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true },
],
},
}
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'plugin:jest/recommended',
'standard',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
],
rules: {
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
camelcase: 'off',
'no-warning-comments': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true },
],
},
}
60 changes: 30 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test --if-present
- run: npm run build --if-present
- run: npm run type-check
- run: npm run lint
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui já podemos usar a v16, que é LTS atual :)
Ou até a v18, se o GitHub Actions suportar (tem que ver se suporta)

# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se não me engano, essa lib já está na v3, dá pra atualizar tbem :D

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test --if-present
- run: npm run build --if-present
- run: npm run type-check
- run: npm run lint
8 changes: 4 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run type-check && npm run lint
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run type-check && npm run lint
4 changes: 4 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
# gitmoji as a commit hook
exec < /dev/tty
gitmoji --hook $1 $2
26 changes: 13 additions & 13 deletions environment.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
declare global {
/* eslint-disable no-unused-vars */
namespace NodeJS {
interface ProcessEnv {
MONGO_URL: string
PORT: string
MONGO_DB_NAME: string
CORS_ORIGINS: string
}
}
}

export { }
declare global {
/* eslint-disable no-unused-vars */
namespace NodeJS {
interface ProcessEnv {
MONGO_URL: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa interface pode ficar aqui por enquanto, mas depois vamos fazer uma validação decente nas env vars pra ficar mais seguro xD

PORT: string
MONGO_DB_NAME: string
CORS_ORIGINS: string
}
}
}
export { }
16 changes: 8 additions & 8 deletions jest.config.integration.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict'

const jestConfig = require('./jest.config')

module.exports = {
...jestConfig,
testMatch: ['**/?(*.)+(spec|test).integration.[tj]s?(x)'],
}
'use strict'
const jestConfig = require('./jest.config')
module.exports = {
...jestConfig,
testMatch: ['**/?(*.)+(spec|test).integration.[tj]s?(x)'],
}
Loading