@grafana/create-plugin 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v6.1.0 (Wed Oct 08 2025)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Create Plugin: Scaffold plugins with eslint 9 [#2204](https://github.com/grafana/plugin-tools/pull/2204) ([@jackw](https://github.com/jackw))
6
+
7
+ #### Authors: 1
8
+
9
+ - Jack Westbrook ([@jackw](https://github.com/jackw))
10
+
11
+ ---
12
+
1
13
  # v6.0.0 (Tue Oct 07 2025)
2
14
 
3
15
  #### 💥 Breaking Change
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -61,5 +61,5 @@
61
61
  "engines": {
62
62
  "node": ">=20"
63
63
  },
64
- "gitHead": "f6eb69cdf455ccf507b8851972e6a904f9ea3001"
64
+ "gitHead": "bf4fab03883b77dc39434d946ce1e34ed2093297"
65
65
  }
@@ -8,7 +8,7 @@ describe('Utils/Files', () => {
8
8
  filterOutCommonFiles(
9
9
  [
10
10
  // Common template files
11
- `${TEMPLATE_PATHS.common}/.config/.eslintrc`,
11
+ `${TEMPLATE_PATHS.common}/.config/eslint.config.mjs`,
12
12
  `${TEMPLATE_PATHS.common}/.config/.gitignore`,
13
13
  `${TEMPLATE_PATHS.common}/.config/package.json`,
14
14
 
@@ -21,7 +21,7 @@ describe('Utils/Files', () => {
21
21
  PLUGIN_TYPES.app
22
22
  )
23
23
  ).toEqual([
24
- `${TEMPLATE_PATHS.common}/.config/.eslintrc`,
24
+ `${TEMPLATE_PATHS.common}/.config/eslint.config.mjs`,
25
25
  `${TEMPLATE_PATHS.common}/.config/.gitignore`,
26
26
  `${TEMPLATE_PATHS.app}/.config/package.json`,
27
27
  `${TEMPLATE_PATHS.app}/.config/README.md`,
@@ -13,19 +13,29 @@ to issues around working with the project.
13
13
 
14
14
  ### Extending the ESLint config
15
15
 
16
- Edit the `.eslintrc` file in the project root in order to extend the ESLint configuration.
16
+ Edit the `eslint.config.mjs` file in the project root to extend the ESLint configuration. The following example disables deprecation notices for source files.
17
17
 
18
18
  **Example:**
19
19
 
20
- ```json
21
- {
22
- "extends": "./.config/.eslintrc",
23
- "rules": {
24
- "react/prop-types": "off"
25
- }
26
- }
20
+ ```javascript
21
+ import { defineConfig } from 'eslint/config';
22
+ import baseConfig from './.config/eslint.config.mjs';
23
+
24
+ export default defineConfig([
25
+ {
26
+ ignores: [
27
+ //...
28
+ ],
29
+ },
30
+ ...baseConfig,
31
+ {
32
+ files: ['src/**/*.{ts,tsx}'],
33
+ rules: {
34
+ '@typescript-eslint/no-deprecated': 'off',
35
+ },
36
+ },
37
+ ]);
27
38
  ```
28
-
29
39
  ---
30
40
 
31
41
  ### Extending the Prettier config
@@ -0,0 +1,38 @@
1
+ /*
2
+ * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
3
+ *
4
+ * In order to extend the configuration follow the steps in
5
+ * https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-eslint-config
6
+ */
7
+
8
+ import { defineConfig } from 'eslint/config';
9
+ import grafanaConfig from '@grafana/eslint-config/flat.js';
10
+
11
+ export default defineConfig([
12
+ ...grafanaConfig,
13
+ {
14
+ rules: {
15
+ 'react/prop-types': 'off',
16
+ },
17
+ },
18
+ {
19
+ files: ['src/**/*.{ts,tsx}'],
20
+
21
+ languageOptions: {
22
+ parserOptions: {
23
+ project: './tsconfig.json',
24
+ },
25
+ },
26
+
27
+ rules: {
28
+ '@typescript-eslint/no-deprecated': 'warn',
29
+ },
30
+ },
31
+ {
32
+ files: ['./tests/**/*'],
33
+
34
+ rules: {
35
+ 'react-hooks/rules-of-hooks': 'off',
36
+ },
37
+ },
38
+ ]);
@@ -7,7 +7,7 @@
7
7
  "test": "jest --watch --onlyChanged",
8
8
  "test:ci": "jest --passWithNoTests --maxWorkers 4",
9
9
  "typecheck": "tsc --noEmit",
10
- "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
10
+ "lint": "eslint --cache .",
11
11
  "lint:fix": "{{ packageManagerName }} run lint{{#if isNPM}} --{{/if}} --fix && prettier --write --list-different .",{{#if usePlaywright}}
12
12
  "e2e": "playwright test",{{/if}}{{#if useCypress}}
13
13
  "e2e": "{{ packageManagerName }} exec cypress install && {{ packageManagerName }} exec grafana-e2e run",
@@ -40,12 +40,12 @@
40
40
  "@typescript-eslint/parser": "^8.3.0",{{#unless useExperimentalRspack}}
41
41
  "copy-webpack-plugin": "^11.0.0",{{/unless}}
42
42
  "css-loader": "^6.7.3",
43
- "eslint": "^8.0.0",
43
+ "eslint": "^9.0.0",
44
44
  "eslint-config-prettier": "^8.8.0",
45
- "eslint-plugin-jsdoc": "^46.8.0",
46
- "eslint-plugin-react": "^7.33.0",
47
- "eslint-plugin-react-hooks": "^4.6.0",
48
- "eslint-webpack-plugin": "^4.0.1",{{#unless useExperimentalRspack}}
45
+ "eslint-plugin-jsdoc": "^51.2.3",
46
+ "eslint-plugin-react": "^7.37.5",
47
+ "eslint-plugin-react-hooks": "^5.2.0",
48
+ "eslint-webpack-plugin": "^5.0.0",{{#unless useExperimentalRspack}}
49
49
  "fork-ts-checker-webpack-plugin": "^8.0.0",{{/unless}}
50
50
  "glob": "^10.2.7",
51
51
  "identity-obj-proxy": "3.0.0",
@@ -0,0 +1,39 @@
1
+ import { defineConfig } from 'eslint/config';
2
+ import baseConfig from './.config/eslint.config.mjs';
3
+
4
+ export default defineConfig([
5
+ {
6
+ ignores: [
7
+ '**/logs',
8
+ '**/*.log',
9
+ '**/npm-debug.log*',
10
+ '**/yarn-debug.log*',
11
+ '**/yarn-error.log*',
12
+ '**/.pnpm-debug.log*',
13
+ '**/node_modules/',
14
+ '.yarn/cache',
15
+ '.yarn/unplugged',
16
+ '.yarn/build-state.yml',
17
+ '.yarn/install-state.gz',
18
+ '**/.pnp.*',
19
+ '**/pids',
20
+ '**/*.pid',
21
+ '**/*.seed',
22
+ '**/*.pid.lock',
23
+ '**/lib-cov',
24
+ '**/coverage',
25
+ '**/dist/',
26
+ '**/artifacts/',
27
+ '**/work/',
28
+ '**/ci/',
29
+ 'test-results/',
30
+ 'playwright-report/',
31
+ 'blob-report/',
32
+ 'playwright/.cache/',
33
+ 'playwright/.auth/',
34
+ '**/.idea',
35
+ '**/.eslintcache',
36
+ ],
37
+ },
38
+ ...baseConfig,
39
+ ]);
@@ -1,30 +0,0 @@
1
- /*
2
- * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
3
- *
4
- * In order to extend the configuration follow the steps in
5
- * https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-eslint-config
6
- */
7
- {
8
- "extends": ["@grafana/eslint-config"],
9
- "root": true,
10
- "rules": {
11
- "react/prop-types": "off"
12
- },
13
- "overrides": [
14
- {
15
- "files": ["src/**/*.{ts,tsx}"],
16
- "rules": {
17
- "@typescript-eslint/no-deprecated": "warn"
18
- },
19
- "parserOptions": {
20
- "project": "./tsconfig.json"
21
- }
22
- },
23
- {
24
- "files": ["./tests/**/*"],
25
- "rules": {
26
- "react-hooks/rules-of-hooks": "off"
27
- }
28
- }
29
- ]
30
- }
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "./.config/.eslintrc"
3
- }