From 127a20b29c29b015606b28c59ab0475128dab2f1 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sun, 26 Feb 2023 13:45:07 +0100 Subject: [PATCH] update eslint --- interface/.eslintrc.js | 8 +++++--- interface/package.json | 2 +- interface/yarn.lock | 38 +++++++++++++++++++++++++++----------- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/interface/.eslintrc.js b/interface/.eslintrc.js index 072536315..2f7ef4881 100644 --- a/interface/.eslintrc.js +++ b/interface/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { - plugins: ['react-refresh'], + plugins: ['@typescript-eslint', 'deprecation'], extends: [ // By extending from a plugin config, we can get recommended rules without having to add them manually. 'eslint:recommended', @@ -8,7 +8,6 @@ module.exports = { 'plugin:import/typescript', 'plugin:jsx-a11y/recommended', 'plugin:@typescript-eslint/recommended', - // 'plugin:react-refresh/recommended', // This disables the formatting rules in ESLint that Prettier is going to be responsible for handling. // Make sure it's always the last config, so it gets the chance to override other configs. 'eslint-config-prettier' @@ -30,6 +29,8 @@ module.exports = { } }, parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', project: ['tsconfig.json'], createDefaultProgram: true }, @@ -43,6 +44,7 @@ module.exports = { 'react/prop-types': 'off', 'react/self-closing-comp': 'warn', '@typescript-eslint/consistent-type-definitions': ['off', 'type'], - '@typescript-eslint/explicit-function-return-type': 'off' + '@typescript-eslint/explicit-function-return-type': 'off', + 'deprecation/deprecation': 'warn' } }; diff --git a/interface/package.json b/interface/package.json index e15a6d5f4..44e53d3c3 100644 --- a/interface/package.json +++ b/interface/package.json @@ -55,10 +55,10 @@ "eslint": "^8.35.0", "eslint-config-prettier": "^8.6.0", "eslint-import-resolver-typescript": "^3.5.3", + "eslint-plugin-deprecation": "^1.3.3", "eslint-plugin-import": "^2.27.5", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.32.2", - "eslint-plugin-react-refresh": "^0.3.4", "nodemon": "^2.0.20", "npm-run-all": "^4.1.5", "prettier": "^2.8.4", diff --git a/interface/yarn.lock b/interface/yarn.lock index 5902144ef..3c6ef38ae 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1355,6 +1355,17 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/experimental-utils@npm:^5.0.0": + version: 5.53.0 + resolution: "@typescript-eslint/experimental-utils@npm:5.53.0" + dependencies: + "@typescript-eslint/utils": 5.53.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 654702d564d6680b984a23ab2887ab6a1fceda073bb2522a84edf7c8d16a6dbd42b122be2583b9ddf1cdfd3ce68dac7292739b9c95fd0f3aa713e4414a64f7d1 + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^5.53.0": version: 5.53.0 resolution: "@typescript-eslint/parser@npm:5.53.0" @@ -1488,10 +1499,10 @@ __metadata: eslint: ^8.35.0 eslint-config-prettier: ^8.6.0 eslint-import-resolver-typescript: ^3.5.3 + eslint-plugin-deprecation: ^1.3.3 eslint-plugin-import: ^2.27.5 eslint-plugin-jsx-a11y: ^6.7.1 eslint-plugin-react: ^7.32.2 - eslint-plugin-react-refresh: ^0.3.4 history: ^5.3.0 jwt-decode: ^3.1.2 lodash-es: ^4.17.21 @@ -2531,6 +2542,20 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-deprecation@npm:^1.3.3": + version: 1.3.3 + resolution: "eslint-plugin-deprecation@npm:1.3.3" + dependencies: + "@typescript-eslint/experimental-utils": ^5.0.0 + tslib: ^2.3.1 + tsutils: ^3.21.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: ^3.7.5 || ^4.0.0 + checksum: 5e14d7bc8245a14784623632d43a6210880a4aad4c029fd44686a5516c248287f32406ff230f6e9d238784854b24cd09da953ec8f73d9d19a7c4b3905884e432 + languageName: node + linkType: hard + "eslint-plugin-import@npm:^2.27.5": version: 2.27.5 resolution: "eslint-plugin-import@npm:2.27.5" @@ -2582,15 +2607,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-refresh@npm:^0.3.4": - version: 0.3.4 - resolution: "eslint-plugin-react-refresh@npm:0.3.4" - peerDependencies: - eslint: ">=7" - checksum: cfed1cc698da5e2c58d3c1e5868eb579e985418f10bbf5da84d6c4923499ce544c4d152c6fa6fa02ffcc02c248a1da77190741ab923075ee6cab181268ad6652 - languageName: node - linkType: hard - "eslint-plugin-react@npm:^7.32.2": version: 7.32.2 resolution: "eslint-plugin-react@npm:7.32.2" @@ -5372,7 +5388,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.4.0, tslib@npm:^2.5.0": +"tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0": version: 2.5.0 resolution: "tslib@npm:2.5.0" checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1