eslint-config-xo-typescript
Advanced tools
Comparing version 0.24.1 to 0.25.0
109
index.js
@@ -88,13 +88,12 @@ 'use strict'; | ||
], | ||
camelcase: 'off', | ||
'@typescript-eslint/camelcase': [ | ||
'comma-spacing': 'off', | ||
'@typescript-eslint/comma-spacing': [ | ||
'error', | ||
{ | ||
properties: 'always', | ||
genericType: 'always', | ||
ignoreDestructuring: false | ||
before: false, | ||
after: true | ||
} | ||
], | ||
'@typescript-eslint/class-name-casing': 'error', | ||
'default-param-last': 'off', | ||
'@typescript-eslint/default-param-last': 'error', | ||
'@typescript-eslint/consistent-type-assertions': [ | ||
@@ -122,6 +121,13 @@ 'error', | ||
], | ||
'@typescript-eslint/generic-type-naming': [ | ||
'error', | ||
/^T$|^[A-Z][a-zA-Z]+$/.source | ||
], | ||
// Disabled for now as it has too many false-positives. | ||
// '@typescript-eslint/explicit-module-boundary-types': [ | ||
// 'error', | ||
// { | ||
// allowTypedFunctionExpressions: true, | ||
// allowHigherOrderFunctions: true, | ||
// allowDirectConstAssertionInArrowFunctions: true | ||
// } | ||
// ], | ||
'func-call-spacing': 'off', | ||
@@ -140,6 +146,2 @@ '@typescript-eslint/func-call-spacing': [ | ||
], | ||
'@typescript-eslint/interface-name-prefix': [ | ||
'error', | ||
'never' | ||
], | ||
'@typescript-eslint/member-delimiter-style': [ | ||
@@ -158,11 +160,64 @@ 'error', | ||
], | ||
'@typescript-eslint/member-naming': [ | ||
'error', | ||
{ | ||
private: /^_/.source | ||
} | ||
], | ||
'@typescript-eslint/member-ordering': 'error', | ||
// We use `@typescript-eslint/naming-convention` in favor of `camelcase`. | ||
camelcase: 'off', | ||
// TODO: Enable this again when the following is fixed: | ||
// - https://github.com/typescript-eslint/typescript-eslint/issues/1483 | ||
// - https://github.com/typescript-eslint/typescript-eslint/issues/1485 | ||
// - https://github.com/typescript-eslint/typescript-eslint/issues/1484 | ||
// TODO: Prevent `_` prefix on private fields when TypeScript 3.8 is out. | ||
// '@typescript-eslint/naming-convention': [ | ||
// 'error', | ||
// { | ||
// selector: 'default', | ||
// format: [ | ||
// 'strictCamelCase' | ||
// ], | ||
// leadingUnderscore: 'allow', | ||
// trailingUnderscore: 'allow' | ||
// }, | ||
// { | ||
// selector: 'typeLike', | ||
// format: [ | ||
// 'StrictPascalCase' | ||
// ] | ||
// }, | ||
// { | ||
// selector: 'variable', | ||
// types: [ | ||
// 'boolean' | ||
// ], | ||
// format: [ | ||
// 'StrictPascalCase' | ||
// ], | ||
// prefix: [ | ||
// 'is', | ||
// 'has', | ||
// 'can', | ||
// 'should', | ||
// 'will', | ||
// 'did' | ||
// ] | ||
// }, | ||
// { | ||
// // Interface name should not be prefixed with `I`. | ||
// selector: 'interface', | ||
// filter: /^(?!I)[A-Z]/.source, | ||
// format: [ | ||
// 'StrictPascalCase' | ||
// ] | ||
// }, | ||
// { | ||
// // Type parameter name should either be `T` or a descriptive name. | ||
// selector: 'typeParameter', | ||
// filter: /^T$|^[A-Z][a-zA-Z]+$/.source, | ||
// format: [ | ||
// 'StrictPascalCase' | ||
// ] | ||
// } | ||
// ], | ||
'no-array-constructor': 'off', | ||
'@typescript-eslint/no-array-constructor': 'error', | ||
'no-dupe-class-members': 'off', | ||
'@typescript-eslint/no-dupe-class-members': 'error', | ||
'@typescript-eslint/no-dynamic-delete': 'error', | ||
@@ -237,2 +292,4 @@ 'no-empty-function': 'off', | ||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error', | ||
// Disabled until this is resolved: | ||
@@ -253,2 +310,3 @@ // https://github.com/typescript-eslint/typescript-eslint/issues/202 | ||
'@typescript-eslint/no-throw-literal': 'error', | ||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', | ||
@@ -260,3 +318,4 @@ // TODO: Reconsider enabling this again in 2020. | ||
// { | ||
// ignoreRhs: true | ||
// ignoreRhs: true, | ||
// checkArrayPredicates: true | ||
// } | ||
@@ -268,3 +327,2 @@ // ], | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
'@typescript-eslint/no-untyped-public-signature': 'error', | ||
'no-unused-expressions': 'off', | ||
@@ -291,2 +349,3 @@ '@typescript-eslint/no-unused-expressions': 'error', | ||
'@typescript-eslint/no-var-requires': 'error', | ||
'@typescript-eslint/prefer-as-const': 'error', | ||
'@typescript-eslint/prefer-for-of': 'error', | ||
@@ -346,6 +405,8 @@ '@typescript-eslint/prefer-function-type': 'error', | ||
// { | ||
// allowNullable: true | ||
// allowNullable: true, | ||
// allowSafe: true | ||
// } | ||
// ], | ||
'@typescript-eslint/switch-exhaustiveness-check': 'error', | ||
'@typescript-eslint/triple-slash-reference': [ | ||
@@ -352,0 +413,0 @@ 'error', |
{ | ||
"name": "eslint-config-xo-typescript", | ||
"version": "0.24.1", | ||
"version": "0.25.0", | ||
"description": "ESLint shareable config for TypeScript to be used with eslint-config-xo", | ||
@@ -46,11 +46,11 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^2.13.0", | ||
"@typescript-eslint/parser": "^2.13.0", | ||
"@typescript-eslint/eslint-plugin": "^2.19.0", | ||
"@typescript-eslint/parser": "^2.19.0", | ||
"ava": "^2.4.0", | ||
"eslint": "^6.8.0", | ||
"temp-write": "^4.0.0", | ||
"typescript": "^3.7.4" | ||
"typescript": "^3.7.5" | ||
}, | ||
"peerDependencies": { | ||
"@typescript-eslint/eslint-plugin": ">=2.13.0", | ||
"@typescript-eslint/eslint-plugin": ">=2.19.0", | ||
"eslint": ">=6.6.0", | ||
@@ -57,0 +57,0 @@ "typescript": ">=3.5.3" |
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
15711
402