Skip to content

Commit 8cc28c0

Browse files
Bump the all-dependencies group with 34 updates and migrate to eslintconfig (#374)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: idastambuk <ida.stambuk@grafana.com>
1 parent f5ce1b5 commit 8cc28c0

File tree

6 files changed

+1013
-1220
lines changed

6 files changed

+1013
-1220
lines changed

.eslintignore

Lines changed: 0 additions & 27 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 74 deletions
This file was deleted.

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
// Prettier configuration provided by Grafana scaffolding
33
...require("./.config/.prettierrc.js")
4-
};
4+
};

eslint.config.mjs

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
import * as emotion from "@emotion/eslint-plugin";
2+
import { fixupPluginRules } from "@eslint/compat";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
import js from "@eslint/js";
5+
import { defineConfig, globalIgnores } from "eslint/config";
6+
import _import from "eslint-plugin-import";
7+
import jest from "eslint-plugin-jest";
8+
import jsxA11Y from "eslint-plugin-jsx-a11y";
9+
import lodash from "eslint-plugin-lodash";
10+
import path from "node:path";
11+
import { fileURLToPath } from "node:url";
12+
13+
const __filename = fileURLToPath(import.meta.url);
14+
const __dirname = path.dirname(__filename);
15+
const compat = new FlatCompat({
16+
baseDirectory: __dirname,
17+
recommendedConfig: js.configs.recommended,
18+
allConfig: js.configs.all
19+
});
20+
21+
export default defineConfig([globalIgnores([
22+
"**/.git",
23+
"**/.github",
24+
"**/.yarn",
25+
"**/build",
26+
"**/compiled",
27+
"data",
28+
"**/deployment_tools_config.json",
29+
"devenv",
30+
"**/dist",
31+
"e2e/tmp",
32+
"**/node_modules",
33+
"pkg",
34+
"public/lib/monaco",
35+
"scripts/grafana-server/tmp",
36+
"**/vendor",
37+
"**/*.gen.ts",
38+
"public/locales/_build/",
39+
"public/locales/**/*.js",
40+
"packages/grafana-ui/src/components/Icon/iconBundle.ts",
41+
"./.config",
42+
]), {
43+
extends: compat.extends("@grafana/eslint-config"),
44+
45+
plugins: {
46+
"@emotion": emotion,
47+
lodash,
48+
jest,
49+
import: fixupPluginRules(_import),
50+
"jsx-a11y": jsxA11Y,
51+
},
52+
53+
settings: {
54+
"import/external-module-folders": ["node_modules", ".yarn"],
55+
},
56+
57+
rules: {
58+
"react/prop-types": "off",
59+
60+
"react/no-unknown-property": ["error", {
61+
ignore: ["css"],
62+
}],
63+
64+
"@emotion/jsx-import": "error",
65+
"lodash/import-scope": [2, "member"],
66+
"jest/no-focused-tests": "error",
67+
68+
"import/order": ["error", {
69+
groups: [["builtin", "external"], "internal", "parent", "sibling", "index"],
70+
"newlines-between": "always",
71+
72+
alphabetize: {
73+
order: "asc",
74+
},
75+
}],
76+
77+
"no-restricted-imports": ["error", {
78+
paths: [{
79+
name: "react-redux",
80+
importNames: ["useDispatch", "useSelector"],
81+
message: "Please import from app/types instead.",
82+
}, {
83+
name: "react-i18next",
84+
importNames: ["Trans", "t"],
85+
message: "Please import from app/core/internationalization instead",
86+
}, {
87+
name: "@grafana/e2e",
88+
message: "@grafana/e2e is deprecated. Please import from ./e2e/utils instead",
89+
}],
90+
}],
91+
92+
"no-redeclare": "off",
93+
"@typescript-eslint/no-redeclare": ["error"],
94+
},
95+
}, {
96+
files: ["**/*.tsx"],
97+
ignores: ["**/*.{spec,test}.tsx"],
98+
extends: compat.extends("plugin:jsx-a11y/recommended"),
99+
100+
rules: {
101+
"jsx-a11y/no-autofocus": ["error", {
102+
ignoreNonDOM: true,
103+
}],
104+
105+
"jsx-a11y/label-has-associated-control": ["error", {
106+
controlComponents: ["NumberInput"],
107+
depth: 2,
108+
}],
109+
},
110+
}]);

