Skip to content

Commit

Permalink
Merge pull request #1640 from oasisprotocol/mz/release/markdownlint
Browse files Browse the repository at this point in the history
Setup markdownlint
  • Loading branch information
buberdds authored Sep 7, 2023
2 parents a051d40 + 57942cc commit 335c9a1
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 42 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
python -m pip install gitlint
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint documentation
run: |
yarn lint-docs
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Lint git commits
run: |
yarn lint-git
Expand Down
22 changes: 22 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# markdownlint configuration.

# For more information, see:
# https://github.com/DavidAnson/markdownlint#optionsconfig.

# Enable all rules.
default: true

line-length:
# Line length checking is not strict by default.
strict: true
line_length: 80
# Allow longer lines for code blocks.
code_block_line_length: 100

# Do not always require language specifiers with fenced code blocks since they
# are not part of the Markdown spec.
fenced-code-language: false

# Allow <details> and <section> HTML elements
no-inline-html:
allowed_elements: ['details', 'summary']
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
[![CI build status][github-ci-build-badge]][github-ci-build-link]
[![CI test status][github-ci-test-badge]][github-ci-test-link]
[![CI lint status][github-ci-lint-badge]][github-ci-lint-link]
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![codecov](https://codecov.io/gh/oasisprotocol/oasis-wallet-web/branch/master/graph/badge.svg)](https://codecov.io/gh/oasisprotocol/oasis-wallet-web)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
[![License][license-badge]][license-link]
[![codecov][codecov-badge]][codecov-link]
[![Renovate enabled][github-renovate-badge]][github-renovate-link]

> :warning: **NEVER use the private keys and mnemonics given as example in this repository.**
> :warning: **NEVER use the private keys and mnemonics given as examples
> in this repository.**
<img src="docs/images/demo.gif">
![Demo](docs/images/demo.gif)

- [Oasis Wallet](#oasis-wallet)
- [Features](#features)
- [Getting started](#getting-started)
- [Installing and running oasis-wallet](#installing-and-running-oasis-wallet)
- [Installing and running oasis-wallet][install-link]
- [Test accounts](#test-accounts)
- [Architecture](#architecture)
- [Contributing & development](#contributing--development)
- [Running the tests](#running-the-tests)
- [Code style](#code-style)
- [Internationalization](#internationalization)
- [License](#license)

## Deploys

Expand Down Expand Up @@ -185,8 +185,8 @@ _"i18n: Update translations from Transifex"_.
Adding a new language:

1. first add it to Transifex and translate the strings,
2. create a folder with the new language code in `src/locales` and download the
translation file there,
2. create a folder with the new language code in `src/locales`
and download the translation file there,
3. add the new language to the [list of resources][i18n.ts]

## Preparing a Release
Expand Down Expand Up @@ -216,3 +216,10 @@ Adding a new language:
[github-ci-test-link]: https://github.com/oasisprotocol/oasis-wallet-web/actions?query=workflow:ci-test+branch:master
[github-ci-lint-badge]: https://github.com/oasisprotocol/oasis-wallet-web/actions/workflows/ci-lint.yml/badge.svg
[github-ci-lint-link]: https://github.com/oasisprotocol/oasis-wallet-web/actions?query=workflow:ci-lint+branch:master
[github-renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg
[github-renovate-link]: https://www.mend.io/renovate/
[license-badge]: https://img.shields.io/badge/License-Apache%202.0-blue.svg
[license-link]: https://opensource.org/licenses/Apache-2.0
[codecov-badge]: https://codecov.io/gh/oasisprotocol/oasis-wallet-web/branch/master/graph/badge.svg
[codecov-link]: https://codecov.io/gh/oasisprotocol/oasis-wallet-web
[install-link]: #installing-and-running-oasis-wallet
5 changes: 3 additions & 2 deletions docker/oasis-node/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Configuration

There are 3 different possible setups
There are 3 different possible setups:

- Mainnet: the live ROSE network
- Testnet: the live oasis testnet
- Local: A single-node validator with some known addresses that already have a certain balance hardcoded in the genesis
- Local: A single-node validator with some known addresses
that already have a certain balance hardcoded in the genesis
9 changes: 6 additions & 3 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
## Web wallet

Staging:

- checkout `master` branch
- `yarn install --frozen-lockfile && yarn build`
- deploy to <https://wallet.stg.oasis.io/>

Production:

- ensure <https://wallet.stg.oasis.io/> works
- especially features related to changes
- look at CSP errors (expect one error: blocked `eval` in `inquire`)
Expand All @@ -18,9 +20,11 @@ Production:

### Deploy

Manually deploy `./build/` folder by following <https://github.com/oasisprotocol/oasis-wallet-web/wiki/Deployment-on-AWS>.
Manually deploy `./build/` folder by following
<https://github.com/oasisprotocol/oasis-wallet-web/wiki/Deployment-on-AWS>.

Verify deployed version by opening the page in incognito (no cache) - it is displayed in the footer.
Verify deployed version by opening the page in
incognito (no cache) - it is displayed in the footer.

Update Content-Security-Policy and Permissions-Policy headers.

Expand All @@ -30,7 +34,6 @@ curl --head https://wallet.stg.oasis.io/ -s | grep "content-security-policy\|per
curl --head https://wallet.oasis.io/ -s | grep "content-security-policy\|permissions-policy"
```


## TODO: Extension wallet

- Update version in `manifest.json`
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"lint:fix": "yarn run lint --fix",
"lint:css": "stylelint src/**/*.css",
"lint-git": "node ./internals/scripts/gitlint.js",
"lint-docs": "markdownlint --ignore '**/node_modules/**' '**/*.md'",
"extract-messages": "rm src/locales/en/translation.json && i18next-scanner --config=internals/extractMessages/i18next-scanner.config.js",
"fix-grommet-icons-types": "node ./internals/scripts/fix-grommet-icons-types.js",
"print-extension-dev-csp": "node ./internals/scripts/print-extension-dev-csp.js"
Expand Down Expand Up @@ -129,6 +130,7 @@
"jest-environment-jsdom": "29.6.4",
"jest-styled-components": "7.1.1",
"jest-when": "3.6.0",
"markdownlint-cli": "0.36.0",
"parcel": "2.9.3",
"parcel-transformer-env-variables-injection": "0.1.2",
"prettier": "3.0.3",
Expand Down
39 changes: 26 additions & 13 deletions src/vendors/explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,35 @@ To update the bindings:

1. Download a fresh version of swagger.yml:

```sh
wget "https://raw.githubusercontent.com/everstake/oasis-explorer/master/swagger/swagger.yml"
```
```sh
wget "https://raw.githubusercontent.com/everstake/oasis-explorer/master/swagger/swagger.yml"
```

2. Generate the bindings:

```sh
npx @openapitools/openapi-generator-cli generate -i swagger.yml -g typescript-fetch -o . --additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
```
or
```sh
docker run --rm --user "${UID}:${GID}" -v ${PWD}:/local --workdir /local openapitools/openapi-generator-cli:v5.1.0 generate -i swagger.yml -g typescript-fetch -o . --additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
```
```sh
npx @openapitools/openapi-generator-cli generate \
-i swagger.yml \
-g typescript-fetch \
-o . \
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
```

or

```sh
docker run --rm --user "${UID}:${GID}" \
-v ${PWD}:/local \
--workdir /local \
openapitools/openapi-generator-cli:v5.1.0 generate \
-i swagger.yml \
-g typescript-fetch \
-o . \
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
```

3. Lint:

```sh
yarn lint:fix
```
```sh
yarn lint:fix
```
2 changes: 2 additions & 0 deletions src/vendors/oasisscan/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Oasis Scan

See [../explorer/README.md](../explorer/README.md)
Loading

0 comments on commit 335c9a1

Please sign in to comment.