Skip to content

Instantly share code, notes, and snippets.

View carloswm85's full-sized avatar
🎯
Compiling...

Carlos W. Mercado carloswm85

🎯
Compiling...
View GitHub Profile
#!/bin/bash
# I wrote a shell script that takes a project name and then configures an Angular project with a prefix and all my preferences,
# which include eslint, prettier, and the Airbnb styles guide for Angular using pnpm (instead of npm).
#
# Download it to the parent directory where you want to create a new project ( I have them all in a directory called wdd430)
# and then make it executable with this command.
#
# chmod +x create-angular-project.sh
#
/** 1 */
// Inside build method, in form widget
void toggleDropdownEnabled(bool val) {
ref
.read(providerTrackerDrowndownIndustrialDegree.notifier)
.update((state) => val);
}
/** 2 */
// Inside form

Linting (ESLint) and Formatting (Prettier) in Angular

Term Tool Explanation Use Docs
🔦 Linter ESLint - Runs a set of discrete rules
- Slower
- Explicit logic for edge cases
Code quality (bug catching) 📑
🧹 Formatter Prettier - Reformats in one pass
- Faster
- Can't find and fix bugs
Code Formatting 📑
  • eslintconfigprettier -> Prettier -> Lint

Linters have two categories of rules: