Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/actions/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function getValidMergedPRs(commitMessages) {
return mergedPRs;
}

const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:master|main|version-|update-staging-from-main|update-production-from-staging))/);
const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/);
if (!_.isNull(match) && match[1]) {
mergedPRs.push(match[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function getValidMergedPRs(commitMessages) {
return mergedPRs;
}

const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:master|main|version-|update-staging-from-main|update-production-from-staging))/);
const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/);
if (!_.isNull(match) && match[1]) {
mergedPRs.push(match[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion .github/libs/GitUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function getValidMergedPRs(commitMessages) {
return mergedPRs;
}

const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:master|main|version-|update-staging-from-main|update-production-from-staging))/);
const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/);
if (!_.isNull(match) && match[1]) {
mergedPRs.push(match[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/verifyActions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ EXIT_CODE -eq 0 ]]; then
echo -e "${GREEN}Github Actions are up to date!${NC}"
exit 0
else
echo -e "${RED}Error: Diff found when Github Actions were rebuilt. Did you forget to run \`npm run gh-actions-build\`? Do you need to merge master?${NC}"
echo -e "${RED}Error: Diff found when Github Actions were rebuilt. Did you forget to run \`npm run gh-actions-build\`? Do you need to merge main?${NC}"
echo "$DIFF_OUTPUT" | $LIB_PATH/diff-so-fancy | less --tabs=4 -RFX
exit 1
fi
8 changes: 4 additions & 4 deletions STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ For almost all of our code style rules, refer to the [Airbnb JavaScript Style Gu

When writing ES6 or React code, please also refer to the [Airbnb React/JSX Style Guide](https://github.com/airbnb/javascript/tree/master/react).

There are a few things that we have customized for our tastes which will take presidence over Airbnb's guide.
There are a few things that we have customized for our tastes which will take precedence over Airbnb's guide.

## Functions
- Always wrap the function expression for immediately-invoked function expressions (IIFE) in parens:
Expand Down Expand Up @@ -41,7 +41,7 @@ There are a few things that we have customized for our tastes which will take pr
}
```

- Place 1 space before the function keyword and the opening paren for anonymous functions. This does not count for named functions.
- Place 1 space before the function keyword and the opening parent for anonymous functions. This does not count for named functions.

```javascript
// Bad
Expand Down Expand Up @@ -329,7 +329,7 @@ export {
## Classes and constructors

#### Class syntax
Using the `class` syntax is preferred wherever appropriate. Airbnb has clear [guidelines](https://github.com/airbnb/javascript#classes--constructors) in their JS styleguide which promotes using the _class_ syntax. Dont manipulate the `prototype` directly. The `class` syntax is generally considered more concise and easier to understand.
Using the `class` syntax is preferred wherever appropriate. Airbnb has clear [guidelines](https://github.com/airbnb/javascript#classes--constructors) in their JS style guide which promotes using the _class_ syntax. Don't manipulate the `prototype` directly. The `class` syntax is generally considered more concise and easier to understand.

#### Constructor
Classes have a default constructor if one is not specified. No need to write a constructor function that is empty or just delegates to a parent class.
Expand Down Expand Up @@ -562,7 +562,7 @@ class SomeComponent {
}
```

## Inline Ternarys
## Inline Ternaries
* Use inline ternary statements when rendering optional pieces of templates. Notice the white space and formatting of the ternary.

```javascript
Expand Down
1 change: 0 additions & 1 deletion tests/unit/GitUtilsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const data = [
'Merge pull request #1563 from Expensify/version-bump-e6498075e301df3e9c8d7866ea391a23c19ed9b0',
'Update version to 1.0.1-470',
'[IS-1500] Updated textalignInput utility',
'Merge pull request #1 from Expensify/master',
'Merge pull request #2 from Expensify/main',
'fix: set pdf width on large screens',
],
Expand Down