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

chore: loosen up eslint rules #7335

Merged
merged 3 commits into from
Nov 29, 2024
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
2 changes: 1 addition & 1 deletion engineering-toolkit/eslint-config/src/ecma.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function ecma(config, ...overrides) {
},
name: "import",
rules: {
"import/no-anonymous-default-export": "warn",
"import/no-anonymous-default-export": "off",
FRSgit marked this conversation as resolved.
Show resolved Hide resolved
},
settings: {
"import/extensions": [".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx", ".js", ".jsx", ".mjs", ".cjs"],
Expand Down
11 changes: 8 additions & 3 deletions engineering-toolkit/eslint-config/src/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function typescript(config, ...overrides) {
},
name: "import",
rules: {
"import/no-anonymous-default-export": "warn",
"import/no-anonymous-default-export": "off",
},
settings: {
"import/resolver": {
Expand Down Expand Up @@ -61,6 +61,7 @@ export function typescript(config, ...overrides) {
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-object-type": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/no-magic-numbers": "warn",
Expand All @@ -76,9 +77,13 @@ export function typescript(config, ...overrides) {
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/no-use-before-define": [
"warn",
{
functions: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making that change. I never understood why we disallowed ordering functions by relevance and making good use of hoisting.

},
],
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/no-empty-object-type": "warn",
"default-param-last": "off",
"no-magic-numbers": "off",
"no-use-before-define": "off",
Expand Down
Loading