package.json

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"e2e:ui": "yarn playwright test --ui",
1111
"test:ci": "jest --passWithNoTests --maxWorkers 4",
1212
"typecheck": "tsc --noEmit",
13-
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
13+
"lint": "eslint --cache .",
1414
"lint:fix": "yarn run lint --fix",
1515
"server:configured": "GRAFANA_VERSION=11.5.0 GRAFANA_IMAGE=grafana-enterprise docker compose up -d",
1616
"sign": "npx --yes @grafana/sign-plugin@latest",
@@ -20,65 +20,68 @@
2020
"author": "Grafana Labs",
2121
"license": "Apache-2.0",
2222
"devDependencies": {
23-
"@babel/core": "7.26.9",
23+
"@babel/core": "7.27.1",
2424
"@emotion/eslint-plugin": "11.12.0",
25-
"@grafana/e2e-selectors": "11.5.2",
25+
"@eslint/compat": "^1.2.9",
26+
"@eslint/eslintrc": "^3.3.1",
27+
"@eslint/js": "^9.27.0",
28+
"@grafana/e2e-selectors": "12.0.1",
2629
"@grafana/eslint-config": "^8.0.0",
27-
"@grafana/plugin-e2e": "^1.18.3",
30+
"@grafana/plugin-e2e": "^2.0.2",
2831
"@grafana/tsconfig": "^2.0.0",
29-
"@playwright/test": "1.50.1",
30-
"@stylistic/eslint-plugin-ts": "^2.9.0",
31-
"@swc/core": "1.11.5",
32-
"@swc/helpers": "0.5.15",
33-
"@swc/jest": "0.2.37",
32+
"@playwright/test": "1.52.0",
33+
"@stylistic/eslint-plugin-ts": "^4.2.0",
34+
"@swc/core": "1.11.29",
35+
"@swc/helpers": "0.5.17",
36+
"@swc/jest": "0.2.38",
3437
"@testing-library/dom": "10.4.0",
3538
"@testing-library/jest-dom": "6.6.3",
36-
"@testing-library/react": "16.2.0",
39+
"@testing-library/react": "16.3.0",
3740
"@testing-library/user-event": "14.6.1",
3841
"@types/eslint": "9.6.1",
3942
"@types/jest": "29.5.14",
40-
"@types/lodash": "4.17.16",
41-
"@types/node": "22.13.9",
43+
"@types/lodash": "4.17.17",
44+
"@types/node": "22.15.21",
4245
"@types/react": "18.3.1",
4346
"@types/react-dom": "18.3.1",
4447
"@types/react-router-dom": "5.3.3",
45-
"@types/semver": "7.5.8",
46-
"@typescript-eslint/eslint-plugin": "^8.26.0",
47-
"@typescript-eslint/parser": "^8.26.0",
48+
"@types/semver": "7.7.0",
49+
"@typescript-eslint/eslint-plugin": "^8.32.1",
50+
"@typescript-eslint/parser": "^8.32.1",
4851
"copy-webpack-plugin": "13.0.0",
49-
"cspell": "8.17.5",
52+
"cspell": "9.0.2",
5053
"css-loader": "7.1.2",
51-
"eslint": "^8.0.0",
52-
"eslint-config-prettier": "10.0.2",
54+
"eslint": "^9.27.0",
55+
"eslint-config-prettier": "10.1.5",
5356
"eslint-plugin-deprecation": "3.0.0",
5457
"eslint-plugin-import": "2.31.0",
5558
"eslint-plugin-jest": "28.11.0",
56-
"eslint-plugin-jsdoc": "50.6.3",
59+
"eslint-plugin-jsdoc": "50.6.17",
5760
"eslint-plugin-jsx-a11y": "6.10.2",
5861
"eslint-plugin-lodash": "8.0.0",
59-
"eslint-plugin-react": "7.37.4",
62+
"eslint-plugin-react": "7.37.5",
6063
"eslint-plugin-react-hooks": "5.2.0",
61-
"eslint-webpack-plugin": "5.0.0",
62-
"fork-ts-checker-webpack-plugin": "9.0.2",
63-
"glob": "11.0.1",
64+
"eslint-webpack-plugin": "5.0.1",
65+
"fork-ts-checker-webpack-plugin": "9.1.0",
66+
"glob": "11.0.2",
6467
"identity-obj-proxy": "3.0.0",
6568
"imports-loader": "^5.0.0",
6669
"jest": "29.7.0",
6770
"jest-environment-jsdom": "29.7.0",
6871
"prettier": "3.5.3",
6972
"react-popper-tooltip": "4.4.2",
7073
"replace-in-file-webpack-plugin": "^1.0.6",
71-
"sass": "1.85.1",
74+
"sass": "1.89.0",
7275
"sass-loader": "16.0.5",
73-
"semver": "^7.7.1",
76+
"semver": "^7.7.2",
7477
"style-loader": "4.0.0",
7578
"swc-loader": "0.2.6",
76-
"terser-webpack-plugin": "^5.3.12",
79+
"terser-webpack-plugin": "^5.3.14",
7780
"testing-library-selector": "0.3.1",
7881
"ts-node": "^10.9.2",
7982
"tsconfig-paths": "^4.2.0",
80-
"typescript": "5.8.2",
81-
"webpack": "5.98.0",
83+
"typescript": "5.8.3",
84+
"webpack": "5.99.9",
8285
"webpack-cli": "^6.0.1",
8386
"webpack-livereload-plugin": "^3.0.2",
8487
"webpack-subresource-integrity": "^5.1.0",
@@ -87,18 +90,18 @@
8790
"dependencies": {
8891
"@emotion/css": "11.13.5",
8992
"@grafana/aws-sdk": "^0.7.0",
90-
"@grafana/data": "12.1.0-244447",
91-
"@grafana/plugin-ui": "^0.10.4",
92-
"@grafana/prometheus": "12.1.0-244447",
93-
"@grafana/runtime": "12.1.0-244447",
94-
"@grafana/schema": "12.1.0-244447",
95-
"@grafana/ui": "12.1.0-244447",
93+
"@grafana/data": "12.1.0-245310",
94+
"@grafana/plugin-ui": "^0.10.6",
95+
"@grafana/prometheus": "12.1.0-245310",
96+
"@grafana/runtime": "12.1.0-245310",
97+
"@grafana/schema": "12.1.0-245310",
98+
"@grafana/ui": "12.1.0-245310",
9699
"lodash": "4.17.21",
97100
"react": "18.3.1",
98101
"react-dom": "18.3.1",
99-
"react-router-dom": "^7.2.0",
102+
"react-router-dom": "^7.6.0",
100103
"rxjs": "7.8.2",
101-
"semver": "7.7.1",
104+
"semver": "7.7.2",
102105
"tslib": "2.8.1"
103106
},
104107
"resolutions": {

0 commit comments

Comments
 (0)