Superlinter
for any language
Superlinter
for any language
Replace all linters, Sonarqube and more with natural language
superlinter for any stack.
Replace all linters, Sonarqube and more with natural language
superlinter for any stack.
Connect your repo
Connect your repo
Connect your repo
Connect your repo
Chat with a founder
Chat with a founder
Chat with a founder
Chat with a founder
Trusted by engineers, from
Trag can lint patterns
Trag can lint patterns
Describe your pattern in plain english, it can be very specific, context aware, or it can be very high level, like
Describe your pattern in plain english, it can be very specific, context aware, or it can be very high level, like
High level patterns
High level patterns
Ensure we are not logging sensitive data.
Follow DRY principles.
Context aware patterns
Context aware patterns
Make sure to wrap any API calls, with module X to handle errors with Y error handling.
While working with the A make sure to do B and C.
Some pattern examples
Some pattern examples
A pattern in Trag defines a specific rule for code structure or behavior,
for example…
A pattern in Trag defines a specific rule for code structure or behavior,
for example…
Create
Pattern
Ensure that complex forms using NgRx only dispatch actions to update the store when form values actually change.
import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { FormGroup, FormControl } from '@angular/forms';
@Component({
selector: 'app-profile-form',
templateUrl: './profile-form.component.html',
})
export class ProfileFormComponent {
profileForm = new FormGroup({
firstName: new FormControl(''),
lastName: new FormControl(''),
});
constructor(private store: Store) {}
onSubmit() {
this.store.dispatch(updateProfile({ profile: this.profileForm.value }));
}
}
Trag comment
The dispatch is done every time, regardless of whether the form values have changed, maybe revisit this part and make sure this is intended.
Pattern
Ensure that complex forms using NgRx only dispatch actions to update the store when form values actually change.
import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
import { FormGroup, FormControl } from '@angular/forms';
@Component({
selector: 'app-profile-form',
templateUrl: './profile-form.component.html',
})
export class ProfileFormComponent {
profileForm = new FormGroup({
firstName: new FormControl(''),
lastName: new FormControl(''),
});
constructor(private store: Store) {}
onSubmit() {
this.store.dispatch(updateProfile({ profile: this.profileForm.value }));
}
}
Trag comment
The dispatch is done every time, regardless of whether the form values have changed, maybe revisit this part and make sure this is intended.
How to set up Trag
Install GitHub application and that's pretty much it.
Step 1
Install GitHub app
Step 2
Write custom patterns
Step 3
Open a Pull Request
How to set up Trag
Install GitHub application and that's pretty much it.
Step 1
Install GitHub app
Step 2
Write custom patterns
Step 3
Open a Pull Request
How to set up Trag
Install GitHub application and that's pretty much it.
Step 1
Install GitHub app
Step 2
Write custom patterns
Step 3
Open a Pull Request
made easy peasy.
Let Trag enforce your coding standards while you
focus on writing better code.
No credit card required
made easy peasy.
Let Trag enforce your coding standards while you
focus on writing better code.
No credit card required
code in
Let Trag enforce your coding standards while you
focus on writing better code.
No credit card required