From 044ca915df63b14f1ce3c7d7ebe0a04de63fde7e Mon Sep 17 00:00:00 2001
From: Arkadiusz Bachorski
<60391032+arkadiuszbachorski@users.noreply.github.com>
Date: Thu, 30 May 2024 23:01:55 +0200
Subject: [PATCH 1/9] Install ESLint packages
---
package-lock.json | 296 ++++++++++++++++++++++++++++++++++++++--------
package.json | 3 +
2 files changed, 251 insertions(+), 48 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 2a8e381..ab426f9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -23,11 +23,14 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
+ "@typescript-eslint/eslint-plugin": "^7.11.0",
+ "@typescript-eslint/parser": "^7.11.0",
"autoprefixer": "^10",
"concurrently": "^8",
"eslint": "^8",
"eslint-config-next": "^14",
"eslint-config-prettier": "^9",
+ "eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5",
"jest": "^29",
"jest-environment-jsdom": "^29",
@@ -2543,21 +2546,53 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.11.0.tgz",
+ "integrity": "sha512-P+qEahbgeHW4JQ/87FuItjBj8O3MYv5gELDzr8QaQ7fsll1gSMTYb6j87MYyxwf3DtD7uGFB9ShwgmCJB5KmaQ==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.10.0",
+ "@typescript-eslint/scope-manager": "7.11.0",
+ "@typescript-eslint/type-utils": "7.11.0",
+ "@typescript-eslint/utils": "7.11.0",
+ "@typescript-eslint/visitor-keys": "7.11.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.3.1",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^1.3.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^7.0.0",
+ "eslint": "^8.56.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@typescript-eslint/parser": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz",
- "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.11.0.tgz",
+ "integrity": "sha512-yimw99teuaXVWsBcPO1Ais02kwJ1jmNA1KxE7ng0aT7ndr1pT1wqj0OJnsYVGKKlc4QJai86l/025L6z8CljOg==",
"dev": true,
- "license": "BSD-2-Clause",
"dependencies": {
- "@typescript-eslint/scope-manager": "7.2.0",
- "@typescript-eslint/types": "7.2.0",
- "@typescript-eslint/typescript-estree": "7.2.0",
- "@typescript-eslint/visitor-keys": "7.2.0",
+ "@typescript-eslint/scope-manager": "7.11.0",
+ "@typescript-eslint/types": "7.11.0",
+ "@typescript-eslint/typescript-estree": "7.11.0",
+ "@typescript-eslint/visitor-keys": "7.11.0",
"debug": "^4.3.4"
},
"engines": {
- "node": "^16.0.0 || >=18.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -2573,31 +2608,56 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz",
- "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.11.0.tgz",
+ "integrity": "sha512-27tGdVEiutD4POirLZX4YzT180vevUURJl4wJGmm6TrQoiYwuxTIY98PBp6L2oN+JQxzE0URvYlzJaBHIekXAw==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "7.2.0",
- "@typescript-eslint/visitor-keys": "7.2.0"
+ "@typescript-eslint/types": "7.11.0",
+ "@typescript-eslint/visitor-keys": "7.11.0"
},
"engines": {
- "node": "^16.0.0 || >=18.0.0"
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.11.0.tgz",
+ "integrity": "sha512-WmppUEgYy+y1NTseNMJ6mCFxt03/7jTOy08bcg7bxJJdsM4nuhnchyBbE8vryveaJUf62noH7LodPSo5Z0WUCg==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/typescript-estree": "7.11.0",
+ "@typescript-eslint/utils": "7.11.0",
+ "debug": "^4.3.4",
+ "ts-api-utils": "^1.3.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.56.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
}
},
"node_modules/@typescript-eslint/types": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz",
- "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-MPEsDRZTyCiXkD4vd3zywDCifi7tatc4K37KqTprCvaXptP7Xlpdw0NR2hRJTetG5TxbWDB79Ys4kLmHliEo/w==",
"dev": true,
- "license": "MIT",
"engines": {
- "node": "^16.0.0 || >=18.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -2605,23 +2665,22 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz",
- "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.11.0.tgz",
+ "integrity": "sha512-cxkhZ2C/iyi3/6U9EPc5y+a6csqHItndvN/CzbNXTNrsC3/ASoYQZEt9uMaEp+xFNjasqQyszp5TumAVKKvJeQ==",
"dev": true,
- "license": "BSD-2-Clause",
"dependencies": {
- "@typescript-eslint/types": "7.2.0",
- "@typescript-eslint/visitor-keys": "7.2.0",
+ "@typescript-eslint/types": "7.11.0",
+ "@typescript-eslint/visitor-keys": "7.11.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
- "minimatch": "9.0.3",
- "semver": "^7.5.4",
- "ts-api-utils": "^1.0.1"
+ "minimatch": "^9.0.4",
+ "semver": "^7.6.0",
+ "ts-api-utils": "^1.3.0"
},
"engines": {
- "node": "^16.0.0 || >=18.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -2638,17 +2697,15 @@
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
- "license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
+ "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
"dev": true,
- "license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
@@ -2659,18 +2716,39 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/@typescript-eslint/utils": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.11.0.tgz",
+ "integrity": "sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "@typescript-eslint/scope-manager": "7.11.0",
+ "@typescript-eslint/types": "7.11.0",
+ "@typescript-eslint/typescript-estree": "7.11.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || >=20.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.56.0"
+ }
+ },
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz",
- "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==",
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.11.0.tgz",
+ "integrity": "sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ==",
"dev": true,
- "license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "7.2.0",
- "eslint-visitor-keys": "^3.4.1"
+ "@typescript-eslint/types": "7.11.0",
+ "eslint-visitor-keys": "^3.4.3"
},
"engines": {
- "node": "^16.0.0 || >=18.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -2916,7 +2994,6 @@
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true,
- "license": "MIT",
"engines": {
"node": ">=8"
}
@@ -4138,7 +4215,6 @@
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
"integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
"dev": true,
- "license": "MIT",
"dependencies": {
"path-type": "^4.0.0"
},
@@ -4552,6 +4628,133 @@
}
}
},
+ "node_modules/eslint-config-next/node_modules/@typescript-eslint/parser": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz",
+ "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "7.2.0",
+ "@typescript-eslint/types": "7.2.0",
+ "@typescript-eslint/typescript-estree": "7.2.0",
+ "@typescript-eslint/visitor-keys": "7.2.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.56.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-config-next/node_modules/@typescript-eslint/scope-manager": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz",
+ "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "7.2.0",
+ "@typescript-eslint/visitor-keys": "7.2.0"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/eslint-config-next/node_modules/@typescript-eslint/types": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz",
+ "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==",
+ "dev": true,
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/eslint-config-next/node_modules/@typescript-eslint/typescript-estree": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz",
+ "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "7.2.0",
+ "@typescript-eslint/visitor-keys": "7.2.0",
+ "debug": "^4.3.4",
+ "globby": "^11.1.0",
+ "is-glob": "^4.0.3",
+ "minimatch": "9.0.3",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-config-next/node_modules/@typescript-eslint/visitor-keys": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz",
+ "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "7.2.0",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/eslint-config-next/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/eslint-config-next/node_modules/minimatch": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/eslint-config-prettier": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
@@ -4646,7 +4849,6 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
"integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
"dev": true,
- "license": "MIT",
"dependencies": {
"array-includes": "^3.1.7",
"array.prototype.findlastindex": "^1.2.3",
@@ -5491,7 +5693,6 @@
"resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
"integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
"dev": true,
- "license": "MIT",
"dependencies": {
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
@@ -8534,7 +8735,6 @@
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true,
- "license": "MIT",
"engines": {
"node": ">=8"
}
diff --git a/package.json b/package.json
index 5b96044..e202914 100644
--- a/package.json
+++ b/package.json
@@ -40,11 +40,14 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
+ "@typescript-eslint/eslint-plugin": "^7",
+ "@typescript-eslint/parser": "^7",
"autoprefixer": "^10",
"concurrently": "^8",
"eslint": "^8",
"eslint-config-next": "^14",
"eslint-config-prettier": "^9",
+ "eslint-plugin-import": "^2",
"eslint-plugin-prettier": "^5",
"jest": "^29",
"jest-environment-jsdom": "^29",
From 6903206b450db70aee83a766d445d70536b14631 Mon Sep 17 00:00:00 2001
From: Arkadiusz Bachorski
<60391032+arkadiuszbachorski@users.noreply.github.com>
Date: Thu, 30 May 2024 23:02:46 +0200
Subject: [PATCH 2/9] Configure ESLint
---
.eslintrc.json | 114 ++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 109 insertions(+), 5 deletions(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 360245e..9568e04 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,8 +1,112 @@
{
- "extends": ["next/core-web-vitals", "prettier"],
- "plugins": ["prettier"],
- "ignorePatterns": ["**/dist/*.js", "/docs/**", "/out/**"],
+ "plugins": ["prettier", "@typescript-eslint", "import"],
+ "parserOptions": {
+ "project": "./tsconfig.json"
+ },
+ "parser": "@typescript-eslint/parser",
+ "extends": [
+ "plugin:@typescript-eslint/strict-type-checked",
+ "plugin:@typescript-eslint/stylistic-type-checked",
+ "plugin:import/recommended",
+ "plugin:import/typescript",
+ "next/core-web-vitals",
+ "prettier"
+ ],
+ "ignorePatterns": [
+ "**/dist/*",
+ "/docs/**",
+ "/out/**",
+ "**/jest.config.js",
+ "**/next.config.js",
+ "**/postcss.config.js",
+ "**/tailwind.config.js"
+ ],
"rules": {
- "prettier/prettier": "error"
- }
+ "prettier/prettier": "error",
+ "import/order": [
+ "warn",
+ {
+ "groups": ["builtin", "external", "internal", ["parent", "sibling"]],
+ "pathGroupsExcludedImportTypes": ["builtin"],
+ "newlines-between": "never",
+ "alphabetize": {
+ "order": "asc",
+ "caseInsensitive": true
+ }
+ }
+ ],
+ "import/no-empty-named-blocks": "error",
+ "import/no-mutable-exports": "error",
+ "import/no-cycle": "error",
+ "import/extensions": [
+ "warn",
+ "always",
+ {
+ "ts": "never",
+ "tsx": "never",
+ "js": "never",
+ "jsx": "never",
+ "mjs": "never"
+ }
+ ],
+ "import/newline-after-import": "warn",
+ "import/no-anonymous-default-export": "warn",
+ "import/no-default-export": "error",
+ "@typescript-eslint/consistent-type-imports": [
+ "warn",
+ {
+ "prefer": "type-imports",
+ "fixStyle": "inline-type-imports",
+ "disallowTypeAnnotations": false
+ }
+ ],
+ "@typescript-eslint/no-misused-promises": [
+ "error",
+ {
+ "checksVoidReturn": {
+ "attributes": false
+ }
+ }
+ ],
+ "import/no-duplicates": [
+ "error",
+ {
+ "prefer-inline": true
+ }
+ ],
+ // false negatives
+ "import/namespace": ["off"],
+ "no-empty-pattern": "off",
+ // make sure to `await` inside try…catch
+ "@typescript-eslint/return-await": ["error", "in-try-catch"],
+ "@typescript-eslint/no-confusing-void-expression": [
+ "error",
+ { "ignoreArrowShorthand": true }
+ ],
+ // empty interfaces are fine, e.g. React component that extends other component, but with no additional props
+ "@typescript-eslint/no-empty-interface": "off",
+ "@typescript-eslint/array-type": [
+ "warn",
+ { "default": "array-simple", "readonly": "array-simple" }
+ ],
+ // allow unused vars prefixed with `_`
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
+ ],
+ // numbers and booleans are fine in template strings
+ "@typescript-eslint/restrict-template-expressions": [
+ "error",
+ { "allowNumber": true, "allowBoolean": true }
+ ],
+ "react/no-unescaped-entities": "off"
+ },
+ "overrides": [
+ {
+ "files": ["app/**/*.ts?(x)"],
+ "rules": {
+ "import/no-default-export": "off"
+ }
+ }
+ ]
}
From 8bc7fbcd604dc2bc80f12b32a9d674430e25c71f Mon Sep 17 00:00:00 2001
From: Arkadiusz Bachorski
<60391032+arkadiuszbachorski@users.noreply.github.com>
Date: Thu, 30 May 2024 23:02:58 +0200
Subject: [PATCH 3/9] Ignore dist files from formatting
---
.prettierignore | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 .prettierignore
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..a3f5c72
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,2 @@
+**/dist
+node_modules
\ No newline at end of file
From e55d8ea8dc0073cdeb85177dab88d7c683a48788 Mon Sep 17 00:00:00 2001
From: Arkadiusz Bachorski
<60391032+arkadiuszbachorski@users.noreply.github.com>
Date: Thu, 30 May 2024 23:03:34 +0200
Subject: [PATCH 4/9] Run lint:fix
---
.github/workflows/codeql.yml | 16 ++++++++--------
.../workflows/monthly-markdown-link-check.yml | 2 +-
app/page.test.tsx | 4 ++--
app/page.tsx | 2 +-
packages/example-package/src/index.ts | 4 ++--
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index b65f48a..914c37b 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -28,11 +28,11 @@ jobs:
actions: read
contents: read
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3
- with:
- languages: javascript-typescript
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: javascript-typescript
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/monthly-markdown-link-check.yml b/.github/workflows/monthly-markdown-link-check.yml
index f2379e9..92325d5 100644
--- a/.github/workflows/monthly-markdown-link-check.yml
+++ b/.github/workflows/monthly-markdown-link-check.yml
@@ -10,7 +10,7 @@ name: Monthly Markdown Link Check
on:
schedule:
- - cron: "0 8 1 * *"
+ - cron: '0 8 1 * *'
jobs:
markdown_link_check:
diff --git a/app/page.test.tsx b/app/page.test.tsx
index df14aee..f8a4651 100644
--- a/app/page.test.tsx
+++ b/app/page.test.tsx
@@ -24,9 +24,9 @@ describe('Home Component', () => {
it('renders the Stanford Biodesign Logo', () => {
render(