@hodfords/nestjs-eslint-config
v11.0.2
Published
Eslint default configuration for Nestjs project. It will help you to maintain the code quality of your project.
Readme
ESLINT DEFAULT CONFIGURATION
Eslint default configuration for Nestjs project. It will help you to maintain the code quality of your project.
Installation 🤖
To begin using it, we first install the required dependencies.
npm install @hodfords/nestjs-eslint-configConfiguration 🚀
To activate eslint, create a eslint.config.js file in the root of your project and add the following configuration:
module.exports = require('@hodfords/nestjs-eslint-config');Usage 🚀
Run the following command to lint your project:
npx eslintEslint Config Details
This configuration extends the @hodfords/eslint-config package. It includes the following plugins:
@typescript-eslint/eslint-plugin@typescript-eslint/parsereslint-plugin-prettier/recommended
Custom rules are also included in this configuration.
Prettier Config
{
useTabs: false,
tabWidth: 4,
printWidth: 120,
singleQuote: true,
trailingComma: 'none'
}Typescript Config
Naming Conventions
@typescript-eslint/naming-conventionenumMember:UPPER_CASEobjectLiteralProperty:['camelCase', 'PascalCase', 'UPPER_CASE']['class', 'interface', 'enum']:PascalCasevariable:['PascalCase', 'camelCase', 'UPPER_CASE']function:['PascalCase', 'camelCase']'parameter','variable','function', 'classProperty','typeProperty','parameterProperty','classMethod','objectLiteralMethod','typeMethod':'camelCase'
Typescript Custom Rules
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }]Js Rules
max-line-per-function:50max-lines:400prefer-constlines-between-class-membersindent:off
License
This project is licensed under the MIT License
