Skip to content

Commit 6608f5a

Browse files
docs: update filename guidelines (TheAlgorithms#77)
* Formatting filenames d6c39ae * docs: update filename guidelines The directory workflow won't work with the current filename guidelines, and thus will generate a bad-formatted file. * Update DIRECTORY.md Co-authored-by: autoprettier <[email protected]>
1 parent d6c39ae commit 6608f5a

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ should add unique value.
5656

5757
#### File Naming Convention
5858

59-
- Filenames should use the UpperCamelCase (PascalCase) style.
59+
- Filenames should use the snake_case style. This is needed for our workflows to work correctly.
6060
- There should be no spaces in filenames.
61-
- **Example:** `UserProfile.ts` is allowed. Do not use `userprofile.ts`, `Userprofile.ts`, `user-Profile.ts`, `userProfile.ts`; these naming conventions are discouraged.
61+
- **Example:** `user_profile.ts` is allowed. Do not use `userprofile.ts`, `Userprofile.ts`, `user-Profile.ts`, `userProfile.ts`, `UserProfile.ts`; these naming conventions are discouraged.
6262

6363
#### Commit Messages Formatting
6464

DIRECTORY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
* [Is Even](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/is_even.ts)
2525
* [Is Leap Year](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/is_leap_year.ts)
2626
* [Is Odd](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/is_odd.ts)
27+
* [Lowest Common Multiple](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/lowest_common_multiple.ts)
2728
* [Perfect Square](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/perfect_square.ts)
2829
* [Radians To Degrees](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/radians_to_degrees.ts)
2930
* [Sieve Of Eratosthenes](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/sieve_of_eratosthenes.ts)
3031

3132
## Search
3233
* [Binary Search](https://github.com/TheAlgorithms/TypeScript/blob/master/search/binary_search.ts)
34+
* [Linear Search](https://github.com/TheAlgorithms/TypeScript/blob/master/search/linear_search.ts)
3335

3436
## Sorts
3537
* [Bubble Sort](https://github.com/TheAlgorithms/TypeScript/blob/master/sorts/bubble_sort.ts)

Maths/LowestCommonMultiple.ts renamed to maths/lowest_common_multiple.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @example LowestCommonMultiple(5, 8, 3) = 120
1010
*/
1111

12-
import { greatestCommonFactor } from "./GreatestCommonFactor";
12+
import { greatestCommonFactor } from "./greatest_common_factor";
1313

1414
//A naive solution which requires no additional mathematical algorithm
1515

Maths/test/LowestCommonMultiple.test.ts renamed to maths/test/lowest_common_multiple.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { binaryLCM, lowestCommonMultiple, naiveLCM } from "../LowestCommonMultiple";
1+
import { binaryLCM, lowestCommonMultiple, naiveLCM } from "../lowest_common_multiple";
22

33
describe("naiveLCM", () => {
44
test.each([[[3, 4], 12], [[8, 6], 24], [[5, 8, 3], 120], [[0.8, 0.4], 0.8]])(
File renamed without changes.

Search/test/LinearSearch.test.ts renamed to search/test/linear_search.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { linearSearch } from "../LinearSearch";
1+
import { linearSearch } from "../linear_search";
22

33
describe("Linear search", () => {
44
test.each([

0 commit comments

Comments
 (0)