Skip to content

Commit

Permalink
Merge pull request #1342 from skaut/typesript-eslint-v7
Browse files Browse the repository at this point in the history
Updated typescript-eslint to v7
  • Loading branch information
marekdedic authored Jun 21, 2024
2 parents 9f67714 + 137fb34 commit accf861
Show file tree
Hide file tree
Showing 20 changed files with 2,397 additions and 2,303 deletions.
38 changes: 38 additions & 0 deletions packages/collector/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,62 @@
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@typescript-eslint/array-type": ["error", { "default": "generic" }],
"@typescript-eslint/class-methods-use-this": "error",
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/init-declarations": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow",
"filter": {
"regex": "^(help-issue-label|html_url|per_page|short-description)$",
"match": false
}
},
{
"selector": "import",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/parameter-properties": "error",
"@typescript-eslint/prefer-enum-initializers": "error",
"@typescript-eslint/prefer-find": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/sort-type-constituents": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
Expand Down
1 change: 1 addition & 0 deletions packages/collector/__tests__/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import nodeFetch from "node-fetch";
nock.disableNetConnect();

jest.mock("../src/octokit", () => {
// eslint-disable-next-line @typescript-eslint/naming-convention -- Classes should be PascalCase
const OctokitWithRest = Octokit.plugin(restEndpointMethods);
return {
octokit: new OctokitWithRest({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { JestConfigWithTsJest } from "ts-jest";

const config: JestConfigWithTsJest = {
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
collectCoverage: true,
collectCoverageFrom: [
"src/**/*",
Expand All @@ -13,6 +12,7 @@ const config: JestConfigWithTsJest = {
coverageProvider: "babel",
setupFiles: ["<rootDir>/__tests__/setup.ts"],
transform: {
// eslint-disable-next-line @typescript-eslint/naming-convention -- Regexp key
"^.+\\.[jt]s$": [
"ts-jest",
{
Expand All @@ -24,5 +24,3 @@ const config: JestConfigWithTsJest = {
resetMocks: true,
testMatch: ["<rootDir>/__tests__/**/*.test.ts"],
};

export default config;
Loading

0 comments on commit accf861

Please sign in to comment.