diff --git a/package.json b/package.json index a46e03d9..8ae63ced 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "eslint": "^8.56.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-require-extensions": "^0.1.3", "jest": "^29.7.0", "prettier": "^3.2.4", "typescript": "^5.3.3" diff --git a/packages/eslint-config/eslint-config.cjs b/packages/eslint-config/eslint-config.cjs index 40bbbabb..2c0f8b2e 100755 --- a/packages/eslint-config/eslint-config.cjs +++ b/packages/eslint-config/eslint-config.cjs @@ -10,6 +10,7 @@ module.exports = { // "plugin:@typescript-eslint/stylistic-type-checked", 'plugin:import/recommended', 'plugin:import/typescript', + 'plugin:require-extensions/recommended', ], env: { 'shared-node-browser': true, @@ -21,7 +22,7 @@ module.exports = { ecmaVersion: 2023, sourceType: 'module', }, - plugins: ['@typescript-eslint', 'import'], + plugins: ['@typescript-eslint', 'import', 'require-extensions'], settings: { 'import/resolver': { typescript: { diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 894872b7..15dd1f8c 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -55,6 +55,7 @@ "eslint": "^8.56.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-require-extensions": "^0.1.3", "typescript": "^5.3.3" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 18e9d894..f73ffbad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,6 +63,7 @@ __metadata: eslint: "npm:^8.56.0" eslint-import-resolver-typescript: "npm:^3.6.1" eslint-plugin-import: "npm:^2.29.1" + eslint-plugin-require-extensions: "npm:^0.1.3" typescript: "npm:^5.3.3" peerDependencies: "@typescript-eslint/eslint-plugin": ">6.0.0" @@ -2312,6 +2313,7 @@ __metadata: eslint: "npm:^8.56.0" eslint-import-resolver-typescript: "npm:^3.6.1" eslint-plugin-import: "npm:^2.29.1" + eslint-plugin-require-extensions: "npm:^0.1.3" jest: "npm:^29.7.0" prettier: "npm:^3.2.4" typescript: "npm:^5.3.3" @@ -3700,6 +3702,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-require-extensions@npm:^0.1.3": + version: 0.1.3 + resolution: "eslint-plugin-require-extensions@npm:0.1.3" + peerDependencies: + eslint: "*" + checksum: 79aec6ac25139edd7e085c40dae0e7699b66a0f253333a80e5a2857762f258d8cf8c89fc873b9ada7c9d8d7722c0386164783eb979361c5bc02c5e7fc1175403 + languageName: node + linkType: hard + "eslint-scope@npm:^7.2.2": version: 7.2.2 resolution: "eslint-scope@npm:7.2.2"