diff --git a/eslint.config.cjs b/eslint.config.cjs deleted file mode 100644 index 938e455..0000000 --- a/eslint.config.cjs +++ /dev/null @@ -1,52 +0,0 @@ -const eslint = require("@eslint/js"); -const tseslint = require("typescript-eslint"); - -module.exports = tseslint.config( - { - ignores: ["**/__test__", "**/*.json"], - }, - eslint.configs.recommended, - ...tseslint.configs.recommended, - { - languageOptions: { - parserOptions: { - project: true, - ecmaVersion: 2020, - }, - }, - }, - { - files: ["*.ts", "*.js"], - extends: ["eslint:recommended", "plugin:prettier/recommended"], - ...tseslint.configs.disableTypeChecked, - }, - { - files: ["*.test *.js"], - rules: { - "@typescript-eslint/no-unused-vars": 0, - "@typescript-eslint/no-unsafe-call": 0, - languageOptions: { - globals: { - it: "readonly", - describe: "readonly", - }, - }, - }, - }, - { - rules: { - semi: "error", - "@typescript-eslint/no-unused-vars": 2, - "@typescript-eslint/no-explicit-any": 0, - "@typescript-eslint/no-var-requires": 0, - "no-shadow": [2, { allow: ["req", "res", "err"] }], - "new-cap": 0, - "one-var-declaration-per-line": 0, - "consistent-return": 0, - "no-param-reassign": 0, - "comma-dangle": 0, - "no-undef": 0, - curly: ["error", "multi-line"], - }, - }, -); diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..1a7d6f8 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,51 @@ +const eslint = require("@eslint/js"); +const tseslint = require("typescript-eslint"); + +module.exports = tseslint.config( + { + ignores: ["**/__test__", "**/*.json"], + }, + eslint.configs.recommended, + ...tseslint.configs.recommended, + { + languageOptions: { + parserOptions: { + project: true, + ecmaVersion: 2020, + }, + }, + }, + { + files: ["*.ts", "*.js"], + ...tseslint.configs.disableTypeChecked, + }, + { + files: ["*.test *.js"], + rules: { + "@typescript-eslint/no-unused-vars": 0, + "@typescript-eslint/no-unsafe-call": 0, + languageOptions: { + globals: { + it: "readonly", + describe: "readonly", + }, + }, + }, + }, + { + rules: { + semi: "error", + "@typescript-eslint/no-unused-vars": 2, + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/no-var-requires": 0, + "no-shadow": [2, { allow: ["req", "res", "err"] }], + "new-cap": 0, + "one-var-declaration-per-line": 0, + "consistent-return": 0, + "no-param-reassign": 0, + "comma-dangle": 0, + "no-undef": 0, + curly: ["error", "multi-line"], + }, + }, +); \ No newline at end of file diff --git a/package.json b/package.json index a2a12ee..adba14e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "author": "atlp", "license": "MIT", "devDependencies": { - "@eslint/js": "^9.0.0", + "@eslint/js": "^9.1.1", "@types/bcryptjs": "^2.4.6", "@types/cors": "^2.8.17", "@types/dotenv": "^8.2.0", @@ -47,7 +47,7 @@ "@types/node": "^20.12.7", "@types/supertest": "^6.0.2", "@types/swagger-ui-express": "^4.1.6", - "@typescript-eslint/eslint-plugin": "^7.6.0", + "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.6.0", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0",