generated from bitwarden/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fb717f2
Showing
19 changed files
with
1,944 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Don't use tabs for indentation. | ||
[*] | ||
indent_size = 4 | ||
indent_style = space | ||
tab_width = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
guidelines = 120 | ||
|
||
# Code files | ||
[*.{cs,csx,vb,vbx}] | ||
indent_size = 4 | ||
|
||
# Xml project files | ||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] | ||
indent_size = 2 | ||
|
||
# Xml config files | ||
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] | ||
indent_size = 2 | ||
|
||
# JSON files | ||
[*.json] | ||
indent_size = 2 | ||
|
||
# JS files | ||
[*.{js,ts,scss,html}] | ||
indent_size = 2 | ||
|
||
[*.{ts}] | ||
quote_type = single | ||
|
||
[*.{scss,yml,csproj}] | ||
indent_size = 2 | ||
|
||
[*.sln] | ||
indent_style = tab | ||
|
||
# Dotnet code style settings: | ||
[*.{cs,vb}] | ||
# Sort using and Import directives with System.* appearing first | ||
dotnet_sort_system_directives_first = true | ||
# Avoid "this." and "Me." if not necessary | ||
dotnet_style_qualification_for_field = false:suggestion | ||
dotnet_style_qualification_for_property = false:suggestion | ||
dotnet_style_qualification_for_method = false:suggestion | ||
dotnet_style_qualification_for_event = false:suggestion | ||
|
||
# Use language keywords instead of framework type names for type references | ||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion | ||
dotnet_style_predefined_type_for_member_access = true:suggestion | ||
|
||
# Suggest more modern language features when available | ||
dotnet_style_object_initializer = true:suggestion | ||
dotnet_style_collection_initializer = true:suggestion | ||
dotnet_style_coalesce_expression = true:suggestion | ||
dotnet_style_null_propagation = true:suggestion | ||
dotnet_style_explicit_tuple_names = true:suggestion | ||
|
||
# Prefix private members with underscore | ||
dotnet_naming_rule.private_members_with_underscore.symbols = private_fields | ||
dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore | ||
dotnet_naming_rule.private_members_with_underscore.severity = suggestion | ||
|
||
dotnet_naming_symbols.private_fields.applicable_kinds = field | ||
dotnet_naming_symbols.private_fields.applicable_accessibilities = private | ||
|
||
dotnet_naming_style.prefix_underscore.capitalization = camel_case | ||
dotnet_naming_style.prefix_underscore.required_prefix = _ | ||
|
||
# Async methods should have "Async" suffix | ||
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods | ||
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async | ||
dotnet_naming_rule.async_methods_end_in_async.severity = suggestion | ||
|
||
dotnet_naming_symbols.any_async_methods.applicable_kinds = method | ||
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = * | ||
dotnet_naming_symbols.any_async_methods.required_modifiers = async | ||
|
||
dotnet_naming_style.end_in_async.required_prefix = | ||
dotnet_naming_style.end_in_async.required_suffix = Async | ||
dotnet_naming_style.end_in_async.capitalization = pascal_case | ||
dotnet_naming_style.end_in_async.word_separator = | ||
|
||
# Obsolete warnings, this should be removed or changed to warning once we address some of the obsolete items. | ||
dotnet_diagnostic.CS0618.severity = suggestion | ||
|
||
# Obsolete warnings, this should be removed or changed to warning once we address some of the obsolete items. | ||
dotnet_diagnostic.CS0612.severity = suggestion | ||
|
||
# Remove unnecessary using directives https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0005 | ||
dotnet_diagnostic.IDE0005.severity = warning | ||
|
||
# CSharp code style settings: | ||
[*.cs] | ||
# Prefer "var" everywhere | ||
csharp_style_var_for_built_in_types = true:suggestion | ||
csharp_style_var_when_type_is_apparent = true:suggestion | ||
csharp_style_var_elsewhere = true:suggestion | ||
|
||
# Prefer method-like constructs to have a expression-body | ||
csharp_style_expression_bodied_methods = true:none | ||
csharp_style_expression_bodied_constructors = true:none | ||
csharp_style_expression_bodied_operators = true:none | ||
|
||
# Prefer property-like constructs to have an expression-body | ||
csharp_style_expression_bodied_properties = true:none | ||
csharp_style_expression_bodied_indexers = true:none | ||
csharp_style_expression_bodied_accessors = true:none | ||
|
||
# Suggest more modern language features when available | ||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion | ||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion | ||
csharp_style_inlined_variable_declaration = true:suggestion | ||
csharp_style_throw_expression = true:suggestion | ||
csharp_style_conditional_delegate_call = true:suggestion | ||
|
||
# Newline settings | ||
csharp_new_line_before_open_brace = all | ||
csharp_new_line_before_else = true | ||
csharp_new_line_before_catch = true | ||
csharp_new_line_before_finally = true | ||
csharp_new_line_before_members_in_object_initializers = true | ||
csharp_new_line_before_members_in_anonymous_types = true | ||
|
||
# Namespace settings | ||
csharp_style_namespace_declarations = file_scoped:warning | ||
|
||
# Switch expression | ||
dotnet_diagnostic.CS8509.severity = error # missing switch case for named enum value | ||
dotnet_diagnostic.CS8524.severity = none # missing switch case for unnamed enum value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Please sort into logical groups with comment headers. Sort groups in order of specificity. | ||
# For example, default owners should always be the first group. | ||
# Sort lines alphabetically within these groups to avoid accidentally adding duplicates. | ||
# | ||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
|
||
# Default file owners | ||
* @bitwarden/tech-leads | ||
|
||
# DevOps for Actions and other workflow changes | ||
.github/workflows @bitwarden/dept-devops |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Feature Requests | ||
url: https://community.bitwarden.com/c/feature-requests/ | ||
about: Request new features using the Community Forums. Please search existing feature requests before making a new one. | ||
- name: Bitwarden Community Forums | ||
url: https://community.bitwarden.com | ||
about: Please visit the community forums for general community discussion, support and the development roadmap. | ||
- name: Customer Support | ||
url: https://bitwarden.com/contact/ | ||
about: Please contact our customer support for account issues and general customer support. | ||
- name: Security Issues | ||
url: https://hackerone.com/bitwarden | ||
about: We use HackerOne to manage security disclosures. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
## 🎟️ Tracking | ||
|
||
<!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> | ||
|
||
## 🚧 Type of change | ||
|
||
<!-- Choose those applicable and remove the others. --> | ||
|
||
- 🐛 Bug fix | ||
- 🚀 New feature development | ||
- 🧹 Tech debt (refactoring, code cleanup, dependency upgrades, etc.) | ||
- 🤖 Build/deploy pipeline (DevOps) | ||
- 🎂 Other | ||
|
||
## 📔 Objective | ||
|
||
<!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> | ||
|
||
## 📋 Code changes | ||
|
||
<!-- Explain the changes you've made to each file or major component. This should help the reviewer understand your changes. --> | ||
<!-- Also refer to any related changes or PRs in other repositories. --> | ||
|
||
- **file.ext:** Description of what was changed and why. | ||
|
||
## 📸 Screenshots | ||
|
||
<!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> | ||
|
||
## ⏰ Reminders before review | ||
|
||
- Contributor guidelines followed | ||
- All formatters and local linters executed and passed | ||
- Written new unit and / or integration tests where applicable | ||
- Protected functional changes with optionality (feature flags) | ||
- Used internationalization (i18n) for all UI strings | ||
- CI builds passed | ||
- Communicated to DevOps any deployment requirements | ||
- Updated any necessary documentation or informed the documentation team | ||
|
||
## 🦮 Reviewer guidelines | ||
|
||
<!-- Suggested interactions but feel free to use (or not) as you desire! --> | ||
|
||
- 👍 (`:+1:`) or similar for great changes | ||
- 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info | ||
- ❓ (`:question:`) for questions | ||
- 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion | ||
- 🎨 (`:art:`) for suggestions / improvements | ||
- ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention | ||
- 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt | ||
- ⛏ (`:pick:`) for minor or nitpick changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base", | ||
":combinePatchMinorReleases", | ||
":dependencyDashboard", | ||
":maintainLockFilesWeekly", | ||
":pinAllExceptPeerDependencies", | ||
":prConcurrentLimit10", | ||
":rebaseStalePrs", | ||
"schedule:weekends", | ||
":separateMajorReleases" | ||
], | ||
"enabledManagers": ["cargo", "github-actions", "npm", "nuget"], | ||
"packageRules": [ | ||
{ | ||
"groupName": "cargo minor", | ||
"matchManagers": ["cargo"], | ||
"matchUpdateTypes": ["minor", "patch"] | ||
}, | ||
{ | ||
"groupName": "gh minor", | ||
"matchManagers": ["github-actions"], | ||
"matchUpdateTypes": ["minor", "patch"] | ||
}, | ||
{ | ||
"groupName": "npm minor", | ||
"matchManagers": ["npm"], | ||
"matchUpdateTypes": ["minor", "patch"] | ||
}, | ||
{ | ||
"groupName": "nuget minor", | ||
"matchManagers": ["nuget"], | ||
"matchUpdateTypes": ["minor", "patch"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Enforce PR labels | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
types: [labeled, unlabeled, opened, reopened, synchronize] | ||
jobs: | ||
enforce-label: | ||
if: ${{ contains(github.event.*.labels.*.name, 'hold') || contains(github.event.*.labels.*.name, 'needs-qa') }} | ||
name: Enforce label | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Check for label | ||
run: | | ||
echo "PRs with the hold or needs-qa labels cannot be merged" | ||
echo "### :x: PRs with the hold or needs-qa labels cannot be merged" >> $GITHUB_STEP_SUMMARY | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
name: Workflow linter | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/** | ||
|
||
jobs: | ||
call-workflow: | ||
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# General | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# IDEs and editors | ||
.idea/ | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
|
||
# Node | ||
node_modules | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# How to Contribute | ||
|
||
Our [Contributing Guidelines](https://contributing.bitwarden.com/contributing/) are located in our [Contributing Documentation](https://contributing.bitwarden.com/). The documentation also includes recommended tooling, code style tips, and lots of other great information to get you started. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Source code in this repository is covered by one of two licenses: (i) the | ||
GNU General Public License (GPL) v3.0 (ii) the Bitwarden License v1.0. The | ||
default license throughout the repository is GPL v3.0 unless the header | ||
specifies another license. Bitwarden Licensed code is found only in the | ||
/bitwarden_license directory. | ||
|
||
GPL v3.0: | ||
https://github.com/bitwarden/web/blob/master/LICENSE_GPL.txt | ||
|
||
Bitwarden License v1.0: | ||
https://github.com/bitwarden/web/blob/master/LICENSE_BITWARDEN.txt | ||
|
||
No grant of any rights in the trademarks, service marks, or logos of Bitwarden is | ||
made (except as may be necessary to comply with the notice requirements as | ||
applicable), and use of any Bitwarden trademarks must comply with Bitwarden | ||
Trademark Guidelines | ||
<https://github.com/bitwarden/server/blob/master/TRADEMARK_GUIDELINES.md>. |
Oops, something went wrong.