Skip to content

Commit

Permalink
chore: Use '@typescript-eslint/parser' for ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
smockle committed Jan 26, 2021
1 parent ef17a86 commit 43299b9
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 20 deletions.
39 changes: 19 additions & 20 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"parser": "@babel/eslint-parser",
"extends": [
"plugin:github/recommended",
"plugin:github/browser",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser",
"extends": ["plugin:react/recommended", "plugin:jsx-a11y/recommended", "plugin:react-hooks/recommended"],
"globals": {
"__DEV__": "readonly"
},
Expand All @@ -17,24 +11,29 @@
"jest": true,
"node": true
},
// rules which apply to JS, TS, etc.
"rules": {
"react/prop-types": 0,
"react/display-name": 0,
"import/no-namespace": 0,
"no-shadow": 0,
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true
}
],
"eslint-comments/no-use": 0,
"react-hooks/exhaustive-deps": "error",
"jsx-a11y/label-has-for": [
2,
{
"components": []
"jsx-a11y/label-has-for": [2, {"components": []}]
},
"overrides": [
// rules which apply only to JS
{
"files": ["**/*.js", "**/*.jsx"],
"extends": ["plugin:github/recommended", "plugin:github/browser"],
"rules": {
"no-unused-vars": ["error", {"ignoreRestSiblings": true}]
}
]
}
},
// rules which apply only to TS
{
"files": ["**/*.ts", "**/*.tsx"],
"extends": ["plugin:@typescript-eslint/recommended"]
}
]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
"@testing-library/user-event": "12.6.0",
"@types/jest": "26.0.20",
"@types/jest-axe": "3.5.1",
"@typescript-eslint/eslint-plugin": "4.14.1",
"@typescript-eslint/parser": "4.14.1",
"@wojtekmaj/enzyme-adapter-react-17": "0.3.2",
"babel-core": "7.0.0-bridge.0",
"babel-plugin-add-react-displayname": "0.0.5",
Expand Down
71 changes: 71 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2067,6 +2067,20 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.1.tgz#22dd301ce228aaab3416b14ead10b1db3e7d3180"
integrity sha512-5JriGbYhtqMS1kRcZTQxndz1lKMwwEXKbwZbkUZNnp6MJX0+OVXnG0kOlBZP4LUAxEyzu3cs+EXd/97MJXsGfw==
dependencies:
"@typescript-eslint/experimental-utils" "4.14.1"
"@typescript-eslint/scope-manager" "4.14.1"
debug "^4.1.1"
functional-red-black-tree "^1.0.1"
lodash "^4.17.15"
regexpp "^3.0.0"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/eslint-plugin@>=2.25.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.0.tgz#92db8e7c357ed7d69632d6843ca70b71be3a721d"
Expand All @@ -2093,6 +2107,18 @@
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/experimental-utils@4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.1.tgz#a5c945cb24dabb96747180e1cfc8487f8066f471"
integrity sha512-2CuHWOJwvpw0LofbyG5gvYjEyoJeSvVH2PnfUQSn0KQr4v8Dql2pr43ohmx4fdPQ/eVoTSFjTi/bsGEXl/zUUQ==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/scope-manager" "4.14.1"
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/typescript-estree" "4.14.1"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/experimental-utils@^1.13.0":
version "1.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e"
Expand All @@ -2102,6 +2128,16 @@
"@typescript-eslint/typescript-estree" "1.13.0"
eslint-scope "^4.0.0"

"@typescript-eslint/parser@4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.1.tgz#3bd6c24710cd557d8446625284bcc9c6d52817c6"
integrity sha512-mL3+gU18g9JPsHZuKMZ8Z0Ss9YP1S5xYZ7n68Z98GnPq02pYNQuRXL85b9GYhl6jpdvUc45Km7hAl71vybjUmw==
dependencies:
"@typescript-eslint/scope-manager" "4.14.1"
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/typescript-estree" "4.14.1"
debug "^4.1.1"

"@typescript-eslint/parser@>=2.25.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.0.tgz#62d4cd2079d5c06683e9bfb200c758f292c4dee7"
Expand All @@ -2120,11 +2156,24 @@
"@typescript-eslint/types" "4.14.0"
"@typescript-eslint/visitor-keys" "4.14.0"

"@typescript-eslint/scope-manager@4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.1.tgz#8444534254c6f370e9aa974f035ced7fe713ce02"
integrity sha512-F4bjJcSqXqHnC9JGUlnqSa3fC2YH5zTtmACS1Hk+WX/nFB0guuynVK5ev35D4XZbdKjulXBAQMyRr216kmxghw==
dependencies:
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/visitor-keys" "4.14.1"

"@typescript-eslint/types@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.0.tgz#d8a8202d9b58831d6fd9cee2ba12f8a5a5dd44b6"
integrity sha512-VsQE4VvpldHrTFuVPY1ZnHn/Txw6cZGjL48e+iBxTi2ksa9DmebKjAeFmTVAYoSkTk7gjA7UqJ7pIsyifTsI4A==

"@typescript-eslint/types@4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.1.tgz#b3d2eb91dafd0fd8b3fce7c61512ac66bd0364aa"
integrity sha512-SkhzHdI/AllAgQSxXM89XwS1Tkic7csPdndUuTKabEwRcEfR8uQ/iPA3Dgio1rqsV3jtqZhY0QQni8rLswJM2w==

"@typescript-eslint/typescript-estree@1.13.0":
version "1.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e"
Expand All @@ -2147,6 +2196,20 @@
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/typescript-estree@4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.1.tgz#20d3b8c8e3cdc8f764bdd5e5b0606dd83da6075b"
integrity sha512-M8+7MbzKC1PvJIA8kR2sSBnex8bsR5auatLCnVlNTJczmJgqRn8M+sAlQfkEq7M4IY3WmaNJ+LJjPVRrREVSHQ==
dependencies:
"@typescript-eslint/types" "4.14.1"
"@typescript-eslint/visitor-keys" "4.14.1"
debug "^4.1.1"
globby "^11.0.1"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/visitor-keys@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.0.tgz#b1090d9d2955b044b2ea2904a22496849acbdf54"
Expand All @@ -2155,6 +2218,14 @@
"@typescript-eslint/types" "4.14.0"
eslint-visitor-keys "^2.0.0"

"@typescript-eslint/visitor-keys@4.14.1":
version "4.14.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.1.tgz#e93c2ff27f47ee477a929b970ca89d60a117da91"
integrity sha512-TAblbDXOI7bd0C/9PE1G+AFo7R5uc+ty1ArDoxmrC1ah61Hn6shURKy7gLdRb1qKJmjHkqu5Oq+e4Kt0jwf1IA==
dependencies:
"@typescript-eslint/types" "4.14.1"
eslint-visitor-keys "^2.0.0"

"@webassemblyjs/ast@1.9.0":
version "1.9.0"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964"
Expand Down

0 comments on commit 43299b9

Please sign in to comment.