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
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
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Copy and paste multiple items at the same time for MacOS](https://i.ytimg.com/vi/qI2-PsYQV-k/default.jpg)
![Boost Your Git Workflow with Aliases: Quick Guide](https://i.ytimg.com/vi/3YZIQUCrgNY/default.jpg)
![How to make Git detect filename case changes: A Quick Fix](https://i.ytimg.com/vi/x7-SGiDYD2k/default.jpg)
![Validation with Custom Decorators: Quick NestJS sample](https://i.ytimg.com/vi/Kbozim9lZpI/default.jpg)
![How to make checkbox as required field for yup validation?](https://i.ytimg.com/vi/WTqxBf4Wsao/default.jpg)
![Utilize React Router State for Seamless Data Passing: Quick Guide](https://i.ytimg.com/vi/1s5Dex1PENI/default.jpg)
![Speed Up Coding with VSCode Snippets: From Zero to Hero](https://i.ytimg.com/vi/CxHvEISuYuw/default.jpg)
![Handover – один из основных принципов сотовой связи. Что это такое и для чего он нужен?](https://i.ytimg.com/vi/_eeKzommA9U/default.jpg)
![Основной принцип построения сотовой связи. Откуда берутся соты и существуют ли они на самом деле?](https://i.ytimg.com/vi/0VDWVSfiapg/default.jpg)
![Транкинговая система мобильной связи. Радиальная система мобильной связи](https://i.ytimg.com/vi/w1mVd9hktXs/default.jpg)
![Замирание сигнала в радиоканале](https://i.ytimg.com/vi/Rcvs1FOFYj0/default.jpg)
![Возникновение и история мобильной связи](https://i.ytimg.com/vi/9A3aOpE9dNk/default.jpg)
![В чем разница между 1G, 2G, 3G и 4G? Детальный обзор](https://i.ytimg.com/vi/uNDvnJSUHd0/default.jpg)
![Как изменить язык интерфейса Windows, если лицензия Windows поддерживает только один язык интерфейса](https://i.ytimg.com/vi/lRBPh1Lbhys/default.jpg)
![Automate Your Coding Style: Set Up ESLint Auto-Formatting in VSCode](https://i.ytimg.com/vi/Wc6hasZicp8/default.jpg)