# @personal-project/core

> - Install dev dependencies for TypeScript

Latest version **1.0.29** (published 2022-05-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install @personal-project/core
pnpm add @personal-project/core
yarn add @personal-project/core
bun add @personal-project/core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.29 |
| Published | 2022-05-18 |
| First published | 2021-09-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 37.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | lavanphat |

## Links

- npm: https://www.npmjs.com/package/@personal-project/core
- npm.io page: https://npm.io/package/@personal-project/core

## Dependencies (8)

- [express](https://npm.io/package/express.md) ^4.17.1
- [supertest](https://npm.io/package/supertest.md) ^6.1.6
- [compression](https://npm.io/package/compression.md) ^1.7.4
- [@types/express](https://npm.io/package/@types/express.md) ^4.17.13
- [class-validator](https://npm.io/package/class-validator.md) ^0.13.2
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13
- [class-transformer](https://npm.io/package/class-transformer.md) ^0.5.1
- [@types/compression](https://npm.io/package/@types/compression.md) ^1.7.2

## Recent versions

- 1.0.29 (latest) — 2022-05-18
- 1.0.28 — 2022-01-13
- 1.0.27 — 2022-01-11
- 1.0.26 — 2022-01-10
- 1.0.25 — 2022-01-10
- 1.0.24 — 2021-12-14
- 1.0.23 — 2021-12-10
- 1.0.22 — 2021-12-03
- 1.0.21 — 2021-12-03
- 1.0.20 — 2021-12-03
- 1.0.19 — 2021-12-02
- 1.0.18 — 2021-11-30
- 1.0.17 — 2021-11-29
- 1.0.16 — 2021-11-29
- 1.0.15 — 2021-11-26
- … 11 more at https://npm.io/package/@personal-project/core/versions

## README

## Installation package init project

- Install dev dependencies for TypeScript

```bash
yarn add -D @types/node @typescript-eslint/eslint-plugin  @typescript-eslint/parser eslint ts-node typescript
```

- Install dev dependencies for test with jest

```bash
yarn add -D @types/jest @types/supertest jest supertest ts-jest
```

- Create file in root `.gitignore`

```
node_modules
build
coverage
```

- Create file in root `.npmignore` ( init package )

```
node_modules
coverage
```

- Create eslint file `.eslintrc.js`

```javascript
// eslint-disable-next-line no-undef
module.exports = {
  root: true,
  parser: '@typescript-eslint/parser',
  plugins: ['@typescript-eslint'],
  ignorePatterns: ['dist/*', 'build/*'],
  overrides: [
    {
      files: ['*.ts'], // Your TypeScript files extension
      parserOptions: {
        project: ['./tsconfig.json'] // Specify it only for TypeScript files
      }
    }
  ],
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/eslint-recommended',
    'plugin:@typescript-eslint/recommended'
  ],
  rules: {
    'no-console': 2,
    '@typescript-eslint/no-inferrable-types': [0, 'ignore-params'],
    '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
    '@typescript-eslint/naming-convention': [
      'error',
      {
        selector: 'variable',
        format: ['camelCase', 'UPPER_CASE']
      },
      {
        selector: ['function', 'classMethod'],
        format: ['camelCase']
      },
      {
        selector: 'typeLike',
        format: ['PascalCase']
      },
      {
        selector: 'interface',
        format: ['PascalCase'],
        custom: {
          regex: 'I[A-Za-z]',
          match: true
        }
      },
      {
        selector: 'variable',
        types: ['boolean'],
        format: ['PascalCase'],
        prefix: ['is', 'should', 'has', 'can', 'did', 'will']
      },
      {
        selector: 'parameter',
        format: ['camelCase'],
        leadingUnderscore: 'allow'
      }
    ]
  }
};
```

- Create eslint file `tsconfig.json`

```json
{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
    "outDir": "./build",
    "declaration": true,
    "moduleResolution": "node",
    "removeComments": true,
    "noImplicitAny": false,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "noImplicitThis": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "resolveJsonModule": true
  },
  "exclude": ["node_modules"],
  "include": ["./src/**/*.tsx", "./src/**/*.ts", "./src/**/*.d.ts"]
}
```

- Create eslint file `jest.config.ts`

```typescript
import type { Config } from '@jest/types';

// Sync object
const config: Config.InitialOptions = {
  verbose: true,
  testEnvironment: 'node',
  moduleFileExtensions: ['ts', 'tsx', 'js'],
  transform: {
    '^.+\\.(ts|tsx)$': 'ts-jest'
  },
  globals: {
    'ts-jest': {
      tsconfig: 'tsconfig.json'
    }
  },
  testMatch: ['**/*.test.(ts|js)']
};
export default config;
```

- Add command for test `package.json`

```json
"scripts": {
    "test": "jest --coverage --detectOpenHandles --forceExit",
    "lint": "eslint . --ext .ts"
     ...
},
```

---
_Source: https://npm.io/package/@personal-project/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
