Remove tslint
This commit is contained in:
parent
74db239571
commit
4b7a060a4b
@ -55,8 +55,6 @@
|
||||
"prettier": "^1.19.1",
|
||||
"shx": "^0.3.2",
|
||||
"source-map-support": "^0.5.6",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "~3.7",
|
||||
"webpack": "^4.12.0",
|
||||
"webpack-cli": "^3.3.8"
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"scripts": {
|
||||
"docs": "shx rm -rf docs && typedoc --options typedoc.js",
|
||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
||||
"move-types": "shx rm -rf ./types/* && shx mv build/types/* ./types && rm -rf ./types/testdata && shx rm -f ./types/*.spec.d.ts",
|
||||
"format-types": "prettier --write --loglevel warn \"./types/**/*.d.ts\"",
|
||||
|
||||
@ -32,9 +32,7 @@ export interface Erc20Token {
|
||||
readonly fractionalDigits: number;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
const maxAcct = 1 << 23;
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
const maxSeq = 1 << 20;
|
||||
|
||||
// this (lossily) encodes the two pieces of info (uint64) needed to sign into
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "../../tslint.json"
|
||||
}
|
||||
@ -17,7 +17,7 @@
|
||||
"scripts": {
|
||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||
"format-text": "prettier --write --prose-wrap always --print-width 80 \"./*.md\"",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
||||
"build": "tsc",
|
||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||
"selftest": "yarn build-or-skip && ./bin/cosmwasm-cli --selftest",
|
||||
|
||||
@ -22,7 +22,6 @@ export function wrapInAsyncFunction(code: string): string {
|
||||
}
|
||||
|
||||
// Remove var, let, const from variable declarations to make them available in context
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
ast.program.body[0].expression.callee.body.body = body.map((node: any) => {
|
||||
if (node.type === "VariableDeclaration") {
|
||||
return {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { ArgumentParser } from "argparse";
|
||||
// tslint:disable-next-line:no-submodule-imports
|
||||
import colors = require("colors/safe");
|
||||
import * as fs from "fs";
|
||||
import { join } from "path";
|
||||
|
||||
import { TsRepl } from "./tsrepl";
|
||||
|
||||
import colors = require("colors/safe");
|
||||
|
||||
export function main(originalArgs: readonly string[]): void {
|
||||
const parser = new ArgumentParser({ description: "The CosmWasm REPL" });
|
||||
parser.addArgument("--version", {
|
||||
|
||||
@ -52,7 +52,6 @@ describe("Helpers", () => {
|
||||
expect(executeJavaScript("module.exports.fooTest = 'bar'", "myfile.js", context)).toEqual("bar");
|
||||
expect(executeJavaScript("module.exports.fooTest", "myfile.js", context)).toEqual("bar");
|
||||
// roll back change to module.exports
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
module.exports.fooTest = undefined;
|
||||
});
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ export class TsRepl {
|
||||
private readonly evalData = { input: "", output: "" };
|
||||
private readonly resetToZero: () => void; // Bookmark to empty TS input
|
||||
private readonly initialTypeScript: string;
|
||||
// tslint:disable-next-line:readonly-keyword
|
||||
private context: Context | undefined;
|
||||
|
||||
public constructor(
|
||||
@ -69,7 +68,6 @@ export class TsRepl {
|
||||
// to exist in `Object.defineProperty(exports, "__esModule", { value: true });`
|
||||
const unsafeReplContext = repl.context as any;
|
||||
if (!unsafeReplContext.exports) {
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
unsafeReplContext.exports = unsafeReplContext.module.exports;
|
||||
}
|
||||
|
||||
@ -85,10 +83,8 @@ export class TsRepl {
|
||||
// However, this does not include the installation path of @cosmwasm/cli because
|
||||
// REPL does not inherit module paths from the current process. Thus we override
|
||||
// the repl paths with the current process' paths
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
unsafeReplContext.module.paths = module.paths;
|
||||
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
this.context = createContext(repl.context);
|
||||
|
||||
const reset = async (): Promise<void> => {
|
||||
@ -153,7 +149,6 @@ export class TsRepl {
|
||||
if (isAutocompletionRequest) {
|
||||
undo();
|
||||
} else {
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
this.evalData.output = output;
|
||||
}
|
||||
|
||||
@ -220,17 +215,13 @@ export class TsRepl {
|
||||
|
||||
// Handle ASI issues with TypeScript re-evaluation.
|
||||
if (oldInput.charAt(oldInput.length - 1) === "\n" && /^\s*[[(`]/.test(input) && !/;\s*$/.test(oldInput)) {
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
this.evalData.input = `${this.evalData.input.slice(0, -1)};\n`;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
this.evalData.input += input;
|
||||
|
||||
const undoFunction = (): void => {
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
this.evalData.input = oldInput;
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
this.evalData.output = oldOutput;
|
||||
};
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "../../tslint.json"
|
||||
}
|
||||
@ -27,7 +27,7 @@
|
||||
"dev-start": "FAUCET_CREDIT_AMOUNT_COSM=10 FAUCET_CREDIT_AMOUNT_STAKE=5 FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC=\"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone\" ./bin/cosmwasm-faucet start \"http://localhost:1317\"",
|
||||
"docs": "shx rm -rf docs && typedoc --options typedoc.js",
|
||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
||||
"build": "shx rm -rf ./build && tsc",
|
||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "../../tslint.json"
|
||||
}
|
||||
@ -23,7 +23,7 @@
|
||||
"scripts": {
|
||||
"docs": "shx rm -rf docs && typedoc --options typedoc.js",
|
||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
||||
"move-types": "shx rm -rf ./types/* && shx mv build/types/* ./types && rm -rf ./types/testdata && shx rm -f ./types/*.spec.d.ts",
|
||||
"format-types": "prettier --write --loglevel warn \"./types/**/*.d.ts\"",
|
||||
|
||||
@ -11,7 +11,6 @@ export function leb128Encode(uint: number): Uint8Array {
|
||||
const out = new Array<number>();
|
||||
let value = uint;
|
||||
do {
|
||||
// tslint:disable: no-bitwise
|
||||
let byte = value & 0b01111111;
|
||||
value >>= 7;
|
||||
|
||||
@ -19,7 +18,6 @@ export function leb128Encode(uint: number): Uint8Array {
|
||||
if (value !== 0) byte ^= 0b10000000;
|
||||
|
||||
out.push(byte);
|
||||
// tslint:enable: no-bitwise
|
||||
} while (value !== 0);
|
||||
return new Uint8Array(out);
|
||||
}
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "../../tslint.json"
|
||||
}
|
||||
34
tslint.json
34
tslint.json
@ -1,34 +0,0 @@
|
||||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"array-type": [true, "array"],
|
||||
"await-promise": false,
|
||||
"callable-types": false,
|
||||
"comment-format": [true, "check-space"],
|
||||
"curly": false,
|
||||
"deprecation": true,
|
||||
"interface-name": [true, "never-prefix"],
|
||||
"max-classes-per-file": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-console": [true, "log"],
|
||||
"no-empty": false,
|
||||
"no-empty-interface": false,
|
||||
"no-floating-promises": false,
|
||||
"no-implicit-dependencies": false,
|
||||
"no-parameter-reassignment": false,
|
||||
"no-unnecessary-class": [true, "allow-static-only"],
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-var-keyword": true,
|
||||
"object-literal-shorthand": [true, "never"],
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"prefer-const": false,
|
||||
"promise-function-async": true,
|
||||
"radix": false,
|
||||
"typedef": [true, "call-signature"],
|
||||
"variable-name": [true, "check-format", "allow-leading-underscore"]
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
||||
46
yarn.lock
46
yarn.lock
@ -1985,11 +1985,6 @@ buffer@^4.3.0:
|
||||
ieee754 "^1.1.4"
|
||||
isarray "^1.0.0"
|
||||
|
||||
builtin-modules@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
||||
integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=
|
||||
|
||||
builtin-status-codes@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
|
||||
@ -2130,7 +2125,7 @@ caseless@~0.12.0:
|
||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
||||
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
|
||||
|
||||
chalk@2.4.2, chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.2:
|
||||
chalk@2.4.2, chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||
@ -2320,7 +2315,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
|
||||
dependencies:
|
||||
delayed-stream "~1.0.0"
|
||||
|
||||
commander@^2.12.1, commander@^2.20.0, commander@~2.20.3:
|
||||
commander@^2.20.0, commander@~2.20.3:
|
||||
version "2.20.3"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
||||
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
|
||||
@ -6705,7 +6700,7 @@ resolve-url@^0.2.1:
|
||||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
|
||||
|
||||
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2:
|
||||
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1:
|
||||
version "1.15.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
|
||||
integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
|
||||
@ -6817,7 +6812,7 @@ schema-utils@^1.0.0:
|
||||
ajv-errors "^1.0.0"
|
||||
ajv-keywords "^3.1.0"
|
||||
|
||||
"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1:
|
||||
"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||
@ -7569,47 +7564,16 @@ ts-node@^8:
|
||||
source-map-support "^0.5.6"
|
||||
yn "3.1.1"
|
||||
|
||||
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
|
||||
tslib@^1.8.1, tslib@^1.9.0:
|
||||
version "1.10.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
||||
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
|
||||
|
||||
tslint-config-prettier@^1.18.0:
|
||||
version "1.18.0"
|
||||
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37"
|
||||
integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==
|
||||
|
||||
tslint@^5.20.1:
|
||||
version "5.20.1"
|
||||
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d"
|
||||
integrity sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.0.0"
|
||||
builtin-modules "^1.1.1"
|
||||
chalk "^2.3.0"
|
||||
commander "^2.12.1"
|
||||
diff "^4.0.1"
|
||||
glob "^7.1.1"
|
||||
js-yaml "^3.13.1"
|
||||
minimatch "^3.0.4"
|
||||
mkdirp "^0.5.1"
|
||||
resolve "^1.3.2"
|
||||
semver "^5.3.0"
|
||||
tslib "^1.8.0"
|
||||
tsutils "^2.29.0"
|
||||
|
||||
tsscmp@1.0.6:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb"
|
||||
integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==
|
||||
|
||||
tsutils@^2.29.0:
|
||||
version "2.29.0"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
|
||||
integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==
|
||||
dependencies:
|
||||
tslib "^1.8.1"
|
||||
|
||||
tsutils@^3.17.1:
|
||||
version "3.17.1"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user