Загрузка страницы

Improve you code style: Adding ESLint and Prettier

Ensuring a consistent code style is paramount in software development, and what better way to achieve this than by integrating ESLint and Prettier into your NestJS project? In this tutorial, we dive into the steps required to add these powerful tools to your development environment, streamlining your code formatting and linting processes.

module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 100,
tabWidth: 4,
};

"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\""

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', '@darraghor/nestjs-typed'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:@darraghor/nestjs-typed/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
};
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"

Видео Improve you code style: Adding ESLint and Prettier канала Blue Cell
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
7 апреля 2024 г. 15:39:03
00:01:28
Яндекс.Метрика