diff --git a/scaffold/.eslintrc b/scaffold/.eslintrc index a92409c..b8b21c6 100644 --- a/scaffold/.eslintrc +++ b/scaffold/.eslintrc @@ -15,26 +15,17 @@ "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended" ], - "plugins": [ - "@typescript-eslint", - "import" - ], + "plugins": ["@typescript-eslint", "import"], "rules": { "import/no-extraneous-dependencies": [ "error", { - "devDependencies": [ - "**/*.test.ts", - "**/*.spec.ts" - ] + "devDependencies": ["**/*.test.ts", "**/*.spec.ts"] } ], "import/prefer-default-export": 0, "no-underscore-dangle": 0, - "no-cond-assign": [ - "error", - "except-parens" - ], + "no-cond-assign": ["error", "except-parens"], "import/no-cycle": 0, "@typescript-eslint/interface-name-prefix": 0, "@typescript-eslint/no-unused-vars": 1, @@ -42,9 +33,7 @@ "error", { "selector": "default", - "format": [ - "camelCase" - ] + "format": ["camelCase"] }, { "selector": "variable", @@ -54,19 +43,21 @@ "match": true } }, + { + "selector": "property", + "format": null, + "filter": { + "regex": ".*(typename)$", + "match": true + } + }, { "selector": "variable", - "format": [ - "camelCase", - "UPPER_CASE", - "PascalCase" - ] + "format": ["camelCase", "UPPER_CASE", "PascalCase"] }, { "selector": "typeLike", - "format": [ - "PascalCase" - ] + "format": ["PascalCase"] } ] }, @@ -76,6 +67,19 @@ "rules": { "@typescript-eslint/naming-convention": "off" } + }, + { + "files": ["src/**/*.spec.ts", "src/**/*.test.ts"], + "plugins": ["jest"], + "extends": ["plugin:jest/recommended"], + "rules": { + "jest/expect-expect": [ + "error", + { + "assertFunctionNames": ["expect", "td.verify"] + } + ] + } } ], "env": { diff --git a/scaffold/package.json b/scaffold/package.json index 151c88e..55e44e5 100644 --- a/scaffold/package.json +++ b/scaffold/package.json @@ -54,6 +54,7 @@ "eslint-config-prettier": "8.10.0", "eslint-import-resolver-typescript": "3.5.5", "eslint-plugin-import": "2.28.0", + "eslint-plugin-jest": "^27.2.3", "eslint-plugin-prettier": "5.0.0", "jest": "29.6.2", "lint-staged": "10.2.11",