Skip to content
This repository was archived by the owner on Mar 29, 2020. It is now read-only.

Commit 10d1d0c

Browse files
committed
fix(typescript): upgrade typescript plugin and parser
1 parent ccc4fc6 commit 10d1d0c

File tree

3 files changed

+78
-58
lines changed

3 files changed

+78
-58
lines changed

packages/eslint-config-typescript/index.js

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
2-
plugins: ['typescript'],
3-
parser: 'typescript-eslint-parser',
2+
extends: ['prettier/@typescript-eslint'],
3+
plugins: ['@typescript-eslint'],
4+
parser: '@typescript-eslint/parser',
45
settings: {
56
'import/resolver': {
67
typescript: {
@@ -46,32 +47,35 @@ module.exports = {
4647
'import/no-named-as-default-member': 'off', // conflicts with typescript
4748
'import/no-named-as-default': 'off', // conflicts with typescript
4849
// https://github.com/nzakas/eslint-plugin-typescript
49-
'typescript/adjacent-overload-signatures': 'off', // TSLint is better at this
50-
'typescript/class-name-casing': 'off', // TSLint is better at this
51-
'typescript/explicit-function-return-type': 'off',
52-
'typescript/explicit-member-accessibility': 'off', // TSLint is better at this
53-
'typescript/generic-type-naming': ['error', '^([TUKV]|T[A-Z][a-zA-Z]+)$'],
54-
'typescript/interface-name-prefix': 'off', // TSLint is better at this
55-
'typescript/member-delimiter-style': 'off',
56-
'typescript/member-naming': 'off',
57-
'typescript/member-ordering': 'off', // type annotations should come first
58-
'typescript/no-angle-bracket-type-assertion': 'off', // TSLint is better at this
59-
'typescript/no-array-constructor': 'error',
60-
'typescript/no-empty-interface': 'off', // TSLint is better at this
61-
'typescript/no-explicit-any': 'off', // TSLint is better at this
62-
'typescript/no-inferrable-types': 'off', // TSLint is better at this
63-
'typescript/no-namespace': 'off', // TSLint is better at this
64-
'typescript/no-non-null-assertion': 'off', // TSLint is better at this
65-
'typescript/no-parameter-properties': 'off', // TSLint is better at this
66-
'typescript/no-triple-slash-reference': 'off', // TSLint is better at this
67-
'typescript/no-type-alias': 'off', // TSLint is better at this
68-
'typescript/no-unused-vars': 'error',
69-
'typescript/no-var-requires': 'off', // TSLint is better at this
70-
'typescript/no-use-before-define': [
50+
'@typescript-eslint/adjacent-overload-signatures': 'off', // TSLint is better at this
51+
'@typescript-eslint/class-name-casing': 'off', // TSLint is better at this
52+
'@typescript-eslint/explicit-function-return-type': 'off',
53+
'@typescript-eslint/explicit-member-accessibility': 'off', // TSLint is better at this
54+
'@typescript-eslint/generic-type-naming': [
55+
'error',
56+
'^([TUKV]|T[A-Z][a-zA-Z]+)$',
57+
],
58+
'@typescript-eslint/interface-name-prefix': 'off', // TSLint is better at this
59+
'@typescript-eslint/member-delimiter-style': 'off',
60+
'@typescript-eslint/member-naming': 'off',
61+
'@typescript-eslint/member-ordering': 'off', // type annotations should come first
62+
'@typescript-eslint/no-angle-bracket-type-assertion': 'off', // TSLint is better at this
63+
'@typescript-eslint/no-array-constructor': 'error',
64+
'@typescript-eslint/no-empty-interface': 'off', // TSLint is better at this
65+
'@typescript-eslint/no-explicit-any': 'off', // TSLint is better at this
66+
'@typescript-eslint/no-inferrable-types': 'off', // TSLint is better at this
67+
'@typescript-eslint/no-namespace': 'off', // TSLint is better at this
68+
'@typescript-eslint/no-non-null-assertion': 'off', // TSLint is better at this
69+
'@typescript-eslint/no-parameter-properties': 'off', // TSLint is better at this
70+
'@typescript-eslint/no-triple-slash-reference': 'off', // TSLint is better at this
71+
'@typescript-eslint/no-type-alias': 'off', // TSLint is better at this
72+
'@typescript-eslint/no-unused-vars': 'error',
73+
'@typescript-eslint/no-var-requires': 'off', // TSLint is better at this
74+
'@typescript-eslint/no-use-before-define': [
7175
'error',
7276
{functions: true, classes: true, variables: true},
7377
],
74-
'typescript/prefer-namespace-keyword': 'off', // TSLint is better at this
75-
'typescript/type-annotation-spacing': 'off', // not necessary with prettier
78+
'@typescript-eslint/prefer-namespace-keyword': 'off', // TSLint is better at this
79+
'@typescript-eslint/type-annotation-spacing': 'off', // not necessary with prettier
7680
},
7781
};

packages/eslint-config-typescript/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@
3939
"typescript": "*"
4040
},
4141
"dependencies": {
42+
"@typescript-eslint/eslint-plugin": "^1.3.0",
43+
"@typescript-eslint/parser": "^1.3.0",
4244
"eslint-import-resolver-typescript": "^1.1.1",
43-
"eslint-plugin-import": "^2.16.0",
44-
"eslint-plugin-typescript": "^0.14.0",
45-
"typescript-eslint-parser": "^21.0.2"
45+
"eslint-plugin-import": "^2.16.0"
4646
},
47-
"devDependencies": {}
47+
"devDependencies": {
48+
"typescript": "^3.3.3"
49+
}
4850
}

yarn.lock

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,32 @@
465465
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
466466
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
467467

468+
"@typescript-eslint/eslint-plugin@^1.3.0":
469+
version "1.3.0"
470+
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.3.0.tgz#e64c859a3eec10d96731eb5f72b5f48796a2f9ad"
471+
integrity sha512-s+vjO9+PvYS2A6FnQC/imyEDOkrEKIzSpPf2OEGnkKqa5+1d0cuXgCi/oROtuBht2/u/iK22nrYcO/Ei4R8F/g==
472+
dependencies:
473+
"@typescript-eslint/parser" "1.3.0"
474+
requireindex "^1.2.0"
475+
tsutils "^3.7.0"
476+
477+
"@typescript-eslint/parser@1.3.0", "@typescript-eslint/parser@^1.3.0":
478+
version "1.3.0"
479+
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.3.0.tgz#e61e795aa050351b7312a757e0864b6d90b84078"
480+
integrity sha512-Q5cz9nyEQyRrtItRElvQXdNs0Xja1xvOdphDQR7N6MqUdi4juWVNxHKypdHQCx9OcEBev6pWHOda8lwg/2W9/g==
481+
dependencies:
482+
"@typescript-eslint/typescript-estree" "1.3.0"
483+
eslint-scope "^4.0.0"
484+
eslint-visitor-keys "^1.0.0"
485+
486+
"@typescript-eslint/typescript-estree@1.3.0":
487+
version "1.3.0"
488+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.3.0.tgz#1d1f36680e5c32c3af38c1180153f018152f65f9"
489+
integrity sha512-h6UxHSmBUopFcxHg/eryrA+GwHMbh7PxotMbkq9p2f3nX60CKm5Zc0VN8krBD3IS5KqsK0iOz24VpEWrP+JZ2Q==
490+
dependencies:
491+
lodash.unescape "4.0.1"
492+
semver "5.5.0"
493+
468494
JSONStream@^1.0.4, JSONStream@^1.3.4:
469495
version "1.3.5"
470496
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
@@ -2261,13 +2287,6 @@ eslint-plugin-sort-imports-es6-autofix@^0.3.0:
22612287
dependencies:
22622288
eslint "^4.15.0"
22632289

2264-
eslint-plugin-typescript@^0.14.0:
2265-
version "0.14.0"
2266-
resolved "https://registry.yarnpkg.com/eslint-plugin-typescript/-/eslint-plugin-typescript-0.14.0.tgz#068549c3f4c7f3f85d88d398c29fa96bf500884c"
2267-
integrity sha512-2u1WnnDF2mkWWgU1lFQ2RjypUlmRoBEvQN02y9u+IL12mjWlkKFGEBnVsjs9Y8190bfPQCvWly1c2rYYUSOxWw==
2268-
dependencies:
2269-
requireindex "~1.1.0"
2270-
22712290
eslint-plugin-unicorn@^7.1.0:
22722291
version "7.1.0"
22732292
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-7.1.0.tgz#9efef5c68fde0ebefb0241fbcfa274f1b959c04e"
@@ -6596,10 +6615,10 @@ require-uncached@^1.0.3:
65966615
caller-path "^0.1.0"
65976616
resolve-from "^1.0.0"
65986617

6599-
requireindex@~1.1.0:
6600-
version "1.1.0"
6601-
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162"
6602-
integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI=
6618+
requireindex@^1.2.0:
6619+
version "1.2.0"
6620+
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef"
6621+
integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==
66036622

66046623
resolve-cwd@^2.0.0:
66056624
version "2.0.0"
@@ -7602,11 +7621,18 @@ tsconfig-paths@^3.6.0:
76027621
minimist "^1.2.0"
76037622
strip-bom "^3.0.0"
76047623

7605-
tslib@^1.9.0:
7624+
tslib@^1.8.1, tslib@^1.9.0:
76067625
version "1.9.3"
76077626
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
76087627
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
76097628

7629+
tsutils@^3.7.0:
7630+
version "3.8.0"
7631+
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.8.0.tgz#7a3dbadc88e465596440622b65c04edc8e187ae5"
7632+
integrity sha512-XQdPhgcoTbCD8baXC38PQ0vpTZ8T3YrE+vR66YIj/xvDt1//8iAhafpIT/4DmvzzC1QFapEImERu48Pa01dIUA==
7633+
dependencies:
7634+
tslib "^1.8.1"
7635+
76107636
tunnel-agent@^0.6.0:
76117637
version "0.6.0"
76127638
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
@@ -7631,22 +7657,10 @@ typedarray@^0.0.6:
76317657
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
76327658
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
76337659

7634-
typescript-eslint-parser@^21.0.2:
7635-
version "21.0.2"
7636-
resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-21.0.2.tgz#270af10e4724528677fbcf34ea495284bec3a894"
7637-
integrity sha512-u+pj4RVJBr4eTzj0n5npoXD/oRthvfUCjSKndhNI714MG0mQq2DJw5WP7qmonRNIFgmZuvdDOH3BHm9iOjIAfg==
7638-
dependencies:
7639-
eslint-scope "^4.0.0"
7640-
eslint-visitor-keys "^1.0.0"
7641-
typescript-estree "5.3.0"
7642-
7643-
typescript-estree@5.3.0:
7644-
version "5.3.0"
7645-
resolved "https://registry.yarnpkg.com/typescript-estree/-/typescript-estree-5.3.0.tgz#fb6c977b5e21073eb16cbdc0338a7f752da99ff5"
7646-
integrity sha512-Vu0KmYdSCkpae+J48wsFC1ti19Hq3Wi/lODUaE+uesc3gzqhWbZ5itWbsjylLVbjNW4K41RqDzSfnaYNbmEiMQ==
7647-
dependencies:
7648-
lodash.unescape "4.0.1"
7649-
semver "5.5.0"
7660+
typescript@^3.3.3:
7661+
version "3.3.3"
7662+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3.tgz#f1657fc7daa27e1a8930758ace9ae8da31403221"
7663+
integrity sha512-Y21Xqe54TBVp+VDSNbuDYdGw0BpoR/Q6wo/+35M8PAU0vipahnyduJWirxxdxjsAkS7hue53x2zp8gz7F05u0A==
76507664

76517665
uglify-js@^3.1.4:
76527666
version "3.4.9"

0 commit comments

Comments
 (0)