Skip to content

Commit

Permalink
relint code
Browse files Browse the repository at this point in the history
  • Loading branch information
pavjacko committed Jun 27, 2023
1 parent 6b43897 commit c85f6b5
Show file tree
Hide file tree
Showing 343 changed files with 8,065 additions and 9,544 deletions.
146 changes: 73 additions & 73 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
## Description
## Description

- Describe the nature of the work / fix
- Describe the nature of the work / fix

## Breaking Changes

- PRs should not introduce breaking changes to existing functionality
- if breaking change cannot be avoided it has to be introduced in 2 phases (release cycles of 0.x.0)
- `0.x.0` Add new functionality + add `DEPRECATED` warning to existing fuctionality
- `0.[x+1].0` Remove deprecated functionality
## I have tested my changes on:
ReNative project directly:
* [ ] ios simulator
* [ ] ios device
* [ ] android simulator
* [ ] android device
* [ ] web browser
* [ ] tvos simulator
* [ ] tvos device
* [ ] androidtv simulator
* [ ] androidtv device
* [ ] androidwear simulator
* [ ] androidwear device
* [ ] tizen simulator
* [ ] tizen device
* [ ] tizenmobile simulator
* [ ] tizenwatch device
* [ ] webos simulator
* [ ] webos device
* [ ] macos
* [ ] windows
* [ ] chromecast device
- PRs should not introduce breaking changes to existing functionality
- if breaking change cannot be avoided it has to be introduced in 2 phases (release cycles of 0.x.0)
- `0.x.0` Add new functionality + add `DEPRECATED` warning to existing fuctionality
- `0.[x+1].0` Remove deprecated functionality

## I have tested my changes on:

ReNative project directly:

- [ ] ios simulator
- [ ] ios device
- [ ] android simulator
- [ ] android device
- [ ] web browser
- [ ] tvos simulator
- [ ] tvos device
- [ ] androidtv simulator
- [ ] androidtv device
- [ ] androidwear simulator
- [ ] androidwear device
- [ ] tizen simulator
- [ ] tizen device
- [ ] tizenmobile simulator
- [ ] tizenwatch device
- [ ] webos simulator
- [ ] webos device
- [ ] macos
- [ ] windows
- [ ] chromecast device

New project:
* [ ] ios simulator
* [ ] ios device
* [ ] android simulator
* [ ] android device
* [ ] web browser
* [ ] tvos simulator
* [ ] tvos device
* [ ] androidtv simulator
* [ ] androidtv device
* [ ] androidwear simulator
* [ ] androidwear device
* [ ] tizen simulator
* [ ] tizen device
* [ ] tizenmobile simulator
* [ ] tizenwatch device
* [ ] webos simulator
* [ ] webos device
* [ ] macos
* [ ] windows
* [ ] chromecast device

- [ ] ios simulator
- [ ] ios device
- [ ] android simulator
- [ ] android device
- [ ] web browser
- [ ] tvos simulator
- [ ] tvos device
- [ ] androidtv simulator
- [ ] androidtv device
- [ ] androidwear simulator
- [ ] androidwear device
- [ ] tizen simulator
- [ ] tizen device
- [ ] tizenmobile simulator
- [ ] tizenwatch device
- [ ] webos simulator
- [ ] webos device
- [ ] macos
- [ ] windows
- [ ] chromecast device

Existing Project created with previous version of renative:
* [ ] ios simulator
* [ ] ios device
* [ ] android simulator
* [ ] android device
* [ ] web browser
* [ ] tvos simulator
* [ ] tvos device
* [ ] androidtv simulator
* [ ] androidtv device
* [ ] androidwear simulator
* [ ] androidwear device
* [ ] tizen simulator
* [ ] tizen device
* [ ] tizenmobile simulator
* [ ] tizenwatch device
* [ ] webos simulator
* [ ] webos device
* [ ] macos
* [ ] windows
* [ ] chromecast device

- [ ] ios simulator
- [ ] ios device
- [ ] android simulator
- [ ] android device
- [ ] web browser
- [ ] tvos simulator
- [ ] tvos device
- [ ] androidtv simulator
- [ ] androidtv device
- [ ] androidwear simulator
- [ ] androidwear device
- [ ] tizen simulator
- [ ] tizen device
- [ ] tizenmobile simulator
- [ ] tizenwatch device
- [ ] webos simulator
- [ ] webos device
- [ ] macos
- [ ] windows
- [ ] chromecast device
27 changes: 13 additions & 14 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down Expand Up @@ -71,4 +71,3 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Thank you for your interest in contributing to ReNative! From commenting on and

