mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Sort out eslint
This commit is contained in:
parent
53924829ba
commit
e2caf9bde0
92
.eslintrc.base.js
Normal file
92
.eslintrc.base.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -8,14 +8,14 @@ module.exports = {
|
|||||||
parser: "@typescript-eslint/parser",
|
parser: "@typescript-eslint/parser",
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 2018,
|
ecmaVersion: 2018,
|
||||||
project: "./tsconfig.json",
|
project: "./tsconfig.eslint.json",
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
},
|
},
|
||||||
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
extends: [
|
extends: [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"prettier/@typescript-eslint",
|
"prettier",
|
||||||
"plugin:prettier/recommended",
|
"plugin:prettier/recommended",
|
||||||
"plugin:import/typescript",
|
"plugin:import/typescript",
|
||||||
],
|
],
|
||||||
@ -30,7 +30,7 @@ module.exports = {
|
|||||||
radix: ["warn", "always"],
|
radix: ["warn", "always"],
|
||||||
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
"import/no-cycle": "warn",
|
"import/no-cycle": "warn",
|
||||||
"simple-import-sort/sort": "warn",
|
"simple-import-sort/imports": "warn",
|
||||||
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
"@typescript-eslint/await-thenable": "warn",
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
"@typescript-eslint/ban-types": "warn",
|
"@typescript-eslint/ban-types": "warn",
|
@ -23,8 +23,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -46,9 +46,17 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/amino/tsconfig.eslint.json
Normal file
9
packages/amino/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/cli/.eslintrc.js
Normal file
92
packages/cli/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -17,8 +17,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"start": "yarn build-or-skip && ./bin/cosmwasm-cli",
|
"start": "yarn build-or-skip && ./bin/cosmwasm-cli",
|
||||||
@ -63,10 +63,18 @@
|
|||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
"@types/babylon": "^6.16.3",
|
"@types/babylon": "^6.16.3",
|
||||||
"@types/diff": "^4",
|
"@types/diff": "^4",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
"@types/yargs": "^15.0.4",
|
"@types/yargs": "^15.0.4",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
|
9
packages/cli/tsconfig.eslint.json
Normal file
9
packages/cli/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/cosmwasm-launchpad/.eslintrc.js
Normal file
92
packages/cosmwasm-launchpad/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -24,10 +24,10 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -47,11 +47,19 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
"@types/pako": "^1.0.1",
|
"@types/pako": "^1.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/cosmwasm-launchpad/tsconfig.eslint.json
Normal file
9
packages/cosmwasm-launchpad/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/cosmwasm-stargate/.eslintrc.js
Normal file
92
packages/cosmwasm-stargate/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -25,8 +25,8 @@
|
|||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -54,12 +54,20 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/long": "^4.0.1",
|
"@types/long": "^4.0.1",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
"@types/pako": "^1.0.1",
|
"@types/pako": "^1.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/cosmwasm-stargate/tsconfig.eslint.json
Normal file
9
packages/cosmwasm-stargate/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/cosmwasm/.eslintrc.js
Normal file
92
packages/cosmwasm/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -26,8 +26,8 @@
|
|||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build"
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build"
|
||||||
},
|
},
|
||||||
@ -35,7 +35,15 @@
|
|||||||
"@cosmjs/cosmwasm-launchpad": "workspace:packages/cosmwasm-launchpad"
|
"@cosmjs/cosmwasm-launchpad": "workspace:packages/cosmwasm-launchpad"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"typedoc": "^0.20",
|
"typedoc": "^0.20",
|
||||||
"typescript": "~4.0"
|
"typescript": "~4.0"
|
||||||
|
9
packages/cosmwasm/tsconfig.eslint.json
Normal file
9
packages/cosmwasm/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/crypto/.eslintrc.js
Normal file
92
packages/crypto/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -24,8 +24,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -55,13 +55,21 @@
|
|||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
"@types/bn.js": "^4.11.6",
|
"@types/bn.js": "^4.11.6",
|
||||||
"@types/elliptic": "^6.4.12",
|
"@types/elliptic": "^6.4.12",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/libsodium-wrappers": "^0.7.7",
|
"@types/libsodium-wrappers": "^0.7.7",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
"@types/ripemd160": "^2.0.0",
|
"@types/ripemd160": "^2.0.0",
|
||||||
"@types/sha.js": "^2.4.0",
|
"@types/sha.js": "^2.4.0",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/crypto/tsconfig.eslint.json
Normal file
9
packages/crypto/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/encoding/.eslintrc.js
Normal file
92
packages/encoding/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -23,8 +23,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -46,9 +46,17 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
"@types/base64-js": "^1.2.5",
|
"@types/base64-js": "^1.2.5",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/encoding/tsconfig.eslint.json
Normal file
9
packages/encoding/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/faucet-client/.eslintrc.js
Normal file
92
packages/faucet-client/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -23,8 +23,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -43,9 +43,17 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/faucet-client/tsconfig.eslint.json
Normal file
9
packages/faucet-client/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/faucet/.eslintrc.js
Normal file
92
packages/faucet/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -27,8 +27,8 @@
|
|||||||
"dev-start": "yarn start-dev",
|
"dev-start": "yarn start-dev",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -51,11 +51,19 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/koa": "^2.11.0",
|
"@types/koa": "^2.11.0",
|
||||||
"@types/koa-bodyparser": "^4.3.0",
|
"@types/koa-bodyparser": "^4.3.0",
|
||||||
"@types/koa__cors": "^3.0.1",
|
"@types/koa__cors": "^3.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
|
9
packages/faucet/tsconfig.eslint.json
Normal file
9
packages/faucet/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/json-rpc/.eslintrc.js
Normal file
92
packages/json-rpc/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -25,8 +25,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -46,8 +46,16 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
10
packages/json-rpc/tsconfig.eslint.json
Normal file
10
packages/json-rpc/tsconfig.eslint.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
],
|
||||||
|
"exclude": []
|
||||||
|
}
|
92
packages/launchpad/.eslintrc.js
Normal file
92
packages/launchpad/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -26,8 +26,8 @@
|
|||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -48,10 +48,18 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/launchpad/tsconfig.eslint.json
Normal file
9
packages/launchpad/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/ledger-amino/.eslintrc.js
Normal file
92
packages/ledger-amino/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -25,8 +25,8 @@
|
|||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./{,demo/}*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./{,demo/}*.js\"",
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -51,13 +51,21 @@
|
|||||||
"@ledgerhq/hw-transport": "^5.25.0",
|
"@ledgerhq/hw-transport": "^5.25.0",
|
||||||
"@ledgerhq/hw-transport-node-hid": "^5.25.0",
|
"@ledgerhq/hw-transport-node-hid": "^5.25.0",
|
||||||
"@ledgerhq/hw-transport-webusb": "^5.25.0",
|
"@ledgerhq/hw-transport-webusb": "^5.25.0",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/ledgerhq__hw-transport": "^4.21.3",
|
"@types/ledgerhq__hw-transport": "^4.21.3",
|
||||||
"@types/ledgerhq__hw-transport-node-hid": "^4.22.2",
|
"@types/ledgerhq__hw-transport-node-hid": "^4.22.2",
|
||||||
"@types/ledgerhq__hw-transport-webusb": "^4.70.1",
|
"@types/ledgerhq__hw-transport-webusb": "^4.70.1",
|
||||||
"@types/semver": "^7.3.4",
|
"@types/semver": "^7.3.4",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
10
packages/ledger-amino/tsconfig.eslint.json
Normal file
10
packages/ledger-amino/tsconfig.eslint.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
"demo/*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/math/.eslintrc.js
Normal file
92
packages/math/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -23,8 +23,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -44,8 +44,16 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
"@types/bn.js": "^4.11.6",
|
"@types/bn.js": "^4.11.6",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/math/tsconfig.eslint.json
Normal file
9
packages/math/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/proto-signing/.eslintrc.js
Normal file
92
packages/proto-signing/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -26,8 +26,8 @@
|
|||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -50,11 +50,19 @@
|
|||||||
"@cosmjs/encoding": "workspace:packages/encoding",
|
"@cosmjs/encoding": "workspace:packages/encoding",
|
||||||
"@cosmjs/utils": "workspace:packages/utils",
|
"@cosmjs/utils": "workspace:packages/utils",
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/long": "^4.0.1",
|
"@types/long": "^4.0.1",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/proto-signing/tsconfig.eslint.json
Normal file
9
packages/proto-signing/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/socket/.eslintrc.js
Normal file
92
packages/socket/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -25,8 +25,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -48,9 +48,17 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/ws": "^6.0.1",
|
"@types/ws": "^6.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/socket/tsconfig.eslint.json
Normal file
9
packages/socket/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/stargate/.eslintrc.js
Normal file
92
packages/stargate/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -23,10 +23,10 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -54,11 +54,19 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@cosmjs/crypto": "workspace:packages/crypto",
|
"@cosmjs/crypto": "workspace:packages/crypto",
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/long": "^4.0.1",
|
"@types/long": "^4.0.1",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/stargate/tsconfig.eslint.json
Normal file
9
packages/stargate/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/stream/.eslintrc.js
Normal file
92
packages/stream/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -25,8 +25,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -45,9 +45,17 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/stream/tsconfig.eslint.json
Normal file
9
packages/stream/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/tendermint-rpc/.eslintrc.js
Normal file
92
packages/tendermint-rpc/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -25,8 +25,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -54,10 +54,18 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@cosmjs/utils": "workspace:packages/utils",
|
"@cosmjs/utils": "workspace:packages/utils",
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/tendermint-rpc/tsconfig.eslint.json
Normal file
9
packages/tendermint-rpc/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
92
packages/utils/.eslintrc.js
Normal file
92
packages/utils/.eslintrc.js
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
jasmine: true,
|
||||||
|
node: true,
|
||||||
|
worker: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
project: "./tsconfig.eslint.json",
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ["@typescript-eslint", "prettier", "simple-import-sort", "import"],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"prettier",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
curly: ["warn", "multi-line", "consistent"],
|
||||||
|
"no-bitwise": "warn",
|
||||||
|
"no-console": ["warn", { allow: ["error", "info", "table", "warn"] }],
|
||||||
|
"no-param-reassign": "warn",
|
||||||
|
"no-shadow": "off", // disabled in favour of @typescript-eslint/no-shadow, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
||||||
|
"no-unused-vars": "off", // disabled in favour of @typescript-eslint/no-unused-vars, see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||||
|
"prefer-const": "warn",
|
||||||
|
radix: ["warn", "always"],
|
||||||
|
"spaced-comment": ["warn", "always", { line: { markers: ["/ <reference"] } }],
|
||||||
|
"import/no-cycle": "warn",
|
||||||
|
"simple-import-sort/imports": "warn",
|
||||||
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
||||||
|
"@typescript-eslint/await-thenable": "warn",
|
||||||
|
"@typescript-eslint/ban-types": "warn",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": ["warn", { allowExpressions: true }],
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "warn",
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
selector: "default",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "typeLike",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "enumMember",
|
||||||
|
format: ["StrictPascalCase"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "variable",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: "parameter",
|
||||||
|
format: ["strictCamelCase"],
|
||||||
|
leadingUnderscore: "allow",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-dynamic-delete": "warn",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "warn",
|
||||||
|
"@typescript-eslint/no-parameter-properties": "warn",
|
||||||
|
"@typescript-eslint/no-shadow": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||||
|
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
||||||
|
"@typescript-eslint/no-use-before-define": "warn",
|
||||||
|
"@typescript-eslint/prefer-readonly": "warn",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "**/*.js",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: "**/*.spec.ts",
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
@ -23,10 +23,10 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs": "typedoc --options typedoc.js",
|
"docs": "typedoc --options typedoc.js",
|
||||||
|
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
|
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||||
"format-text": "prettier --write \"./*.md\"",
|
"format-text": "prettier --write \"./*.md\"",
|
||||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
|
||||||
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
|
|
||||||
"build": "rm -rf ./build && tsc",
|
"build": "rm -rf ./build && tsc",
|
||||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||||
"test-node": "node jasmine-testrunner.js",
|
"test-node": "node jasmine-testrunner.js",
|
||||||
@ -40,9 +40,17 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
|
"@types/eslint-plugin-prettier": "^3",
|
||||||
"@types/jasmine": "^3.6.10",
|
"@types/jasmine": "^3.6.10",
|
||||||
"@types/node": "^15.0.1",
|
"@types/node": "^15.0.1",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||||
|
"@typescript-eslint/parser": "^4.22.1",
|
||||||
"eslint": "^7.5",
|
"eslint": "^7.5",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-import-resolver-node": "^0.3.4",
|
||||||
|
"eslint-plugin-import": "^2.22.1",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"jasmine": "^3.5",
|
"jasmine": "^3.5",
|
||||||
"jasmine-spec-reporter": "^6",
|
"jasmine-spec-reporter": "^6",
|
||||||
|
9
packages/utils/tsconfig.eslint.json
Normal file
9
packages/utils/tsconfig.eslint.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
// extend your base config so you don't have to redefine your compilerOptions
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"*.js",
|
||||||
|
".eslintrc.js"
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user