Skip to content

Commit

Permalink
Merge pull request #2 from manjillama/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
manjillama authored Jul 31, 2021
2 parents 5674f1f + a9fc76a commit f37c1c6
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 24 deletions.
58 changes: 47 additions & 11 deletions .eslintrc.js
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',
},
};
5 changes: 3 additions & 2 deletions .prettierrc
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"
}
8 changes: 0 additions & 8 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
export const STARTUP_MESSAGE = `
_____.___. __ .__ _____ __ .__
\\__ | |____ _/ |________|__| / \\ _____/ |_ ___________ ____ ___.__. ____ | | ____ ______
/ | \\__ \\\\ __\\_ __ \\ | / \\ / \\ / _ \\ __\\/ _ \\_ __ \\_/ ___< | |/ ___\\| | _/ __ \\ / ___/
\\____ |/ __ \\| | | | \\/ | / Y ( <_> ) | ( <_> ) | \\/\\ \\___\\___ \\ \\___| |_\\ ___/ \\___ \\
/ ______(____ /__| |__| |__| \\____|__ /\\____/|__| \\____/|__| \\___ > ____|\\___ >____/\\___ >____ >
\\/ \\/ \\/ \\/\\/ \\/ \\/ \\/
`;
3 changes: 0 additions & 3 deletions src/index.ts
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' : ''}`);
});

0 comments on commit f37c1c6

Please sign in to comment.