Skip to content

Commit

Permalink
feat: linter should error on new empty resolver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lgandecki committed Aug 22, 2023
1 parent ab046a0 commit 27ce009
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
50 changes: 27 additions & 23 deletions scaffold/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,25 @@
"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,
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": [
"camelCase"
]
"format": ["camelCase"]
},
{
"selector": "variable",
Expand All @@ -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"]
}
]
},
Expand All @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions scaffold/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 27ce009

Please sign in to comment.