diff --git a/.config/.cprc.json b/.config/.cprc.json new file mode 100644 index 0000000..93cec15 --- /dev/null +++ b/.config/.cprc.json @@ -0,0 +1,3 @@ +{ + "version": "2.6.0" +} diff --git a/.config/.eslintrc b/.config/.eslintrc index adb4846..1486ed2 100644 --- a/.config/.eslintrc +++ b/.config/.eslintrc @@ -9,5 +9,17 @@ "root": true, "rules": { "react/prop-types": "off" - } + }, + "overrides": [ + { + "plugins": ["deprecation"], + "files": ["src/**/*.{ts,tsx}"], + "rules": { + "deprecation/deprecation": "warn" + }, + "parserOptions": { + "project": "./tsconfig.json" + } + } + ] } diff --git a/.config/webpack/webpack.config.ts b/.config/webpack/webpack.config.ts index e9e8e5d..24dfd32 100644 --- a/.config/webpack/webpack.config.ts +++ b/.config/webpack/webpack.config.ts @@ -110,7 +110,7 @@ const config = async (env): Promise => { // Keep publicPath relative for host.com/grafana/ deployments publicPath: `public/plugins/${pluginJson.id}/img/`, outputPath: 'img/', - filename: Boolean(env.production) ? '[hash][ext]' : '[name][ext]', + filename: Boolean(env.production) ? '[hash][ext]' : '[file]', }, }, { diff --git a/package.json b/package.json index 087f454..15dfdbe 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,8 @@ "typescript": "4.8.4", "webpack": "^5.86.0", "webpack-cli": "^5.1.4", - "webpack-livereload-plugin": "^3.0.2" + "webpack-livereload-plugin": "^3.0.2", + "eslint-plugin-deprecation": "^2.0.0" }, "dependencies": { "@emotion/css": "^11.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a24cb3..022bd22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,6 +103,9 @@ devDependencies: d3: specifier: 7.8.5 version: 7.8.5 + eslint-plugin-deprecation: + specifier: ^2.0.0 + version: 2.0.0(eslint@8.53.0)(typescript@4.8.4) eslint-webpack-plugin: specifier: ^4.0.1 version: 4.0.1(eslint@8.53.0)(webpack@5.89.0) @@ -3850,6 +3853,14 @@ packages: '@typescript-eslint/visitor-keys': 5.59.9 dev: true + /@typescript-eslint/scope-manager@6.11.0: + resolution: {integrity: sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/visitor-keys': 6.11.0 + dev: true + /@typescript-eslint/type-utils@5.59.9(eslint@8.42.0)(typescript@4.8.4): resolution: {integrity: sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3875,6 +3886,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types@6.11.0: + resolution: {integrity: sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@5.59.9(typescript@4.8.4): resolution: {integrity: sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3896,6 +3912,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@6.11.0(typescript@4.8.4): + resolution: {integrity: sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/visitor-keys': 6.11.0 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@4.8.4) + typescript: 4.8.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@5.59.9(eslint@8.42.0)(typescript@4.8.4): resolution: {integrity: sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3916,6 +3953,25 @@ packages: - typescript dev: true + /@typescript-eslint/utils@6.11.0(eslint@8.53.0)(typescript@4.8.4): + resolution: {integrity: sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.5 + '@typescript-eslint/scope-manager': 6.11.0 + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/typescript-estree': 6.11.0(typescript@4.8.4) + eslint: 8.53.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@5.59.9: resolution: {integrity: sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3924,6 +3980,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@6.11.0: + resolution: {integrity: sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.11.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -6279,6 +6343,21 @@ packages: eslint: 8.42.0 dev: true + /eslint-plugin-deprecation@2.0.0(eslint@8.53.0)(typescript@4.8.4): + resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: ^4.2.4 || ^5.0.0 + dependencies: + '@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@4.8.4) + eslint: 8.53.0 + tslib: 2.5.3 + tsutils: 3.21.0(typescript@4.8.4) + typescript: 4.8.4 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-plugin-jsdoc@46.2.6(eslint@8.42.0): resolution: {integrity: sha512-zIaK3zbSrKuH12bP+SPybPgcHSM6MFzh3HFeaODzmsF1N8C1l8dzJ22cW1aq4g0+nayU1VMjmNf7hg0dpShLrA==} engines: {node: '>=16'} @@ -11054,6 +11133,15 @@ packages: resolution: {integrity: sha512-T2Vkpa/7Vdm3sV8nXRn8vZ0tnq6wlnO4Zx7Pux+JA1W6DMlg5EtbNcPZu/L7XRTPc9S0eAKhEFR4p/u0GcsDpQ==} dev: true + /ts-api-utils@1.0.3(typescript@4.8.4): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 4.8.4 + dev: true + /ts-easing@0.2.0: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} dev: false