-
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.
Merge pull request #2 from manjillama/dev
Dev
- Loading branch information
Showing
4 changed files
with
50 additions
and
24 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 |
---|---|---|
@@ -1,21 +1,57 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
parserOptions: { | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
env: { | ||
es6: true, | ||
node: true, | ||
'jest/globals': true, | ||
}, | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules | ||
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier | ||
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. | ||
'airbnb-base', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:jest/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
plugins: ['@typescript-eslint'], | ||
globals: { | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly', | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 11, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint', 'jest'], | ||
ignorePatterns: ['**/dist/**'], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'no-console': 'warn', | ||
'import/prefer-default-export': 'off', | ||
'func-names': 'off', | ||
'lines-between-class-members': 'off', | ||
'no-return-await': 'off', | ||
'consistent-return': 'off', | ||
'no-unused-vars': ['error', { argsIgnorePattern: 'error|req|res|val' }], | ||
'no-underscore-dangle': 'off', | ||
'prefer-destructuring': 'off', | ||
'class-methods-use-this': 'off', | ||
camelcase: 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ argsIgnorePattern: 'req|res|next|val' }, | ||
{ argsIgnorePattern: 'error|req|res|val' }, | ||
], | ||
'import/extensions': [ | ||
'error', | ||
'ignorePackages', | ||
{ | ||
js: 'never', | ||
jsx: 'never', | ||
ts: 'never', | ||
tsx: 'never', | ||
}, | ||
], | ||
'@typescript-eslint/ban-types': 'off', | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"tabWidth": 2 | ||
"trailingComma": "none" | ||
} |
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 |
---|---|---|
@@ -1,8 +0,0 @@ | ||
export const STARTUP_MESSAGE = ` | ||
_____.___. __ .__ _____ __ .__ | ||
\\__ | |____ _/ |________|__| / \\ _____/ |_ ___________ ____ ___.__. ____ | | ____ ______ | ||
/ | \\__ \\\\ __\\_ __ \\ | / \\ / \\ / _ \\ __\\/ _ \\_ __ \\_/ ___< | |/ ___\\| | _/ __ \\ / ___/ | ||
\\____ |/ __ \\| | | | \\/ | / Y ( <_> ) | ( <_> ) | \\/\\ \\___\\___ \\ \\___| |_\\ ___/ \\___ \\ | ||
/ ______(____ /__| |__| |__| \\____|__ /\\____/|__| \\____/|__| \\___ > ____|\\___ >____/\\___ >____ > | ||
\\/ \\/ \\/ \\/\\/ \\/ \\/ \\/ | ||
`; | ||
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 |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import app from './app'; | ||
import { logger } from './utils'; | ||
import { STARTUP_MESSAGE } from './constants'; | ||
|
||
const PORT = process.env.PORT || 5000; | ||
|
||
app.listen(PORT, () => { | ||
console.log('\x1b[36m', STARTUP_MESSAGE, '\x1b[0m'); | ||
|
||
logger.info(`✅ Server listening on port ${PORT}`); | ||
logger.info(`🚀 Deploy stage: ${process.env.NODE_ENV}${process.env.STAGING ? ' staging' : ''}`); | ||
}); |