Skip to content

Commit 652b77e

Browse files
authored
add cspell (#49)
1 parent 33af35b commit 652b77e

File tree

7 files changed

+639
-104
lines changed

7 files changed

+639
-104
lines changed

README.md

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -85,52 +85,3 @@ Read more about it here:
8585

8686
yarn run lint:fix
8787
```
88-
89-
90-
# Distributing your plugin
91-
92-
When distributing a Grafana plugin either within the community or privately the plugin must be signed so the Grafana application can verify its authenticity. This can be done with the `@grafana/sign-plugin` package.
93-
94-
_Note: It's not necessary to sign a plugin during development. The docker development environment that is scaffolded with `@grafana/create-plugin` caters for running the plugin without a signature._
95-
96-
## Initial steps
97-
98-
Before signing a plugin please read the Grafana [plugin publishing and signing criteria](https://grafana.com/docs/grafana/latest/developers/plugins/publishing-and-signing-criteria/) documentation carefully.
99-
100-
`@grafana/create-plugin` has added the necessary commands and workflows to make signing and distributing a plugin via the grafana plugins catalog as straightforward as possible.
101-
102-
Before signing a plugin for the first time please consult the Grafana [plugin signature levels](https://grafana.com/docs/grafana/latest/developers/plugins/sign-a-plugin/#plugin-signature-levels) documentation to understand the differences between the types of signature level.
103-
104-
1. Create a [Grafana Cloud account](https://grafana.com/signup).
105-
2. Make sure that the first part of the plugin ID matches the slug of your Grafana Cloud account.
106-
- _You can find the plugin ID in the `plugin.json` file inside your plugin directory. For example, if your account slug is `acmecorp`, you need to prefix the plugin ID with `acmecorp-`._
107-
3. Create a Grafana Cloud API key with the `PluginPublisher` role.
108-
4. Keep a record of this API key as it will be required for signing a plugin
109-
110-
## Signing a plugin
111-
112-
### Using Github actions release workflow
113-
114-
If the plugin is using the github actions supplied with `@grafana/create-plugin` signing a plugin is included out of the box. The [release workflow](./.github/workflows/release.yml) can prepare everything to make submitting your plugin to Grafana as easy as possible. Before being able to sign the plugin however a secret needs adding to the Github repository.
115-
116-
1. Please navigate to "settings > secrets > actions" within your repo to create secrets.
117-
2. Click "New repository secret"
118-
3. Name the secret "GRAFANA_API_KEY"
119-
4. Paste your Grafana Cloud API key in the Secret field
120-
5. Click "Add secret"
121-
122-
#### Push a version tag
123-
124-
To trigger the workflow we need to push a version tag to github. This can be achieved with the following steps:
125-
126-
1. Run `npm version <major|minor|patch>`
127-
2. Run `git push origin main --follow-tags`
128-
129-
130-
## Learn more
131-
132-
Below you can find source code for existing app plugins and other related documentation.
133-
134-
- [Basic data source plugin example](https://github.com/grafana/grafana-plugin-examples/tree/master/examples/datasource-basic#readme)
135-
- [`plugin.json` documentation](https://grafana.com/developers/plugin-tools/reference-plugin-json)
136-
- [How to sign a plugin?](https://grafana.com/docs/grafana/latest/developers/plugins/sign-a-plugin/)

cspell.config.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"ignorePaths": [
3+
".config/**",
4+
".github/**",
5+
".vscode/**",
6+
"coverage/**",
7+
"cspell.config.json",
8+
"e2e/**",
9+
"playwright/**",
10+
"dist/**",
11+
"docker-compose*.yaml",
12+
"docker-compose*.yml",
13+
"go.sum",
14+
"mage_output_file.go",
15+
"node_modules/**",
16+
"package.json",
17+
"pkg/**/*_test.go",
18+
"pkg/**/*.html",
19+
"pkg/**/*.json",
20+
"pkg/**/*.jsonc",
21+
"pkg/testdata/**",
22+
"prometheus/**",
23+
"provisioning/**",
24+
"src/dashboards/**",
25+
"yarn.lock"
26+
],
27+
"ignoreRegExpList": [
28+
"import\\s*\\((.|[\r\n])*?\\)",
29+
"import\\s*.*\".*?\""
30+
],
31+
"words": [
32+
"grafana",
33+
"datasource",
34+
"datasources",
35+
"prometheusamazon",
36+
"tsdb",
37+
"promlib",
38+
"instancemgmt",
39+
"plog",
40+
"sdkhttpclient",
41+
"sigv",
42+
"SIGV",
43+
"awsds",
44+
"httpss",
45+
"Mwdhmsy"
46+
]
47+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
1313
"lint:fix": "yarn run lint --fix",
1414
"server:configured": "GRAFANA_VERSION=10.4.1 GRAFANA_IMAGE=grafana-enterprise docker-compose up -d",
15-
"sign": "npx --yes @grafana/sign-plugin@latest --rootUrls https://github.com/grafana/prometheus-amazon"
15+
"sign": "npx --yes @grafana/sign-plugin@latest --rootUrls https://github.com/grafana/prometheus-amazon",
16+
"spellcheck": "cspell -c cspell.config.json \"**/*.{ts,tsx,js,go,md,mdx,yml,yaml,json,scss,css}\""
1617
},
1718
"author": "Grafana Labs",
1819
"license": "Apache-2.0",
@@ -43,6 +44,7 @@
4344
"@typescript-eslint/eslint-plugin": "6.21.0",
4445
"@typescript-eslint/parser": "6.21.0",
4546
"copy-webpack-plugin": "12.0.2",
47+
"cspell": "6.13.3",
4648
"css-loader": "6.10.0",
4749
"eslint": "8.56.0",
4850
"eslint-config-prettier": "9.1.0",

playwright.config.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -55,47 +55,4 @@ export default defineConfig({
5555
dependencies: ['auth'],
5656
}
5757
],
58-
// projects: [
59-
// {
60-
// name: 'chromium',
61-
// use: { ...devices['Desktop Chrome'] },
62-
// },
63-
64-
// {
65-
// name: 'firefox',
66-
// use: { ...devices['Desktop Firefox'] },
67-
// },
68-
69-
// {
70-
// name: 'webkit',
71-
// use: { ...devices['Desktop Safari'] },
72-
// },
73-
74-
/* Test against mobile viewports. */
75-
// {
76-
// name: 'Mobile Chrome',
77-
// use: { ...devices['Pixel 5'] },
78-
// },
79-
// {
80-
// name: 'Mobile Safari',
81-
// use: { ...devices['iPhone 12'] },
82-
// },
83-
84-
/* Test against branded browsers. */
85-
// {
86-
// name: 'Microsoft Edge',
87-
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
88-
// },
89-
// {
90-
// name: 'Google Chrome',
91-
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
92-
// },
93-
// ],
94-
95-
/* Run your local dev server before starting the tests */
96-
// webServer: {
97-
// command: 'npm run start',
98-
// url: 'http://127.0.0.1:3000',
99-
// reuseExistingServer: !process.env.CI,
100-
// },
10158
});

src/configuration/ConfigEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { config } from '@grafana/runtime';
77
import { Alert, FieldValidationMessage, useTheme2 } from '@grafana/ui';
88
import React from 'react';
99

10-
import { DataSourcehttpSettingsOverhaul } from './DataSourceHttpSettingsOverhaul';
10+
import { DataSourceHttpSettingsOverhaul } from './DataSourceHttpSettingsOverhaul';
1111

1212
export const PROM_CONFIG_LABEL_WIDTH = 30;
1313

@@ -30,7 +30,7 @@ export const ConfigEditor = (props: Props) => {
3030
docsLink="https://grafana.com/docs/grafana/latest/datasources/prometheus/configure-prometheus-data-source/"
3131
/>
3232
<hr className={`${styles.hrTopSpace} ${styles.hrBottomSpace}`} />
33-
<DataSourcehttpSettingsOverhaul
33+
<DataSourceHttpSettingsOverhaul
3434
options={options}
3535
onOptionsChange={onOptionsChange}
3636
renderSigV4Editor={<SIGV4ConnectionConfig inExperimentalAuthComponent={true} {...props}></SIGV4ConnectionConfig>}
@@ -131,7 +131,7 @@ export function overhaulStyles(theme: GrafanaTheme2) {
131131
font-weight: 400;
132132
`,
133133
container: css`
134-
maxwidth: 578;
134+
maxWidth: 578;
135135
`,
136136
};
137137
}

src/configuration/DataSourceHttpSettingsOverhaul.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Props = {
1111
secureSocksDSProxyEnabled: boolean;
1212
};
1313

14-
export const DataSourcehttpSettingsOverhaul = (props: Props) => {
14+
export const DataSourceHttpSettingsOverhaul = (props: Props) => {
1515
const {
1616
options,
1717
onOptionsChange,

0 commit comments

Comments
 (0)