eslint-config-xo-typescript
Advanced tools
Comparing version 1.0.1 to 2.0.0
24
index.js
@@ -167,2 +167,8 @@ 'use strict'; | ||
}, | ||
Buffer: { | ||
message: 'Use Uint8Array instead. See: https://sindresorhus.com/blog/goodbye-nodejs-buffer', | ||
suggest: [ | ||
'Uint8Array' | ||
] | ||
}, | ||
'[]': 'Don\'t use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.', | ||
@@ -363,3 +369,3 @@ '[[]]': 'Don\'t use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.', | ||
// Disabled for now as it causes too many weird TypeScript issues. I'm not sure whether the problems are caused by bugs in TS or problems in my types. | ||
// TODO: Try to re-enable this again in 2023. | ||
// TODO: Try to re-enable this again in 2026. | ||
// '@typescript-eslint/method-signature-style': 'error', | ||
@@ -377,2 +383,3 @@ | ||
'@typescript-eslint/no-array-constructor': 'error', | ||
'@typescript-eslint/no-array-delete': 'error', | ||
'no-dupe-class-members': 'off', | ||
@@ -393,3 +400,3 @@ '@typescript-eslint/no-dupe-class-members': 'error', | ||
// TODO: Try to enable this again in 2023. | ||
// TODO: Try to enable this again in 2025. | ||
// Disabled for now. This is a great rule. It's just that TypeScript is not good enough yet to not use `any` in many places. | ||
@@ -518,3 +525,3 @@ // For example: https://github.com/sindresorhus/refined-github/pull/2391#discussion_r318995182 | ||
// TODO: Try to enable this again in 2023 *if* the following are resolved: | ||
// TODO: Try to enable this again in 2025 *if* the following are resolved: | ||
// - https://github.com/microsoft/TypeScript/issues/36393 | ||
@@ -583,2 +590,3 @@ // - The rule needs a way to ignore runtime type-checks: https://github.com/sindresorhus/refined-github/pull/3168 | ||
'@typescript-eslint/prefer-as-const': 'error', | ||
'@typescript-eslint/prefer-find': 'error', | ||
'@typescript-eslint/prefer-for-of': 'error', | ||
@@ -598,2 +606,4 @@ '@typescript-eslint/prefer-function-type': 'error', | ||
'@typescript-eslint/prefer-optional-chain': 'error', | ||
'prefer-promise-reject-errors': 'off', | ||
'@typescript-eslint/prefer-promise-reject-errors': 'error', | ||
'@typescript-eslint/prefer-readonly': 'error', | ||
@@ -678,3 +688,9 @@ | ||
'@typescript-eslint/switch-exhaustiveness-check': 'error', | ||
'@typescript-eslint/switch-exhaustiveness-check': [ | ||
'error', | ||
{ | ||
allowDefaultCaseForExhaustiveSwitch: false, | ||
requireDefaultForNonUnion: true | ||
} | ||
], | ||
'@typescript-eslint/triple-slash-reference': [ | ||
@@ -681,0 +697,0 @@ 'error', |
{ | ||
"name": "eslint-config-xo-typescript", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "ESLint shareable config for TypeScript to be used with eslint-config-xo", | ||
@@ -13,4 +13,5 @@ "license": "MIT", | ||
}, | ||
"sideEffects": false, | ||
"engines": { | ||
"node": ">=16" | ||
"node": ">=18" | ||
}, | ||
@@ -48,14 +49,14 @@ "scripts": { | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
"@typescript-eslint/parser": "^6.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.21.0", | ||
"@typescript-eslint/parser": "^6.21.0", | ||
"ava": "^2.4.0", | ||
"eslint": "^8.0.0", | ||
"typescript": "^5.1.6" | ||
"eslint": "^8.56.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
"peerDependencies": { | ||
"@typescript-eslint/eslint-plugin": ">=6.0.0", | ||
"@typescript-eslint/parser": ">=6.0.0", | ||
"eslint": ">=8.0.0", | ||
"typescript": ">=4.7" | ||
"@typescript-eslint/eslint-plugin": ">=6.21.0", | ||
"@typescript-eslint/parser": ">=6.21.0", | ||
"eslint": ">=8.56.0", | ||
"typescript": ">=5.0.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26480
728