Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Typescript types #134

Merged
merged 17 commits into from Jan 11, 2022
205 changes: 205 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,205 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config

It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.

We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md

Happy linting! 💖
*/
module.exports = {
env: {
node: true,
jest: true,
},
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
},
plugins: [
"eslint-plugin-import",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow",
"@typescript-eslint",
],
ignorePatterns: [".eslintrc.js", "dist/**/*"],
rules: {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [
"error",
{
default: "array-simple",
},
],
"@typescript-eslint/ban-types": [
"error",
{
types: {
Object: {
message: "Avoid using the `Object` type. Did you mean `object`?",
},
Function: {
message:
"Avoid using the `Function` type. Prefer a specific function type, like `() => void`.",
},
Boolean: {
message: "Avoid using the `Boolean` type. Did you mean `boolean`?",
},
Number: {
message: "Avoid using the `Number` type. Did you mean `number`?",
},
String: {
message: "Avoid using the `String` type. Did you mean `string`?",
},
Symbol: {
message: "Avoid using the `Symbol` type. Did you mean `symbol`?",
},
},
},
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
accessibility: "explicit",
},
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
multiline: {
delimiter: "semi",
requireLast: true,
},
singleline: {
delimiter: "semi",
requireLast: false,
},
},
],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": [
"error",
{
ignoreParameters: true,
},
],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"warn",
{
hoist: "all",
},
],
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
args: "none",
ignoreRestSiblings: true,
vars: "all",
},
],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": ["error", "double", { avoidEscape: true }],
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/triple-slash-reference": [
"error",
{
path: "always",
types: "prefer-import",
lib: "always",
},
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"arrow-parens": ["off", "always"],
"comma-dangle": ["error", "always-multiline"],
complexity: "off",
"constructor-super": "error",
curly: "off",
"dot-notation": "error",
"eol-last": "error",
eqeqeq: ["off", "always"],
"id-denylist": "error",
"id-match": "error",
"import/order": "off",
indent: "off",
"max-classes-per-file": ["error", 10],
"max-len": "off",
"new-parens": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": "off",
"no-debugger": "error",
"no-empty": "error",
"no-eval": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-multiple-empty-lines": "error",
"no-new-wrappers": "error",
"no-shadow": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-vars": "off",
"no-use-before-define": "off",
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"object-shorthand": "off",
"one-var": ["error", "never"],
"prefer-const": "error",
"quote-props": ["error", "consistent-as-needed"],
quotes: "off",
radix: "error",
"require-await": "off",
semi: "error",
"space-before-function-paren": [
"error",
{
anonymous: "always",
asyncArrow: "always",
named: "never",
},
],
"spaced-comment": [
"error",
"always",
{
markers: ["/"],
},
],
"use-isnan": "error",
"valid-typeof": "off",
},
};
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
node_modules
redist/
dist/
3 changes: 3 additions & 0 deletions CHANGES.md
Expand Up @@ -2,6 +2,9 @@
Newest updates are at the top of this file.


## 06 Dec 2021: (no new version)
* Added Typescript definition files.

## 19 Nov 2021: v0.9.19
* Update for MQ 9.2.4
* New MQBNO structure for Uniform Cluster balance control
Expand Down