Skip to content

svile/node-development

Repository files navigation

node-development

Supercharge your Node development configuration.

Installation

Add @svile/node-development usually in devDependencies of your package.json.

Usage

Prettier

Add prettier usually in devDependencies of your package.json then add the following to your package.json file:

{
    "prettier": "@svile/node-development/prettier"
}

NOTE: Prettier can be further customized as per the documentation

Typescript

Add typescript usually in devDependencies of your package.json then create a tsconfig.json file in the root directory of your repo with the following contents:

{
    "extends": "@svile/node-development/tsconfig.json",
    "compilerOptions": {
        "baseUrl": ".",
    }
}

NOTE: Typescript can be further customized as per the documentation

ESLint

Add eslint usually in devDependencies of your package.json then add the following to your package.json file:

{
    "eslintConfig": {
        "extends": [
            "./node_modules/@svile/node-development/eslint"
        ],
        "root": true
    }
}

NOTE: ESLint can be further customized as per the documentation

Jest

Add jest usually in devDependencies of your package.json then create a jest.config.js file in the root directory of your repo with the following contents:

module.exports = {
  ...require('@svile/node-development/jest'),
  moduleNameMapper: {
    '^-/(.*)': '<rootDir>/src/$1',
  },
};

NOTE: Jest can be further customized as per the documentation