The [Open Source Guides](https://opensource.guide/) website has a collection of resources for individuals, communities, and companies who want to learn how to run and contribute to an open source project. Contributors and people new to open source alike will find the following guides especially useful:

- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Building Welcoming Communities](https://opensource.guide/building-community/)
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Building Welcoming Communities](https://opensource.guide/building-community/)

### [Code of Conduct](CODE_OF_CONDUCT.md)

Expand Down Expand Up @@ -50,8 +50,8 @@ The process of proposing a change to ReNative SDK can be summarized as follows:
7. Push the changes to your fork.
8. Create a pull request to the ReNative repository.
9. Review and address comments on your pull request.
1. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code.
2. If changes are requested and addressed, please [request review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to notify reviewers to take another look.
1. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code.
2. If changes are requested and addressed, please [request review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to notify reviewers to take another look.

If all goes well, your pull request will be merged. If it is not merged, maintainers will do their best to explain the reason why.

Expand Down Expand Up @@ -81,6 +81,6 @@ Contributions to ReNative are not limited to GitHub. You can help others by shar

As you work on ReNative, it is natural that sooner or later you may require help. People interested in contributing may take advantage of the following:

- **Twitter**. The ReNative team has its own account at [@ReNative](https://twitter.com/ReNative). If you feel stuck, or need help contributing, please do not hesitate to reach out.
- **Proposals Repository**. If you are considering working on a feature large in scope, consider [creating a proposal first](https://github.com/flexn-io/renative/discussions). The community can help you figure out the right approach, and we'd be happy to help.
- **ReNative Community Slack**. While we try to hold most discussions in public, sometimes it can be beneficial to have conversations in real time with other contributors. People who have demonstrated a commitment to moving ReNative forward through sustained contributions to the project may eventually be invited to join the ReNative Community Slack.
- **Twitter**. The ReNative team has its own account at [@ReNative](https://twitter.com/ReNative). If you feel stuck, or need help contributing, please do not hesitate to reach out.
- **Proposals Repository**. If you are considering working on a feature large in scope, consider [creating a proposal first](https://github.com/flexn-io/renative/discussions). The community can help you figure out the right approach, and we'd be happy to help.
- **ReNative Community Slack**. While we try to hold most discussions in public, sometimes it can be beneficial to have conversations in real time with other contributors. People who have demonstrated a commitment to moving ReNative forward through sustained contributions to the project may eventually be invited to join the ReNative Community Slack.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ ReNative community can be found on <a aria-label="ReNative Discussions" href="ht

## Core Maintainers

- Pavel Jacko ([@pavjacko](https://twitter.com/pavjacko)) - https://github.com/pavjacko
- Mihai Blaga ([@blaga_mihai](https://twitter.com/blaga_mihai)) - https://github.com/mihaiblaga89
- Pavel Jacko ([@pavjacko](https://twitter.com/pavjacko)) - https://github.com/pavjacko
- Mihai Blaga ([@blaga_mihai](https://twitter.com/blaga_mihai)) - https://github.com/mihaiblaga89

## Contributors

Expand Down
3 changes: 1 addition & 2 deletions buildHooks/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ const hooks = {
await gitCommit(c);
await gitTag(c);
return true;
}
},
};

const pipes = {};


export { pipes, hooks };
80 changes: 24 additions & 56 deletions buildHooks/src/updateVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const VERSIONED_PACKAGES = [
const updateDeps = (pkgConfig, depKey, packageNamesAll, packageConfigs, semVer = '') => {
const { pkgFile, rnvFile } = pkgConfig;


packageNamesAll.forEach((v) => {
if (pkgFile) {
let hasChanges = false;
Expand Down Expand Up @@ -65,11 +64,9 @@ const updateDeps = (pkgConfig, depKey, packageNamesAll, packageConfigs, semVer =
};

export const updateVersions = async (c) => {
const rootPackage = FileUtils.readObjectSync(
path.join(c.paths.project.dir, 'package.json')
);
const rootPackage = FileUtils.readObjectSync(path.join(c.paths.project.dir, 'package.json'));
const v = {
version: rootPackage.version
version: rootPackage.version,
};
const pkgFolder = path.join(c.paths.project.dir, 'packages');
_updateJson(c, c.paths.project.package, v);
Expand All @@ -78,39 +75,24 @@ export const updateVersions = async (c) => {
_updateJson(c, path.join(pkgFolder, pkgName, 'package.json'), v);
});

_updateJson(
c,
path.join(
pkgFolder,
'rnv/pluginTemplates/renative.plugins.json'
),
{
pluginTemplates: {
'@rnv/renative': v
}
}
);

_updateJson(
c,
path.join(
pkgFolder,
'rnv/coreTemplateFiles/renative.templates.json'
),
{
engineTemplates: {
'@rnv/engine-rn': v,
'@rnv/engine-rn-tvos': v,
'@rnv/engine-rn-web': v,
'@rnv/engine-rn-next': v,
'@rnv/engine-rn-electron': v,
'@rnv/engine-lightning': v,
'@rnv/engine-rn-macos': v,
'@rnv/engine-rn-windows': v
},
}
);
_updateJson(c, path.join(pkgFolder, 'rnv/pluginTemplates/renative.plugins.json'), {
pluginTemplates: {
'@rnv/renative': v,
},
});

_updateJson(c, path.join(pkgFolder, 'rnv/coreTemplateFiles/renative.templates.json'), {
engineTemplates: {
'@rnv/engine-rn': v,
'@rnv/engine-rn-tvos': v,
'@rnv/engine-rn-web': v,
'@rnv/engine-rn-next': v,
'@rnv/engine-rn-electron': v,
'@rnv/engine-lightning': v,
'@rnv/engine-rn-macos': v,
'@rnv/engine-rn-windows': v,
},
});

const pkgDirPath = path.join(c.paths.project.dir, 'packages');
const dirs = fs.readdirSync(pkgDirPath);
Expand Down Expand Up @@ -142,7 +124,7 @@ export const updateVersions = async (c) => {
rnvPath,
pkgPath: _pkgPath,
pkgFile,
rnvFile
rnvFile,
};
packageNamesAll.push(pkgName);
};
Expand All @@ -161,22 +143,11 @@ export const updateVersions = async (c) => {
updateDeps(pkgConfig, 'peerDependencies', packageNamesAll, packageConfigs, '^');
});

FileUtils.copyFileSync(path.join(c.paths.project.dir, 'README.md'), path.join(pkgFolder, 'renative/README.md'));

FileUtils.copyFileSync(
path.join(c.paths.project.dir, 'README.md'),
path.join(pkgFolder, 'renative/README.md')
);

FileUtils.copyFileSync(
path.join(c.paths.project.dir, 'README.md'),
path.join(pkgFolder, 'renative/README.md')
);

FileUtils.copyFileSync(
path.join(c.paths.project.dir, 'README.md'),
path.join(pkgFolder, 'rnv/README.md')
);
FileUtils.copyFileSync(path.join(c.paths.project.dir, 'README.md'), path.join(pkgFolder, 'renative/README.md'));

FileUtils.copyFileSync(path.join(c.paths.project.dir, 'README.md'), path.join(pkgFolder, 'rnv/README.md'));

// const packagesDir = path.join(c.paths.project.dir, '..');
//
Expand All @@ -202,14 +173,11 @@ export const updateVersions = async (c) => {
return true;
};


const _updateJson = (c, pPath, updateObj) => {
const pObj = FileUtils.readObjectSync(pPath);

if (!pObj) {
throw new Error(
`_updateJson called with unresolveable package.json path '${pPath}'`
);
throw new Error(`_updateJson called with unresolveable package.json path '${pPath}'`);
}

let obj;
Expand Down
6 changes: 1 addition & 5 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"useWorkspaces": true,
"command": {
"bootstrap": {
"npmClientArgs": [
"--no-package-lock",
"--unsafe-perm=true",
"--no-optional"
]
"npmClientArgs": ["--no-package-lock", "--unsafe-perm=true", "--no-optional"]
}
}
}
Loading

0 comments on commit c85f6b5

Please sign in to comment.