From fdee0e200b468a7fa43d8f9e35f4d0149cfcb7da Mon Sep 17 00:00:00 2001 From: Felipe Marques Date: Thu, 17 Oct 2024 11:46:40 -0300 Subject: [PATCH] chore:update eslint config file --- .eslintrc.js | 24 ------------------------ eslint.config.js | 21 +++++++++++++++++++++ package-lock.json | 8 ++++---- package.json | 2 +- 4 files changed, 26 insertions(+), 29 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 eslint.config.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index f6c62bee..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - }, - plugins: ['@typescript-eslint/eslint-plugin'], - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - ], - root: true, - env: { - node: true, - jest: true, - }, - ignorePatterns: ['.eslintrc.js'], - rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - }, -}; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..89751cad --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,21 @@ +module.exports = [ + { + files: ["**/*.ts"], + languageOptions: { + parser: require('@typescript-eslint/parser'), + parserOptions: { + project: 'tsconfig.json', + sourceType: 'module', + }, + }, + plugins: { + '@typescript-eslint': require('@typescript-eslint/eslint-plugin'), + }, + rules: { + '@typescript-eslint/interface-name-prefix': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index b9195ca3..e8d5c5b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "ts-node": "^10.9.2", "ts-node-dev": "^2.0.0", "tsconfig-paths": "^4.2.0", - "typescript": "^5.6.3" + "typescript": "5.5" } }, "node_modules/@ampproject/remapping": { @@ -10563,9 +10563,9 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 8b7e1aeb..f28b78c1 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "ts-node": "^10.9.2", "ts-node-dev": "^2.0.0", "tsconfig-paths": "^4.2.0", - "typescript": "^5.6.3" + "typescript": "5.5" }, "jest": { "moduleFileExtensions": [