Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update angular eslint instructions #72

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions coding-standards/angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,16 @@ Navigate to the root directory of your project and execute the following npm com
npm init @eslint/config
```
Choose the following options:
- Usage: To check syntax, find problems, and enforce code style
- Usage: To check syntax and find problems
- Modules: JavaScript (import/export)
- Frameworks: None of these
- Typescript: No (Airbnb does not have support for TS, it is defined for JS and we will add additional TS support for it later)
- Environment: Browser
- Style: Use a popular style guide
- Style guide: Airbnb
- Format: JSON

Now select the option to install required dependencies. Click on Yes.
Select the appropiate package manager that is used by you.

Refer to this [screenshot](https://imgur.com/a/pIbb1Wb) for the options to choose and expected outcome
Refer to this [screenshot](https://imgur.com/a/aO2ozaV) for the options to choose and expected outcome

2. **Install dependencies to support typescript**

Expand Down Expand Up @@ -546,7 +543,7 @@ To ensure proper setup, add the following configuration files to your project's
```

4. **`package.json`**
Update `package.json`. Add the following line under "scripts" to enable Prettier formatting:
Update `package.json`. Add the following lines under "scripts" to detects any warnings and enable Prettier formatting:

```json
// package.json
Expand All @@ -555,11 +552,13 @@ To ensure proper setup, add the following configuration files to your project's
"scripts": {
// Other Commands
// Add the following line under "scripts"
"lint": "ng lint --max-warnings 0",
"prettier-format": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\""
}
// ...
}
```

1. **`settings.json`**
In your project's root directory, locate the .vscode folder. Create one if it doesn't exist. Once inside the folder, you can either create or modify the settings.json file. Populate this file with the following content:

Expand Down