Skip to content
Permalink
Browse files

add linting for TS

  • Loading branch information
Thomas Gnandt
Thomas Gnandt committed Sep 6, 2019
1 parent 5665d4a commit 797ef8603ab1fbc187a89b8f6bdd7e606e92ce95
Showing with 60 additions and 6 deletions.
  1. +14 −2 .eslintrc
  2. +3 −1 package.json
  3. +1 −1 packages/react-async/src/Async.tsx
  4. +42 −2 yarn.lock
@@ -20,5 +20,17 @@
"react": {
"version": "detect"
}
}
}
},
"overrides": [{
"files": "packages/**/*.{ts,tsx}",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
}
}]
}
@@ -15,7 +15,7 @@
"start": "run-p start:*",
"start:examples": "now dev",
"start:storybook": "start-storybook -p 6006",
"lint": "eslint packages/*/src/*.js",
"lint": "eslint packages/*/src/*.{j,t}{s,sx}",
"test": "jest packages/*/src/*.spec.js",
"test:watch": "yarn test -- --watch",
"test:devtools": "jest react-async-devtools/src",
@@ -51,6 +51,8 @@
"@storybook/react": "5.2.0-rc.2",
"@testing-library/jest-dom": "4.1.0",
"@testing-library/react": "9.1.3",
"@typescript-eslint/eslint-plugin": "^2.1.0",
"@typescript-eslint/parser": "^2.1.0",
"babel-eslint": "10.0.3",
"babel-jest": "24.9.0",
"babel-loader": "8.0.6",
@@ -172,7 +172,7 @@ export const createInstance = <T extends {}>(

type Props = AsyncProps<T>

const Async: AsyncConstructor<T> = class extends React.Component<Props, AsyncState<T>> {
const Async: AsyncConstructor<T> = class Async extends React.Component<Props, AsyncState<T>> {
private mounted = false
private counter = 0
private args: any[] = []
@@ -3281,6 +3281,17 @@
regexpp "^2.0.1"
tsutils "^3.7.0"

"@typescript-eslint/eslint-plugin@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.1.0.tgz#4bcd978d88419ea971613675f2620dde39920d69"
integrity sha512-3i/dLPwxaVfCsaLu3HkB8CAA1Uw3McAegrTs+VBJ0BrGRKW7nUwSqRfHfCS7sw7zSbf62q3v0v6pOS8MyaYItg==
dependencies:
"@typescript-eslint/experimental-utils" "2.1.0"
eslint-utils "^1.4.0"
functional-red-black-tree "^1.0.1"
regexpp "^2.0.1"
tsutils "^3.14.0"

"@typescript-eslint/experimental-utils@1.13.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"
@@ -3290,6 +3301,15 @@
"@typescript-eslint/typescript-estree" "1.13.0"
eslint-scope "^4.0.0"

"@typescript-eslint/experimental-utils@2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.1.0.tgz#0837229f0e75a32db0db9bf662ad0eface914453"
integrity sha512-ZJGLYXa4nxjNzomaEk1qts38B/vludg2LOM7dRc7SppEKsMPTS1swaTKS/pom+x4d/luJGoG00BDIss7PR1NQA==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.1.0"
eslint-scope "^4.0.0"

"@typescript-eslint/parser@1.13.0":
version "1.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355"
@@ -3300,6 +3320,16 @@
"@typescript-eslint/typescript-estree" "1.13.0"
eslint-visitor-keys "^1.0.0"

"@typescript-eslint/parser@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.1.0.tgz#ca62b26fa6a5a34ecdec4a000f22baf103791830"
integrity sha512-0+hzirRJoqE1T4lSSvCfKD+kWjIpDWfbGBiisK5CENcr+22pPkHB2sfV1giON+UxHV4A08SSrQonZk7X2zIQdw==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "2.1.0"
"@typescript-eslint/typescript-estree" "2.1.0"
eslint-visitor-keys "^1.0.0"

"@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"
@@ -3308,6 +3338,16 @@
lodash.unescape "4.0.1"
semver "5.5.0"

"@typescript-eslint/typescript-estree@2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.1.0.tgz#88e676cc9760516711f6fe43958adc31b93de8e5"
integrity sha512-482ErJJ7QYghBh+KA9G+Fwcuk/PLTy+9NBMz8S+6UFrUUnVvHRNAL7I70kdws2te0FBYEZW7pkDaXoT+y8UARw==
dependencies:
glob "^7.1.4"
is-glob "^4.0.1"
lodash.unescape "4.0.1"
semver "^6.2.0"

"@unimodules/core@~3.0.0":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@unimodules/core/-/core-3.0.2.tgz#a2b143fb1e743809ba17c60ae1848f82b8637901"
@@ -7305,7 +7345,7 @@ eslint-scope@^5.0.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint-utils@^1.3.1, eslint-utils@^1.4.2:
eslint-utils@^1.3.1, eslint-utils@^1.4.0, eslint-utils@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab"
integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==

tsutils@^3.7.0:
tsutils@^3.14.0, tsutils@^3.7.0:
version "3.17.1"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==

0 comments on commit 797ef86

Please sign in to comment.
You can’t perform that action at this time.