Skip to content

Commit

Permalink
ESLint Configuration format
Browse files Browse the repository at this point in the history
  • Loading branch information
IRUMVAEmmanuel1 authored and MugemaneBertin2001 committed Apr 26, 2024
1 parent bd9384b commit df19038
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 54 deletions.
52 changes: 0 additions & 52 deletions eslint.config.cjs

This file was deleted.

51 changes: 51 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -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"],
},
},
);
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit df19038

Please sign in to comment.