diff --git a/eslint.config.mjs b/eslint.config.mjs index 10318ad1..e6816c2d 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -13,10 +13,9 @@ const compat = new FlatCompat({ allConfig: js.configs.all, }); +import defaultConfig from "@fauna/typescript/config/eslint.config.js"; export default [ - { - ignores: ["**/node_modules", ".history"], - }, + ...defaultConfig, ...compat.extends("plugin:prettier/recommended"), { languageOptions: { @@ -25,7 +24,6 @@ export default [ }, parser: espree, - ecmaVersion: 2020, sourceType: "module", parserOptions: { @@ -33,29 +31,5 @@ export default [ modules: true, }, }, - - rules: { - "no-await-in-loop": "off", - "new-cap": "off", - "quote-props": "off", - "no-negated-condition": "off", - "no-warning-comments": "off", - "spaced-comment": "off", - "max-nested-callbacks": "off", - "no-else-return": "off", - "no-console": "off", - "no-multi-str": "off", - "no-prototype-builtins": "off", - - "node/no-unsupported-features": "off", - camelcase: "off", - }, - }, - { - files: ["test/**/*.mjs"], - - rules: { - "no-unused-expressions": "off", - }, }, ]; diff --git a/package-lock.json b/package-lock.json index e90d1f30..82399be8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "3.0.0-beta", "license": "MPL-2.0", "dependencies": { + "@fauna/typescript": "^0.0.6", "@inquirer/prompts": "^7.0.0", "awilix": "^12.0.2", "chalk": "^5.3.0", @@ -267,6 +268,20 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@fauna/typescript": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@fauna/typescript/-/typescript-0.0.6.tgz", + "integrity": "sha512-ffxMBYVi772cI+gr1KWDGFGvO5xyBj+g1Xnc23buR17NHL1xV1KyxcPIGiPOQ81CCtJpcJkzcg3aoBS5ffJMLg==", + "license": "MPL-2.0", + "dependencies": { + "mentions-regex": "^2.0.3", + "parse-commit-message": "^5.0.4" + }, + "peerDependencies": { + "eslint": "^9.12.0", + "prettier": "^3.3.3" + } + }, "node_modules/@humanfs/core": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", @@ -1268,6 +1283,11 @@ "node": ">=12" } }, + "node_modules/collect-mentions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/collect-mentions/-/collect-mentions-2.0.1.tgz", + "integrity": "sha512-3/MkmIZDerSapDxlRLGJ2M38Zs2+GMJ6i3X4d9ilyB82PcSFVzA5VVH6A6SKXPIuzcyeE+xAS+4XdY0O1MVAxQ==" + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2597,6 +2617,12 @@ "is-buffer": "~1.1.6" } }, + "node_modules/mentions-regex": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/mentions-regex/-/mentions-regex-2.0.3.tgz", + "integrity": "sha512-136g0tOWk7/Y7LK/Y6FZa6TxLqwxFCAUoY6z/GC5o5ulK8oXzEU4knnTAoeVscQUTTEkNCOZcKWSxkCNmgSWHQ==", + "license": "MIT" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2640,6 +2666,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mixin-deep": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-2.0.1.tgz", + "integrity": "sha512-imbHQNRglyaplMmjBLL3V5R6Bfq5oM+ivds3SKgc6oRtzErEnBUUc5No11Z2pilkUvl42gJvi285xTNswcKCMA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", @@ -2983,6 +3018,19 @@ "node": ">=6" } }, + "node_modules/parse-commit-message": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/parse-commit-message/-/parse-commit-message-5.0.4.tgz", + "integrity": "sha512-Gf/4BeROJw6nb/ajGbF1ymDwnyQjV8ffwnyouv2uX08Tq5MFFiY+MNMiidz7cqBGvxvLhyYGjyjQGUy3w4a/7g==", + "license": "MPL-2.0", + "dependencies": { + "collect-mentions": "^2.0.1", + "mixin-deep": "^2.0.1" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/pascal-case": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", @@ -3056,7 +3104,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", - "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index 43ae02d4..92c4d502 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ }, "bugs": "https://github.com/fauna/fauna-shell/issues", "dependencies": { + "@fauna/typescript": "^0.0.6", "@inquirer/prompts": "^7.0.0", "awilix": "^12.0.2", "chalk": "^5.3.0",