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

Lint only updated files with stricter linting #1635

30 changes: 15 additions & 15 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@
],

// restrict the use of same package in multiple import statements
"import/no-duplicates": "warn",
"import/no-duplicates": "error",

// warn/1, error/2, off/0
"tsdoc/syntax": "warn",
// error/1, error/2, off/0
"tsdoc/syntax": "error",

// Typescript Rules
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-duplicate-enum-values": "warn",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",

// Typescript rule to enforce PascalCase naming convention for types and interfaces
"@typescript-eslint/naming-convention": [
Expand Down Expand Up @@ -115,9 +115,9 @@
],

// Typescript additional rules
"@typescript-eslint/array-type": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/explicit-function-return-type": "warn"
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "error"
}
}
6 changes: 2 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
# Change to the current directory
. "$(dirname -- "$0")/_/husky.sh"

# Formats code using prettier.
npm run format:fix

# Checks code for typescript type errors and throws errors if found.
npm run typecheck

# Formats code using prettier
# Checks and fixes all lint issues in code which don't require manual intervention.
# Throws errors if lint issues requiring manual intervention are found in code.
npm run lint:fix
npx lint-staged

npm run gen:schema

Expand Down
Loading
Loading