Skip to content
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
41 changes: 4 additions & 37 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export default defineConfig([
'no-useless-return': 'error',
'object-shorthand': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-template': 'error',
radix: 'error',
// Base rules disabled in favor of TS / plugin variants.
Expand All @@ -107,7 +106,6 @@ export default defineConfig([

// TypeScript correctness
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': [
'error',
{
Expand All @@ -118,15 +116,13 @@ export default defineConfig([
},
],
'@typescript-eslint/class-literal-property-style': 'warn',
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'never',
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' }],
'@typescript-eslint/default-param-last': 'error',
'@typescript-eslint/explicit-function-return-type': [
Expand All @@ -138,20 +134,15 @@ export default defineConfig([
},
],
'@typescript-eslint/explicit-member-accessibility': 'warn',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true }],
'@typescript-eslint/no-deprecated': 'warn',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-empty-function': [
'warn',
{
allow: ['private-constructors', 'protected-constructors', 'decoratedFunctions', 'overrideMethods'],
},
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/no-misused-promises': [
'error',
Expand All @@ -164,11 +155,10 @@ export default defineConfig([
],
'@typescript-eslint/no-mixed-enums': 'error',
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
Expand All @@ -182,18 +172,12 @@ export default defineConfig([
// Base no-unused-vars handled by `unused-imports/no-unused-vars` above.
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'warn',
'@typescript-eslint/only-throw-error': 'error',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/require-await': 'warn',
'@typescript-eslint/restrict-template-expressions': [
'error',
Expand All @@ -209,7 +193,7 @@ export default defineConfig([
'@typescript-eslint/strict-boolean-expressions': 'warn',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/unified-signatures': 'warn',
'@typescript-eslint/unified-signatures': 'error',

// Engine-specific naming convention
'@typescript-eslint/naming-convention': [
Expand Down Expand Up @@ -348,15 +332,13 @@ export default defineConfig([
'no-useless-return': 'error',
'object-shorthand': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-template': 'error',
radix: 'error',
'no-shadow': 'off',
'dot-notation': 'off',

// TypeScript correctness
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': [
'error',
{
Expand All @@ -367,15 +349,13 @@ export default defineConfig([
},
],
'@typescript-eslint/class-literal-property-style': 'warn',
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'never',
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' }],
'@typescript-eslint/default-param-last': 'error',
'@typescript-eslint/explicit-function-return-type': [
Expand All @@ -387,20 +367,15 @@ export default defineConfig([
},
],
'@typescript-eslint/explicit-member-accessibility': 'warn',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true }],
'@typescript-eslint/no-deprecated': 'warn',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-empty-function': [
'warn',
{
allow: ['private-constructors', 'protected-constructors', 'decoratedFunctions', 'overrideMethods'],
},
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/no-misused-promises': [
'error',
Expand All @@ -413,11 +388,10 @@ export default defineConfig([
],
'@typescript-eslint/no-mixed-enums': 'error',
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
Expand All @@ -430,18 +404,12 @@ export default defineConfig([
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'warn',
'@typescript-eslint/only-throw-error': 'error',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/require-await': 'warn',
'@typescript-eslint/restrict-template-expressions': [
'error',
Expand All @@ -457,7 +425,7 @@ export default defineConfig([
'@typescript-eslint/strict-boolean-expressions': 'warn',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/unified-signatures': 'warn',
'@typescript-eslint/unified-signatures': 'error',

// Engine-standard naming convention
'@typescript-eslint/naming-convention': [
Expand Down Expand Up @@ -1105,7 +1073,6 @@ export default defineConfig([
},
rules: {
'no-console': 'warn',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
Expand Down
1 change: 1 addition & 0 deletions packages/exojs-config/typescript/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"skipLibCheck": true
}
}
Loading