eslint-config-xo-typescript
Advanced tools
Comparing version 0.5.0 to 0.6.0
28
index.js
@@ -5,3 +5,5 @@ 'use strict'; | ||
parserOptions: { | ||
jsx: true | ||
sourceType: 'module', | ||
jsx: true, | ||
project: 'tsconfig.json' | ||
}, | ||
@@ -108,3 +110,3 @@ plugins: [ | ||
delimiter: 'semi', | ||
requireLast: true | ||
requireLast: false | ||
} | ||
@@ -121,2 +123,3 @@ } | ||
'@typescript-eslint/no-angle-bracket-type-assertion': 'error', | ||
'no-array-constructor': 'off', | ||
'@typescript-eslint/no-array-constructor': 'error', | ||
@@ -133,3 +136,8 @@ '@typescript-eslint/no-empty-interface': 'error', | ||
'@typescript-eslint/no-non-null-assertion': 'error', | ||
'@typescript-eslint/no-object-literal-type-assertion': 'error', | ||
'@typescript-eslint/no-object-literal-type-assertion': [ | ||
'error', | ||
{ | ||
allowAsParameter: true | ||
} | ||
], | ||
'@typescript-eslint/no-this-alias': [ | ||
@@ -142,3 +150,7 @@ 'error', | ||
'@typescript-eslint/no-triple-slash-reference': 'error', | ||
'@typescript-eslint/no-type-alias': 'error', | ||
// Disabled as I would like to *enforce* type aliases instead: | ||
// https://github.com/typescript-eslint/typescript-eslint/issues/142 | ||
// '@typescript-eslint/no-type-alias': 'error', | ||
'no-unused-vars': 'off', | ||
@@ -149,3 +161,2 @@ '@typescript-eslint/no-unused-vars': [ | ||
vars: 'all', | ||
varsIgnorePattern: '^React$', | ||
args: 'after-used', | ||
@@ -159,6 +170,11 @@ ignoreRestSiblings: true, | ||
'@typescript-eslint/no-var-requires': 'error', | ||
'@typescript-eslint/prefer-interface': 'error', | ||
// Disabled as I would like to *enforce* type aliases instead: | ||
// https://github.com/typescript-eslint/typescript-eslint/issues/142 | ||
// '@typescript-eslint/prefer-interface': 'error', | ||
'@typescript-eslint/prefer-namespace-keyword': 'error', | ||
'@typescript-eslint/restrict-plus-operands': 'error', | ||
'@typescript-eslint/type-annotation-spacing': 'error' | ||
} | ||
}; |
{ | ||
"name": "eslint-config-xo-typescript", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "ESLint shareable config for TypeScript to be used with eslint-config-xo", | ||
@@ -45,3 +45,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^1.0.0", | ||
"@typescript-eslint/eslint-plugin": "^1.1.0", | ||
"ava": "^1.1.0", | ||
@@ -53,3 +53,3 @@ "eslint": "^5.12.1", | ||
"peerDependencies": { | ||
"@typescript-eslint/eslint-plugin": ">=1.0.0", | ||
"@typescript-eslint/eslint-plugin": ">=1.1.0", | ||
"eslint": ">=5.12.1", | ||
@@ -56,0 +56,0 @@ "typescript": ">=3.2.4" |
@@ -15,3 +15,3 @@ # eslint-config-xo-typescript [![Build Status](https://travis-ci.org/xojs/eslint-config-xo-typescript.svg?branch=master)](https://travis-ci.org/xojs/eslint-config-xo-typescript) | ||
Add some ESLint config to your package.json: | ||
Add some ESLint config to your package.json (or `.eslintrc`): | ||
@@ -30,10 +30,16 @@ ```json | ||
Or to .eslintrc: | ||
*Note:* If your `tsconfig.json` is not in the same directory as `package.json`, you will have to set the path yourself: | ||
```json | ||
{ | ||
"extends": [ | ||
"xo", | ||
"xo-typescript" | ||
] | ||
"name": "my-awesome-project", | ||
"eslintConfig": { | ||
"extends": [ | ||
"xo", | ||
"xo-typescript" | ||
], | ||
"parserOptions": { | ||
"project": "some-path/tsconfig.json" | ||
} | ||
} | ||
} | ||
@@ -40,0 +46,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
7468
166
77