Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: linter should error on new empty resolver tests #809

Merged
merged 2 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/scripts/end-to-end-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ shelljs.sed('-i', /"chimp": "0.0.0-development"/, '"chimp": "../chimp"', path.jo

quietExec('npm install', { cwd: pathToRunFromChimp });
quietExec('npm run type-check', { cwd: pathToRunFromChimp });
quietExec('npm run lint', { cwd: pathToRunFromChimp });
quietExec("npm run lint -- --rule 'jest/expect-expect: off'", { cwd: pathToRunFromChimp });
spawn('npm', ['start'], {
stdio: 'ignore',
detached: true,
Expand Down
Loading