Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hodfords-solutions/nestjs-eslint-config
Eslint default configuration for Nestjs project. It will help you to maintain the code quality of your project.
https://github.com/hodfords-solutions/nestjs-eslint-config
eslint nestjs typescript
Last synced: 3 days ago
JSON representation
Eslint default configuration for Nestjs project. It will help you to maintain the code quality of your project.
- Host: GitHub
- URL: https://github.com/hodfords-solutions/nestjs-eslint-config
- Owner: hodfords-solutions
- Created: 2024-09-21T15:43:55.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-28T03:37:02.000Z (2 months ago)
- Last Synced: 2025-01-22T13:08:47.269Z (11 days ago)
- Topics: eslint, nestjs, typescript
- Language: JavaScript
- Homepage: https://opensource.hodfords.uk/nestjs-eslint-config
- Size: 46.9 KB
- Stars: 40
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this 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-config
```## Configuration 🚀
To activate eslint, create a `eslint.config.js` file in the root of your project and add the following configuration:
```javascript
module.exports = require('@hodfords/nestjs-eslint-config');
```## Usage 🚀
Run the following command to lint your project:
```
npx eslint
```## Eslint Config Details
This configuration extends the `@hodfords/eslint-config` package. It includes the following plugins:
- `@typescript-eslint/eslint-plugin`
- `@typescript-eslint/parser`
- `eslint-plugin-prettier/recommended`Custom rules are also included in this configuration.
### Prettier Config
```javascript
{
useTabs: false,
tabWidth: 4,
printWidth: 120,
singleQuote: true,
trailingComma: 'none'
}
```### Typescript Config
#### Naming Conventions
- `@typescript-eslint/naming-convention`
- `enumMember`: `UPPER_CASE`
- `objectLiteralProperty`: `['camelCase', 'PascalCase', 'UPPER_CASE']`
- `['class', 'interface', 'enum']`: `PascalCase`
- `variable`: `['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`: `50`
- `max-lines`: `400`
- `prefer-const`
- `lines-between-class-members`
- `indent`: `off`## License
This project is licensed under the MIT License