Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Spellcheck #84

Closed
svennergr opened this issue Nov 7, 2022 · 1 comment
Closed

Add Spellcheck #84

svennergr opened this issue Nov 7, 2022 · 1 comment
Assignees

Comments

@svennergr
Copy link
Contributor

Reason to implement spellcheck

Grafana Plugins are built with a Drone pipeline. A step was added to that pipeline, that datasources should comply with a "spellcheck". In order to not break builds with the OpenSearch datasource, spellchecks need to be added to the main and v1.2.x branch of OpenSearch.

Steps to implement spellcheck

Your pipelines will fail if it can't find cspell.config.json in your plugin repo. So add one as described in https://github.com/grafana/grafana-drone-extension/pull/189 or follow the following steps.

  1. yarn add -D cspell@6.13.3 to install cspell local to your repo
  2. Add "spellcheck": "cspell -c cspell.config.json \"**/*.{ts,tsx,js,go,md,mdx,yml,yaml,json,scss,css}\"" to package.json scripts section
  3. echo '{ "ignorePaths": ["node_modules/**","dist/**"], "words":["grafana","datasource","datasources"]}' > cspell.config.json to create a cspell.config.json file
  4. Run yarn spellcheck to see if any errors
  5. If errors found, either fix them or add to ignorePaths or words section of the cspell.config.json

Sample PR to add spellcheck to your repo : https://github.com/grafana/athena-datasource/pull/185/files

@gwdawson
Copy link
Member

gwdawson commented Nov 9, 2022

Added to main and backported to v1.2.x

@gwdawson gwdawson closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants