From 57b990399ca9f1b3993c9f08e2d58a76a7f275cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ida=20=C5=A0tambuk?= Date: Fri, 27 Oct 2023 12:43:43 +0200 Subject: [PATCH] Add spellcheck (#67) * Add spellcheck * Prepare version * Update readme --- .drone.yml | 11 +- CHANGELOG.md | 5 + README.md | 13 +- cspell.config.json | 20 + package.json | 6 +- src/sql/QueryEditor/FormatSelect.test.tsx | 2 +- src/sql/QueryEditor/FormatSelect.tsx | 2 +- yarn.lock | 608 +++++++++++++++++++++- 8 files changed, 651 insertions(+), 16 deletions(-) create mode 100644 cspell.config.json diff --git a/.drone.yml b/.drone.yml index 7fcfda5..1068dea 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: @@ -30,9 +36,10 @@ steps: - yarn test:ci depends_on: - initialize + - spellcheck --- kind: signature -hmac: 16f1768e2d0075f7fb84f8766c2995371afe84ffbc15d06e90dfa7f8ed8ff97d +hmac: e3f399d799348ebebae40890fd1bf5845b884579354ca2e5d37e2851440dbf06 ... diff --git a/CHANGELOG.md b/CHANGELOG.md index 08c4e52..0a58423 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index fd99fa0..1bfed07 100644 --- a/README.md +++ b/README.md @@ -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= -``` drone --server https://drone.grafana.net sign --save grafana/grafana-aws-sdk-react ``` diff --git a/cspell.config.json b/cspell.config.json new file mode 100644 index 0000000..3f1b1cf --- /dev/null +++ b/cspell.config.json @@ -0,0 +1,20 @@ +{ + "ignorePaths": [ + ".github/**", + "node_modules/**", + "dist/**", + "yarn.lock" + ], + "words": [ + "SIGV", + "isob", + "Creds", + "CREDS", + "opensearch", + "esbuild", + "testid", + "Datasources", + "Datasource", + "typecheck" + ] +} diff --git a/package.json b/package.json index dc0c83c..3e18bdc 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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", diff --git a/src/sql/QueryEditor/FormatSelect.test.tsx b/src/sql/QueryEditor/FormatSelect.test.tsx index 7cd5c7d..19462a9 100644 --- a/src/sql/QueryEditor/FormatSelect.test.tsx +++ b/src/sql/QueryEditor/FormatSelect.test.tsx @@ -30,7 +30,7 @@ describe('FormatSelect', () => { render(); 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 }); diff --git a/src/sql/QueryEditor/FormatSelect.tsx b/src/sql/QueryEditor/FormatSelect.tsx index 253fc1f..8813748 100644 --- a/src/sql/QueryEditor/FormatSelect.tsx +++ b/src/sql/QueryEditor/FormatSelect.tsx @@ -25,7 +25,7 @@ export function FormatSelect, For <> {props.newFormStylingEnabled ? (