Skip to content

Commit

Permalink
Merge pull request #1754 from skaut/disable-naming-convention-rule
Browse files Browse the repository at this point in the history
Disabled naming-convention eslint rule
  • Loading branch information
marekdedic authored Jan 1, 2025
2 parents 40341f6 + 51611c7 commit 8823f36
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 67 deletions.
1 change: 0 additions & 1 deletion packages/collector/__tests__/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ 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
31 changes: 0 additions & 31 deletions packages/collector/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import preferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
import prettierRecommended from "eslint-plugin-prettier/recommended";
import tseslint from "typescript-eslint";

/* eslint-disable @typescript-eslint/naming-convention -- Not applicable to this file */

export default tseslint.config(
js.configs.recommended,
prettierRecommended,
Expand Down Expand Up @@ -41,33 +39,6 @@ export default tseslint.config(
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/init-declarations": "error",
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/naming-convention": [
"error",
{
filter: {
match: false,
regex: "^(help-issue-label|html_url|per_page|short-description)$",
},
format: ["camelCase"],
leadingUnderscore: "allow",
selector: "default",
trailingUnderscore: "allow",
},
{
format: ["camelCase", "PascalCase"],
selector: "import",
},
{
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
selector: "variable",
trailingUnderscore: "allow",
},
{
format: ["PascalCase"],
selector: "typeLike",
},
],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unnecessary-parameter-property-assignment":
Expand Down Expand Up @@ -218,5 +189,3 @@ export default tseslint.config(
},
},
);

/* eslint-enable @typescript-eslint/naming-convention */
1 change: 0 additions & 1 deletion packages/collector/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default {
setupFiles: ["<rootDir>/__tests__/setup.ts"],
testMatch: ["<rootDir>/__tests__/**/*.test.ts"],
transform: {
// eslint-disable-next-line @typescript-eslint/naming-convention -- Regexp key
"^.+\\.[jt]s$": [
"ts-jest",
{
Expand Down
1 change: 0 additions & 1 deletion packages/collector/src/octokit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Octokit } from "@octokit/core";
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";

// eslint-disable-next-line @typescript-eslint/naming-convention -- Classes should be PascalCase
const OctokitWithRest = Octokit.plugin(restEndpointMethods);
export const octokit = new OctokitWithRest({ auth: process.env["PAT"] });
31 changes: 0 additions & 31 deletions packages/frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import react from "eslint-plugin-react";
import globals from "globals";
import tseslint from "typescript-eslint";

/* eslint-disable @typescript-eslint/naming-convention -- Not applicable to this file */

export default tseslint.config(
js.configs.recommended,
prettierRecommended,
Expand Down Expand Up @@ -47,33 +45,6 @@ export default tseslint.config(
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/init-declarations": "error",
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/naming-convention": [
"error",
{
filter: {
match: false,
regex: "^(help-issue-label|short-description)$",
},
format: ["camelCase"],
leadingUnderscore: "allow",
selector: "default",
trailingUnderscore: "allow",
},
{
format: ["camelCase", "PascalCase"],
selector: "import",
},
{
format: ["camelCase", "PascalCase", "UPPER_CASE"],
leadingUnderscore: "allow",
selector: "variable",
trailingUnderscore: "allow",
},
{
format: ["PascalCase"],
selector: "typeLike",
},
],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unnecessary-parameter-property-assignment":
Expand Down Expand Up @@ -296,5 +267,3 @@ export default tseslint.config(
},
},
);

/* eslint-enable @typescript-eslint/naming-convention */
2 changes: 0 additions & 2 deletions packages/frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ export default {
"!src/globalStyles.ts",
],
moduleNameMapper: {
// eslint-disable-next-line @typescript-eslint/naming-convention -- The key is a glob matching files
"\\.svg$": "<rootDir>/__mocks__/fileMock.ts",
},
resetMocks: true,
setupFilesAfterEnv: ["<rootDir>/__tests__/setupTests.ts"],
testEnvironment: "jsdom",
testMatch: ["<rootDir>/__tests__/**/*.test.{js,jsx,ts,tsx}"],
transform: {
// eslint-disable-next-line @typescript-eslint/naming-convention -- The key is a glob matching files
"^.+\\.(j|t)sx?$": ["ts-jest", { tsconfig: "test.tsconfig.json" }],
},
transformIgnorePatterns: [
Expand Down

0 comments on commit 8823f36

Please sign in to comment.