Skip to content

Commit

Permalink
Merge pull request #22 from b2io/2024-cleanup
Browse files Browse the repository at this point in the history
cleanup: Formatting fixes, remove old files, minor updates
  • Loading branch information
kesslern authored Jun 4, 2024
2 parents a44a808 + 14d7bfb commit 7bad6eb
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 121 deletions.
26 changes: 0 additions & 26 deletions .csscomb.json

This file was deleted.

20 changes: 10 additions & 10 deletions CSharp/CSharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ C# can be written in either VS Code or Visual Studio.
### To Use VS Code

- [Install Visual Studio Code](https://code.visualstudio.com/)
- [Install .Net Core SDK](https://dotnet.microsoft.com/download)
- [Install C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)
- [Install .Net Core SDK](https://dotnet.microsoft.com/download)
- [Install C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)

Visual Studio can handle C# out of the box. Setup recommendations are [here](/ide/VisualStudio/README.md).

Expand All @@ -30,16 +30,16 @@ Coding conventions and standards to create consistent and readable code

- When naming namespaces Pascal case should be used
- Use client name as root of namespace, project as second level, technology or descriptor as third and/or fourth level.
```
namespace ABC.SoftwareName.Data.Extensions
```
```c#
namespace ABC.SoftwareName.Data.Extensions;
```

#### Classes

- Use a noun or nounprharse in Pascal case
- Derived classes should be compound noun containing the name of the base class.

```
```c#
public class OperationsManager : Manager
{
}
Expand All @@ -51,7 +51,7 @@ public class OperationsManager : Manager
- Field names should be a noun or phrase descriptive enough to describe its use.
- Hungarian notation should be avoided. I.e. Prefix of `m_` or `_` should be replaced with more descriptive names.

```
```c#
private Customer customer;
private ICollection<Customer> Customers;
private decimal productPrice;
Expand All @@ -71,7 +71,7 @@ private DateTime paymentDate;
- Name properties with noun or phrase.
- Hungarian notation should be avoided. I.e. Prefix of `m_` or `_` should be replaced with more descriptive names.

```
```c#
public String UserName
{
get; set;
Expand All @@ -88,7 +88,7 @@ public Customer Customer
- Methods should be named with a verb or phrase that describes the action being performed by the method.
- Each method should perfom on action, making naming simple.

```
```c#
public void PerformCalculations()
{
}
Expand All @@ -104,7 +104,7 @@ public Customer GetCustomer()
- Name parameters with a descriptive noun or phrase that can be used to determine the meaning/use.
- Avoid Hungarian notations

```
```c#
public decimal GetSalesTax(decimal salePrice, decimal taxRate)
{
}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Base Two
Copyright (c) 2015-2024 Base Two

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ Base Two development standards, best practices, and tools.

1. [Source Control (Git)](./source-control/)
1. [Config](/source-control/README.md#config)
1. [File to Ignore](/source-control/README.md#files-to-ignore)
1. [Workflow](/source-control/README.md#workflow)
1. [Commit Message Convention](/source-control/README.md#commit-message-convention)
2. [File to Ignore](/source-control/README.md#files-to-ignore)
3. [Workflow](/source-control/README.md#workflow)
4. [Commit Message Convention](/source-control/README.md#commit-message-convention)
1. Languages
1. [JavaScript](/javascript/README.md)
1. [C#](CSharp/CSharp.md)
1. [CSS](css/css.md)
2. [C#](CSharp/CSharp.md)
3. [CSS](css/css.md)
1. IDEs
1. [VS Code](/ide/vs-code/README.md)
1. [Visual Studio](/ide/VisualStudio/README.md)
1. [IntelliJ](/ide/Jetbrains/README.md)
1. Linting and Format Setup
2. [Visual Studio](/ide/VisualStudio/README.md)
2. Linting and Format Setup
1. [VSCode](/ide/vs-code/README.md#VS-Code)
1. [EsLint & Prettier](/ide/vs-code/README.md#ESLint-&-Prettier)
1. [Prettier](/ide/Sublime/README.md#Prettier)
2. [Prettier](/ide/Sublime/README.md#Prettier)
19 changes: 0 additions & 19 deletions css/.csslintrc

This file was deleted.

12 changes: 6 additions & 6 deletions css/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ We alphabetize our declarations within a declaration block. This is useful for a
2. And harder to duplicate
3. Everything is always in the same order

```
```css
.example {
background: #000;
border: 0;
Expand All @@ -29,7 +29,7 @@ We alphabetize our declarations within a declaration block. This is useful for a

Each selector and declaration should be on its own line.

```
```css
#too, .many, .selectors .on .the, .same.line { content: "incorrect!"; }

#this,
Expand All @@ -45,7 +45,7 @@ Omit the leading 0 on fractions:`.7em` instead of `0.7em`

Omit the unit for zero values:

```
```css
.incorrect {
padding: 0em 2em;
}
Expand All @@ -57,7 +57,7 @@ Omit the unit for zero values:

Use shorthand wherever possible:

```
```css
.incorrect {
border-color: blue blue transparent blue;
margin: 0 auto 0;
Expand All @@ -76,7 +76,7 @@ Line heights should also be unit-less where possible, unless it is necessary to

There should always be a space after colons and commas and before the opening curly brace of a declaration block.

```
```css
.spaces--incorrect{
color:rgb(0,0,0);
}
Expand All @@ -90,7 +90,7 @@ There should always be a space after colons and commas and before the opening cu

Declarations should still be in alphabetical order in all .SCSS files. However, all `@extend` and `@include` declarations should be listed first.

```
```css
.incorrect {
border: 1px solid;
@include border-radius(5px);
Expand Down
7 changes: 0 additions & 7 deletions ide/Jetbrains/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions javascript/.eslintrc

This file was deleted.

File renamed without changes.
8 changes: 0 additions & 8 deletions javascript/.jscsrc

This file was deleted.

6 changes: 5 additions & 1 deletion source-control/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
br = branch --remote
cane = commit --amend --no-edit
ci = commit # Commit, which will open an editor for the commit message

# Delete every branch except the current branch, main, develop, master, root, and dev
cleanup = !git branch | grep -v $(git branch --show-current) | grep -v -E \"(main|develop|master|root|dev)\" | xargs git branch -D

cm = commit -m # Commit with inline message
cob = checkout -b # Create new branch and checkout
cot = checkout -t # Create remote branch and track locally
Expand All @@ -31,7 +35,7 @@
hist = log --graph --pretty=format:'%h %ad | %s%d [%an]' --date=short # Commit history with dates
last = log -1 HEAD # Display log for last commit
unstage = reset HEAD -- # Unstages changes

[user]
email = <your email here>
name = <your name here>
Expand Down
5 changes: 1 addition & 4 deletions source-control/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ npm-debug.log
node_modules

# JetBrains editor files.
/**/.idea
**/.idea

# Visual Studio
## Editor files
Expand Down Expand Up @@ -51,6 +51,3 @@ bld/
# SQL Server files
*.mdf
*.ldf

# js files
tsconfig.json
11 changes: 4 additions & 7 deletions source-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ See the following **[`.gitconfig`](/source-control/.gitconfig)** as a starting p

**[`.gitignore`](/source-control/.gitignore)** can be used to ignore common files such as IDE files. This global ignore file can be configured in the [`.gitconfig`](/source-control/.gitconfig) via

```
```ini
[core]
excludesfile = ~/.gitignore
```
Expand All @@ -19,11 +19,8 @@ The root directory of each repository should contain a `.gitignore` file that id

### Clients

- Command line - The majority of the team uses command line exclusively. We tend to leverage the aliases in the **[`.gitconfig`](/source-control/.gitconfig)** fairly heavily. Some common third party cleints used are **[`iTerm2`}(https://iterm2.com/)** and **[`Powershell`](https://learn.microsoft.com/en-us/powershell/?view=powershell-7.3)**.
- [Visual Studio Code](https://code.visualstudio.com)
- [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
- [Stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint)
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- Command line - The majority of the team uses command line through **[`iTerm2`}(https://iterm2.com/)** and **[`Powershell`](https://learn.microsoft.com/en-us/powershell/?view=powershell-7.3)**. We tend to leverage the aliases in the **[`.gitconfig`](/source-control/.gitconfig)** fairly heavily.
- [Visual Studio Code](https://code.visualstudio.com) - [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) extension

## Workflow

Expand All @@ -34,7 +31,7 @@ A new branch should be created for each issue/card. The feature branch should be
3. Push the feature branch to the remote prior to leaving for the day or creating a pull request: `$ git push origin 123-my-feature-branch-name-snake-case -u` (-u to set the upstream)
4. After PR approval use the "Squash and merge" button on Github, and then delete the remote branch. If you'd like to rebase/squash without the button you can do so via:

```
```sh
$ git puff origin main
$ git co 123-my-feature-branch-name-snake-case
$ git puff origin 123-my-feature-branch-name-snake-case
Expand Down

0 comments on commit 7bad6eb

Please sign in to comment.