typescript-eslint 2 (#33)

* typescript-eslint 2

* Blind eslint fixes
This commit is contained in:
Jaco Greeff
2019-08-30 12:11:20 +02:00
committed by GitHub
parent d047be77b3
commit bd18b42439
7 changed files with 75 additions and 59 deletions
+12 -1
View File
@@ -1 +1,12 @@
module.exports = require('@polkadot/dev/config/eslint');
const base = require('@polkadot/dev/config/eslint');
module.exports = {
...base,
parserOptions: {
...base.parserOptions,
extraFileExtensions: ['*.d.ts'],
project: [
'./tsconfig.eslint.json'
]
}
};
+2 -2
View File
@@ -21,8 +21,8 @@
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@polkadot/dev": "^0.31.0-beta.5",
"@polkadot/util": "^1.2.0-beta.2",
"@polkadot/dev": "^0.31.0-beta.6",
"@polkadot/util": "^1.2.0-beta.3",
"override-require": "^1.1.1"
}
}
+1 -3
View File
@@ -2,9 +2,7 @@
// Copyright 2019 @polkadot/wasm-crypto authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// @ts-check
// @ts-ignore
const wasm = require('../../build/index');
const bip39 = require('./bip39');
const ed25519 = require('./ed25519');
@@ -18,7 +16,7 @@ const tests = {
...sr25519
};
async function beforeAll () {
function beforeAll () {
return wasm.waitReady();
}
-3
View File
@@ -2,14 +2,11 @@
// Copyright 2019 @polkadot/wasm-crypto authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// @ts-check
// @ts-ignore
global.WebAssembly = null;
require('override-require')(
(request) => request === './wasm_asm_stub',
// @ts-ignore
() => require('../build/wasm_asm')
);
+3 -4
View File
@@ -2,16 +2,15 @@
// Copyright 2019 @polkadot/wasm-crypto authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// @ts-check
// @ts-ignore
require('../build/crypto-polyfill');
// @ts-ignore
const { beforeAll, tests, wasm } = require('./all');
describe('schnorrkel-js', () => {
beforeEach(async () => beforeAll());
beforeEach(async () => {
await beforeAll();
});
Object.keys(tests).forEach((name) => {
it(name, () => tests[name](wasm));
+16
View File
@@ -0,0 +1,16 @@
{
"extends": "./tsconfig.json",
"include": [
"packages/**/*.d.ts",
"packages/**/*.ts",
"packages/**/*.tsx",
"packages/**/*.js",
"packages/**/*.spec.ts",
"packages/**/*.spec.js",
"*.js"
],
"compilerOptions": {
"allowJs": true,
"checkJs": true
}
}
+41 -46
View File
@@ -1799,10 +1799,10 @@
universal-user-agent "^3.0.0"
url-template "^2.0.8"
"@polkadot/dev@^0.31.0-beta.5":
version "0.31.0-beta.5"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.31.0-beta.5.tgz#8e854d1b4bc876253916c91b141de3be6d19e667"
integrity sha512-INo4EzxYJTVzGoPE1FJPR8oc9/Fa7/0t33kipXh7+D0J+qXN5bXylaHUAoi0+edrPzZeeErW+n6i2V8/LDNTPg==
"@polkadot/dev@^0.31.0-beta.6":
version "0.31.0-beta.6"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.31.0-beta.6.tgz#b2e760bec71fe831a377c9c7cf33a05174476cc8"
integrity sha512-+fV1MHWincNHAdUDeLt+PfEwWNceXR85nMjisIAnWcpzr882+dc+mC/8/rQF3LvSJZQvOUMP7ZxrEP8kX8O68Q==
dependencies:
"@babel/cli" "^7.5.5"
"@babel/core" "^7.5.5"
@@ -1817,8 +1817,8 @@
"@babel/runtime" "^7.5.5"
"@types/jest" "^24.0.18"
"@types/node" "^12.7.2"
"@typescript-eslint/eslint-plugin" "^1.13.0"
"@typescript-eslint/parser" "^1.13.0"
"@typescript-eslint/eslint-plugin" "^2.0.0"
"@typescript-eslint/parser" "^2.0.0"
babel-core "^7.0.0-bridge.0"
babel-jest "^24.9.0"
babel-plugin-module-resolver "^3.2.0"
@@ -1844,10 +1844,10 @@
typescript "^3.6.2"
vuepress "^1.0.3"
"@polkadot/util@^1.2.0-beta.2":
version "1.2.0-beta.2"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-1.2.0-beta.2.tgz#b780f1cd25d79f4e4749c58a25d4578f07e5a155"
integrity sha512-7XfbYYYgkeN7gqy0JThJMAyvgbFmijB5ya51JDwi9T3n8exhq4tkEupDMqPLM4UfNOP6spOJUdqynQESLNfKWQ==
"@polkadot/util@^1.2.0-beta.3":
version "1.2.0-beta.3"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-1.2.0-beta.3.tgz#4f88e22ef5ae31ecf937175572545c65bba66fa0"
integrity sha512-w/Sbs3Bi+rl+TcJKRNFkc9X0yFEPn2i7cH6Y43Pm05UKuMNlJKo3ilKJbGjuwYZJUDWyTqPap2pfSKraH1HDbQ==
dependencies:
"@babel/runtime" "^7.5.5"
"@types/bn.js" "^4.11.5"
@@ -1959,9 +1959,9 @@
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
"@types/node@*", "@types/node@^12.7.2":
version "12.7.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.2.tgz#c4e63af5e8823ce9cc3f0b34f7b998c2171f0c44"
integrity sha512-dyYO+f6ihZEtNPDcWNR1fkoTDf3zAK3lAABDze3mz6POyIercH0lEUawUFXlG8xaQZmm1yEBON/4TsYv/laDYg==
version "12.7.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.3.tgz#27b3f40addaf2f580459fdb405222685542f907a"
integrity sha512-3SiLAIBkDWDg6vFo0+5YJyHPWU9uwu40Qe+v+0MH8wRKYBimHvvAOyk3EzMrD/TrIlLYfXrqDqrg913PynrMJQ==
"@types/q@^1.5.1":
version "1.5.2"
@@ -1985,43 +1985,43 @@
dependencies:
"@types/yargs-parser" "*"
"@typescript-eslint/eslint-plugin@^1.13.0":
version "1.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.13.0.tgz#22fed9b16ddfeb402fd7bcde56307820f6ebc49f"
integrity sha512-WQHCozMnuNADiqMtsNzp96FNox5sOVpU8Xt4meaT4em8lOG1SrOv92/mUbEHQVh90sldKSfcOc/I0FOb/14G1g==
"@typescript-eslint/eslint-plugin@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.0.0.tgz#609a5d7b00ce21a6f94d7ef282eba9da57ca1e42"
integrity sha512-Mo45nxTTELODdl7CgpZKJISvLb+Fu64OOO2ZFc2x8sYSnUpFrBUW3H+H/ZGYmEkfnL6VkdtOSxgdt+Av79j0sA==
dependencies:
"@typescript-eslint/experimental-utils" "1.13.0"
eslint-utils "^1.3.1"
"@typescript-eslint/experimental-utils" "2.0.0"
eslint-utils "^1.4.0"
functional-red-black-tree "^1.0.1"
regexpp "^2.0.1"
tsutils "^3.7.0"
tsutils "^3.14.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"
integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==
"@typescript-eslint/experimental-utils@2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.0.0.tgz#f3d298bb411357f35c4184e24280b256b6321949"
integrity sha512-XGJG6GNBXIEx/mN4eTRypN/EUmsd0VhVGQ1AG+WTgdvjHl0G8vHhVBHrd/5oI6RRYBRnedNymSYWW1HAdivtmg==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "1.13.0"
"@typescript-eslint/typescript-estree" "2.0.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"
integrity sha512-ITMBs52PCPgLb2nGPoeT4iU3HdQZHcPaZVw+7CsFagRJHUhyeTgorEwHXhFf3e7Evzi8oujKNpHc8TONth8AdQ==
"@typescript-eslint/parser@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.0.0.tgz#4273bb19d03489daf8372cdaccbc8042e098178f"
integrity sha512-ibyMBMr0383ZKserIsp67+WnNVoM402HKkxqXGlxEZsXtnGGurbnY90pBO3e0nBUM7chEEOcxUhgw9aPq7fEBA==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "1.13.0"
"@typescript-eslint/typescript-estree" "1.13.0"
"@typescript-eslint/experimental-utils" "2.0.0"
"@typescript-eslint/typescript-estree" "2.0.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"
integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==
"@typescript-eslint/typescript-estree@2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.0.0.tgz#c9f6c0efd1b11475540d6a55dc973cc5b9a67e77"
integrity sha512-NXbmzA3vWrSgavymlzMWNecgNOuiMMp62MO3kI7awZRLRcsA1QrYWo6q08m++uuAGVbXH/prZi2y1AWuhSu63w==
dependencies:
lodash.unescape "4.0.1"
semver "5.5.0"
semver "^6.2.0"
"@vue/babel-helper-vue-jsx-merge-props@^1.0.0":
version "1.0.0"
@@ -4628,9 +4628,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.191:
version "1.3.244"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.244.tgz#7ba5461fa320ab16540a31b1d0defb7ec29b16e4"
integrity sha512-nEfPd2EKnFeLuZ/+JsRG3KixRQwWf2SPpp09ftNt5ouGhg408N759+oXvdXy57+TcM34ykfJYj2JMkc1O3R0lQ==
version "1.3.245"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.245.tgz#1829c45165853c37f74e9f6736546917f78a03d4"
integrity sha512-W1Tjm8VhabzYmiqLUD/sT/KTKkvZ8QpSkbTfLELBrFdnrolfkCgcbxFE3NXAxL5xedWXF74wWn0j6oVrgBdemw==
elliptic@^6.0.0:
version "6.5.0"
@@ -4874,7 +4874,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.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==
@@ -10123,11 +10123,6 @@ selfsigned@^1.10.4:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
semver@5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==
semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
@@ -11065,7 +11060,7 @@ tslib@^1.8.1, tslib@^1.9.0:
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:
version "3.17.1"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==