diff --git a/apps/api/.eslintrc.js b/apps/api/.eslintrc.js index 90a6074..de2f43a 100644 --- a/apps/api/.eslintrc.js +++ b/apps/api/.eslintrc.js @@ -1,9 +1,6 @@ +const base = require('eslint-config-custom/_base'); + module.exports = { - root: true, - parserOptions: { - project: 'tsconfig.json', - tsconfigRootDir: __dirname, - sourceType: 'module', - }, + ...base(__dirname), extends: ['custom/nest'], }; diff --git a/packages/eslint-config-custom/_base.js b/packages/eslint-config-custom/_base.js new file mode 100644 index 0000000..983f0e6 --- /dev/null +++ b/packages/eslint-config-custom/_base.js @@ -0,0 +1,10 @@ +module.exports = function (dirname) { + return { + root: true, + parserOptions: { + project: 'tsconfig.json', + tsconfigRootDir: dirname, + sourceType: 'module', + }, + }; +}; diff --git a/packages/eslint-config-custom/common.js b/packages/eslint-config-custom/common.js index 9cf4b7a..598d8b3 100644 --- a/packages/eslint-config-custom/common.js +++ b/packages/eslint-config-custom/common.js @@ -1,8 +1,3 @@ module.exports = { - extends: ['next', 'turbo', 'prettier'], - rules: { - '@next/next/no-html-link-for-pages': 'off', - 'react/jsx-key': 'off', - }, - }; - \ No newline at end of file + extends: ['turbo', 'prettier'], +}; diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js deleted file mode 100644 index c15cc22..0000000 --- a/packages/eslint-config-custom/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const nest = require('./nest'); -const common = require('./common'); - -module.exports = { - common, - nest, -}; diff --git a/packages/eslint-config-custom/nest.js b/packages/eslint-config-custom/nest.js index 420c690..a537fa3 100644 --- a/packages/eslint-config-custom/nest.js +++ b/packages/eslint-config-custom/nest.js @@ -8,7 +8,6 @@ module.exports = { 'plugin:@typescript-eslint/recommended', 'plugin:unicorn/recommended', ], - root: true, env: { node: true, jest: true, diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index c4c5294..65f919f 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -7,6 +7,7 @@ "@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/parser": "^5.30.7", "eslint": "^8.28.0", + "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^17.0.0", "eslint-config-next": "13.0.0", @@ -15,6 +16,7 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "7.31.8", + "eslint-plugin-testing-library": "^5.9.1", "eslint-plugin-unicorn": "^45.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index e42fb6c..1887571 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1191,7 +1191,7 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.44.0": +"@typescript-eslint/utils@5.44.0", "@typescript-eslint/utils@^5.13.0": version "5.44.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.44.0.tgz#d733da4d79d6c30f1a68b531cdda1e0c1f00d52d" integrity sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw== @@ -2408,6 +2408,15 @@ eslint-config-airbnb-typescript@^17.0.0: dependencies: eslint-config-airbnb-base "^15.0.0" +eslint-config-airbnb@^19.0.4: + version "19.0.4" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3" + integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew== + dependencies: + eslint-config-airbnb-base "^15.0.0" + object.assign "^4.1.2" + object.entries "^1.1.5" + eslint-config-next@13.0.0: version "13.0.0" resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.0.0.tgz#d533ee1dbd6576fd3759ba4db4d5a6c4e039c242" @@ -2552,6 +2561,13 @@ eslint-plugin-react@^7.31.7: semver "^6.3.0" string.prototype.matchall "^4.0.8" +eslint-plugin-testing-library@^5.9.1: + version "5.9.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.9.1.tgz#12e4bd34c48683ee98af4df2e3318ec9f51dcf8a" + integrity sha512-6BQp3tmb79jLLasPHJmy8DnxREe+2Pgf7L+7o09TSWPfdqqtQfRZmZNetr5mOs3yqZk/MRNxpN3RUpJe0wB4LQ== + dependencies: + "@typescript-eslint/utils" "^5.13.0" + eslint-plugin-turbo@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/eslint-plugin-turbo/-/eslint-plugin-turbo-0.0.4.tgz#966f3dd6202143d0c28dc9cdbb48b0f779d06172"