@sbmc/eslint-config-sbmc
v1.0.2
Published
ESLint-Templates für alle Projekte
Readme
ESLint config for SBMC projects
This is the base ESLint config for all SBMC projects. It includes rules for general Typescript projects and specific rules for Angular, SAPUI5, and NestJS projects.
Installation
npm install --save-dev @sbmc/eslint-config-sbmc eslint @eslint/js typescript-eslint typescript eslint-plugin-prettierFor Angular projects, also install:
npm install --save-dev angular-eslintUsage
Each config file exports two configurations: one with Prettier integration and one without. You can choose the appropriate configuration based on your project's needs.
In your .eslintrc.[c/m]js file, you can extend the base config like this:
// @ts-check
import { nestConfigWithPrettier } from '@sbmc/eslint-config-sbmc/nest.mjs';
import tseslint from 'typescript-eslint';
export default tseslint.config(nestConfigWithPrettier, {
rules: {
// Any project level overrides or additional rules for TypeScript files can go here
},
});Remember to always include the base config first, followed by any project-specific overrides. Otherwise, the base rules might override your custom rules.
Available Configurations
@sbmc/eslint-config-sbmc: Base config for general TypeScript projects.baseConfigWithoutPrettier: Base config without Prettier integration.baseConfigWithPrettier: Base config with Prettier integration.
@sbmc/eslint-config-sbmc/angular: Config for Angular projects.angularConfigWithoutPrettier: Angular config without Prettier integration.angularConfigWithPrettier: Angular config with Prettier integration.
@sbmc/eslint-config-sbmc/sapui5: Config for SAPUI5 projects.ui5ConfigWithoutPrettier: SAPUI5 config without Prettier integration.ui5ConfigWithPrettier: SAPUI5 config with Prettier integration.
@sbmc/eslint-config-sbmc/nest: Config for NestJS projects.nestConfigWithoutPrettier: NestJS config without Prettier integration.nestConfigWithPrettier: NestJS config with Prettier integration.
Contributing
When contributing to this repository, please ensure that your latest commit increments the version number in package.json according to semantic versioning principles. For example using npm version patch for bug fixes, npm version minor for new features, and npm version major for breaking changes.
License
(c) SBMC Solutions GmbH. All rights reserved.
