Skip to content

Commit

Permalink
Add spellcheck (#67)
Browse files Browse the repository at this point in the history
* Add spellcheck
* Prepare version
* Update readme
  • Loading branch information
idastambuk authored Oct 27, 2023
1 parent 32ed9c3 commit 57b9903
Show file tree
Hide file tree
Showing 8 changed files with 651 additions and 16 deletions.
11 changes: 9 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ steps:
- mkdir ci
- yarn install --frozen-lockfile --no-progress
- rm -rf node_modules/@grafana/data/node_modules

- name: spellcheck
image: grafana/grafana-plugin-ci:1.9.5
commands:
- . ~/.init-nvm.sh
- yarn run spellcheck
depends_on:
- initialize
- name: build-and-test-frontend
image: grafana/grafana-plugin-ci:1.9.5
commands:
Expand All @@ -30,9 +36,10 @@ steps:
- yarn test:ci
depends_on:
- initialize
- spellcheck

---
kind: signature
hmac: 16f1768e2d0075f7fb84f8766c2995371afe84ffbc15d06e90dfa7f8ed8ff97d
hmac: e3f399d799348ebebae40890fd1bf5845b884579354ca2e5d37e2851440dbf06

...
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.


## v0.3.1

- Add spellcheck script and drone step in [#67](https://github.com/grafana/grafana-aws-sdk-react/pull/67)

## v0.3.0

- Migrate aws sdk react components to the new form styling under feature flag awsDatasourcesNewFormStyling in [#62](https://github.com/grafana/grafana-aws-sdk-react/pull/62)
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ see the ./src folder

## Drone configuration

Drone signs the Drone configuration file. This needs to be run everytime the drone.yml file is modified. See https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md for more info.
Drone signs the Drone configuration file. This needs to be run every time the drone.yml file is modified. See https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md for more info.

To update the drone file run (note that you need to export your `DRONE_TOKEN` before):
### Update drone build

If you have not installed drone CLI follow [these instructions](https://docs.drone.io/cli/install/)

To sign the `.drone.yml` file:

```bash
# Get your drone token from https://drone.grafana.net/account
export DRONE_TOKEN=<Your DRONE_TOKEN>

```
drone --server https://drone.grafana.net sign --save grafana/grafana-aws-sdk-react
```
20 changes: 20 additions & 0 deletions cspell.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ignorePaths": [
".github/**",
"node_modules/**",
"dist/**",
"yarn.lock"
],
"words": [
"SIGV",
"isob",
"Creds",
"CREDS",
"opensearch",
"esbuild",
"testid",
"Datasources",
"Datasource",
"typecheck"
]
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grafana/aws-sdk",
"version": "0.3.0",
"version": "0.3.1",
"description": "Common AWS features for grafana",
"main": "dist/index.js",
"module": "dist/esm/index.js",
Expand All @@ -13,7 +13,8 @@
"build": "yarn clean && yarn typecheck && yarn bundle",
"bundle": "rollup -c rollup.config.ts",
"clean": "rimraf ./dist ./compiled",
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx ./src",
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx ./src && spellcheck",
"spellcheck": "cspell -c cspell.config.json \"**/*.{ts,tsx,js,go,md,mdx,yml,yaml,json,scss,css}\"",
"typecheck": "tsc -p ./tsconfig.build.json",
"test": "jest --notify --watch",
"test:coverage": "jest --coverage",
Expand Down Expand Up @@ -46,6 +47,7 @@
"@types/react": "17.0.42",
"@types/react-dom": "17.0.14",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"cspell": "6.13.3",
"esbuild": "^0.16.2",
"eslint": "^8.49.0",
"eslint-plugin-jsdoc": "^46.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/sql/QueryEditor/FormatSelect.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('FormatSelect', () => {
render(<FormatSelect {...props} />);
expect(screen.getByText('Table')).toBeInTheDocument();

const selectEl = screen.getByLabelText(props.newFormStylingEnabled ? 'Format dataframes as' : 'Format as');
const selectEl = screen.getByLabelText(props.newFormStylingEnabled ? 'Format data frames as' : 'Format as');
expect(selectEl).toBeInTheDocument();
await select(selectEl, 'Time Series', { container: document.body });

Expand Down
2 changes: 1 addition & 1 deletion src/sql/QueryEditor/FormatSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function FormatSelect<TQuery extends DataQuery & Record<string, any>, For
<>
{props.newFormStylingEnabled ? (
<Select
aria-label="Format dataframes as"
aria-label="Format data frames as"
id={props.id ?? 'formatAs'}
options={props.options}
value={props.query.format}
Expand Down
Loading

0 comments on commit 57b9903

Please sign in to comment.