0% found this document useful (0 votes)
4 views2 pages

Contractor Code Standards and Guidelines

The document outlines contractor code standards focusing on testing, code style, security, and source control. It emphasizes extensive testing, adherence to TypeScript best practices, and security measures like avoiding hardcoded credentials. Additionally, it specifies guidelines for branching, commit conventions, and pull request requirements to ensure code quality and compliance.

Uploaded by

baaniseyounes
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Contractor Code Standards and Guidelines

The document outlines contractor code standards focusing on testing, code style, security, and source control. It emphasizes extensive testing, adherence to TypeScript best practices, and security measures like avoiding hardcoded credentials. Additionally, it specifies guidelines for branching, commit conventions, and pull request requirements to ensure code quality and compliance.

Uploaded by

baaniseyounes
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Contractor Code Standards

Testing
●​ Extensive testing covering Component behaviors, validations and End-to-end
workflows
●​ Updated private GitHub repository with code, tests, and documentation
●​ Cross-platform compatible, running on Windows, Linux and Mac Systems
●​ Cross-browser compatible, Mozilla Firefox (version 68 or newer), Safari (version
13.1.2 or newer), Google Chrome (version 84 or newer), Microsoft Edge (version 85
or newer)
●​ Ensure UI is mobile friendly (check using different dimensions: iPad vs iPhone, etc)
●​ Basic accessibility compliance (WCAG) is required.

Code Style & Structure


●​ Typescript used, avoid using implicit any and unknown types; ensure Strict Mode is
enabled
●​ Every function contains return types and is limited to 50 lines; ensure code is
modular and is refactored
●​ Format code using prettier config and eslinter
●​ Code must pass lint/format checks before PR.
●​ Use descriptive method and variable names (no single-letter names).
●​ Add clear, concise comments where needed.
●​ No unused variables & imports

Security
●​ No hardcoded API URLs, credentials, and magic numbers
●​ .env files must be in .gitignore
●​ Provide .[Link] with required variables.
Source Control and Acceptance Criteria
●​ Do not commit code on master/main branch; branch name should be in this format
○​ For monorepo: app-name/feature|bugfix|chore/task-name
○​ For single repo: feature|bugfix|chore/task-name
●​ Git staging, do not ever use ‘git add .’
●​ Git commits should follow this convention:
[Link]
●​ Make sure you have prettier extension from vscode installed: [Link]-vscode
●​ Make sure you have prisma extension from vscode installed: [Link]
●​ All code you contribute is private and owned by the company
●​ There should be no mention of your name anywhere, (ex: git branches,
[Link], [Link], author in [Link], etc)
●​ Make sure work is in English, (ex: git commits, comments, etc)
●​ There should be no open source license files unless written authorization is given by
Jesse.
●​ PR must:
●​ Be linked to a milestone/task
●​ Pass all CI checks (lint, build, tests)
●​ Be reviewed and approved by a tech lead
●​ Include updated README if needed

You might also like