Browse Source

Migration from tslint on eslint #1

sanex3339 5 years ago
parent
commit
64b61a7ae7
100 changed files with 368 additions and 107 deletions
  1. 2 0
      .eslintignore
  2. 260 0
      .eslintrc.js
  3. 0 0
      dist/index.browser.js
  4. 0 0
      dist/index.cli.js
  5. 0 0
      dist/index.js
  6. 10 6
      package.json
  7. 1 1
      scripts/build
  8. 3 0
      scripts/eslint
  9. 1 1
      scripts/travis
  10. 0 3
      scripts/tslint
  11. 1 1
      src/JavaScriptObfuscator.ts
  12. 1 1
      src/analyzers/calls-graph-analyzer/CallsGraphAnalyzer.ts
  13. 1 1
      src/analyzers/prevailing-kind-of-variables-analyzer/PrevailingKindOfVariablesAnalyzer.ts
  14. 1 1
      src/analyzers/string-array-storage-analyzer/StringArrayStorageAnalyzer.ts
  15. 1 1
      src/cli/JavaScriptObfuscatorCLI.ts
  16. 1 1
      src/cli/sanitizers/ArraySanitizer.ts
  17. 1 1
      src/cli/utils/SourceCodeReader.ts
  18. 4 4
      src/container/InversifyContainerFacade.ts
  19. 1 1
      src/custom-nodes/AbstractCustomNodeGroup.ts
  20. 1 1
      src/custom-nodes/CustomNodeFormatter.ts
  21. 1 1
      src/custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode.ts
  22. 1 1
      src/custom-nodes/console-output-nodes/group/ConsoleOutputCustomNodeGroup.ts
  23. 1 1
      src/custom-nodes/control-flow-flattening-nodes/BinaryExpressionFunctionNode.ts
  24. 1 1
      src/custom-nodes/control-flow-flattening-nodes/BlockStatementControlFlowFlatteningNode.ts
  25. 1 1
      src/custom-nodes/control-flow-flattening-nodes/CallExpressionFunctionNode.ts
  26. 1 1
      src/custom-nodes/control-flow-flattening-nodes/LogicalExpressionFunctionNode.ts
  27. 1 1
      src/custom-nodes/control-flow-flattening-nodes/StringLiteralNode.ts
  28. 1 1
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/CallExpressionControlFlowStorageCallNode.ts
  29. 1 1
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ControlFlowStorageNode.ts
  30. 1 1
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ExpressionWithOperatorControlFlowStorageCallNode.ts
  31. 1 1
      src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/StringLiteralControlFlowStorageCallNode.ts
  32. 1 1
      src/custom-nodes/dead-code-injection-nodes/BlockStatementDeadCodeInjectionNode.ts
  33. 1 1
      src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionCallNode.ts
  34. 1 1
      src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionIntervalNode.ts
  35. 1 1
      src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionNode.ts
  36. 1 1
      src/custom-nodes/debug-protection-nodes/group/DebugProtectionCustomNodeGroup.ts
  37. 1 1
      src/custom-nodes/domain-lock-nodes/DomainLockNode.ts
  38. 1 1
      src/custom-nodes/domain-lock-nodes/group/DomainLockCustomNodeGroup.ts
  39. 1 1
      src/custom-nodes/node-calls-controller-nodes/NodeCallsControllerFunctionNode.ts
  40. 1 1
      src/custom-nodes/object-expression-keys-transformer-nodes/ObjectExpressionVariableDeclarationHostNode.ts
  41. 1 1
      src/custom-nodes/self-defending-nodes/SelfDefendingUnicodeNode.ts
  42. 1 1
      src/custom-nodes/self-defending-nodes/group/SelfDefendingCustomNodeGroup.ts
  43. 1 1
      src/custom-nodes/string-array-nodes/StringArrayCallsWrapper.ts
  44. 1 1
      src/custom-nodes/string-array-nodes/StringArrayNode.ts
  45. 1 1
      src/custom-nodes/string-array-nodes/StringArrayRotateFunctionNode.ts
  46. 1 1
      src/custom-nodes/string-array-nodes/group/StringArrayCustomNodeGroup.ts
  47. 1 1
      src/declarations/ESTree.d.ts
  48. 1 1
      src/declarations/escodegen.d.ts
  49. 1 2
      src/declarations/eslint-scope.d.ts
  50. 0 2
      src/decorators/Initializable.ts
  51. 1 1
      src/generators/identifier-names-generators/AbstractIdentifierNamesGenerator.ts
  52. 1 1
      src/generators/identifier-names-generators/DictionaryIdentifierNamesGenerator.ts
  53. 1 1
      src/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.ts
  54. 1 1
      src/generators/identifier-names-generators/MangledIdentifierNamesGenerator.ts
  55. 0 1
      src/interfaces/utils/ICryptUtils.ts
  56. 1 1
      src/logger/Logger.ts
  57. 1 1
      src/node-transformers/AbstractNodeTransformer.ts
  58. 1 1
      src/node-transformers/TransformersRunner.ts
  59. 1 1
      src/node-transformers/control-flow-transformers/BlockStatementControlFlowTransformer.ts
  60. 1 1
      src/node-transformers/control-flow-transformers/FunctionControlFlowTransformer.ts
  61. 1 1
      src/node-transformers/control-flow-transformers/control-flow-replacers/AbstractControlFlowReplacer.ts
  62. 1 1
      src/node-transformers/control-flow-transformers/control-flow-replacers/BinaryExpressionControlFlowReplacer.ts
  63. 1 1
      src/node-transformers/control-flow-transformers/control-flow-replacers/CallExpressionControlFlowReplacer.ts
  64. 1 1
      src/node-transformers/control-flow-transformers/control-flow-replacers/ExpressionWithOperatorControlFlowReplacer.ts
  65. 1 1
      src/node-transformers/control-flow-transformers/control-flow-replacers/LogicalExpressionControlFlowReplacer.ts
  66. 1 1
      src/node-transformers/control-flow-transformers/control-flow-replacers/StringLiteralControlFlowReplacer.ts
  67. 1 1
      src/node-transformers/converting-transformers/MemberExpressionTransformer.ts
  68. 1 1
      src/node-transformers/converting-transformers/MethodDefinitionTransformer.ts
  69. 1 1
      src/node-transformers/converting-transformers/ObjectExpressionKeysTransformer.ts
  70. 1 1
      src/node-transformers/converting-transformers/ObjectExpressionTransformer.ts
  71. 2 2
      src/node-transformers/converting-transformers/SplitStringTransformer.ts
  72. 1 1
      src/node-transformers/converting-transformers/TemplateLiteralTransformer.ts
  73. 1 1
      src/node-transformers/converting-transformers/object-expression-extractors/ObjectExpressionToVariableDeclarationExtractor.ts
  74. 1 1
      src/node-transformers/dead-code-injection-transformers/DeadCodeInjectionTransformer.ts
  75. 1 1
      src/node-transformers/obfuscating-transformers/LabeledStatementTransformer.ts
  76. 1 1
      src/node-transformers/obfuscating-transformers/LiteralTransformer.ts
  77. 1 1
      src/node-transformers/obfuscating-transformers/ScopeIdentifiersTransformer.ts
  78. 1 1
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/AbstractObfuscatingReplacer.ts
  79. 1 1
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/identifier-obfuscating-replacers/BaseIdentifierObfuscatingReplacer.ts
  80. 1 1
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/BooleanLiteralObfuscatingReplacer.ts
  81. 1 1
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/NumberLiteralObfuscatingReplacer.ts
  82. 1 1
      src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/StringLiteralObfuscatingReplacer.ts
  83. 1 1
      src/node-transformers/preparing-transformers/CommentsTransformer.ts
  84. 1 1
      src/node-transformers/preparing-transformers/CustomNodesTransformer.ts
  85. 1 1
      src/node-transformers/preparing-transformers/EvalCallExpressionTransformer.ts
  86. 1 1
      src/node-transformers/preparing-transformers/MetadataTransformer.ts
  87. 1 1
      src/node-transformers/preparing-transformers/ObfuscatingGuardsTransformer.ts
  88. 1 1
      src/node-transformers/preparing-transformers/ParentificationTransformer.ts
  89. 1 1
      src/node-transformers/preparing-transformers/VariablePreserveTransformer.ts
  90. 1 1
      src/node-transformers/preparing-transformers/obfuscating-guards/BlackListObfuscatingGuard.ts
  91. 1 1
      src/node-transformers/preparing-transformers/obfuscating-guards/ReservedStringObfuscatingGuard.ts
  92. 0 2
      src/node/NodeFactory.ts
  93. 1 0
      src/node/NodeGuards.ts
  94. 1 1
      src/node/NodeLexicalScopeUtils.ts
  95. 1 1
      src/node/NodeStatementUtils.ts
  96. 1 1
      src/options/Options.ts
  97. 1 1
      src/source-code/ObfuscatedCode.ts
  98. 1 1
      src/source-code/SourceCode.ts
  99. 1 1
      src/storages/ArrayStorage.ts
  100. 1 1
      src/storages/MapStorage.ts

+ 2 - 0
.eslintignore

@@ -0,0 +1,2 @@
+/test
+/webpack

+ 260 - 0
.eslintrc.js

@@ -0,0 +1,260 @@
+module.exports = {
+    "env": {
+        "browser": true,
+        "es6": true,
+        "node": true
+    },
+    "parser": "@typescript-eslint/parser",
+    "parserOptions": {
+        "project": "src/tsconfig.node.json",
+        "sourceType": "module"
+    },
+    "plugins": [
+        "@typescript-eslint",
+        "import",
+        "jsdoc",
+        "prefer-arrow",
+        "unicorn"
+    ],
+    "rules": {
+        "@typescript-eslint/adjacent-overload-signatures": "error",
+        "@typescript-eslint/array-type": "error",
+        "@typescript-eslint/await-thenable": "error",
+        "@typescript-eslint/ban-types": "error",
+        "@typescript-eslint/class-name-casing": "error",
+        "@typescript-eslint/consistent-type-assertions": "off",
+        "@typescript-eslint/consistent-type-definitions": "error",
+        "@typescript-eslint/explicit-member-accessibility": [
+            "error",
+            {
+                "accessibility": "explicit"
+            }
+        ],
+        "@typescript-eslint/indent": [
+            "off",
+            4
+        ],
+        "@typescript-eslint/interface-name-prefix": [
+            "error",
+            "always"
+        ],
+        "@typescript-eslint/member-delimiter-style": [
+            "error",
+            {
+                "multiline": {
+                    "delimiter": "semi",
+                    "requireLast": true
+                },
+                "singleline": {
+                    "delimiter": "semi",
+                    "requireLast": false
+                }
+            }
+        ],
+        "@typescript-eslint/member-ordering": "off",
+        "@typescript-eslint/no-empty-function": "off",
+        "@typescript-eslint/no-empty-interface": "error",
+        "@typescript-eslint/no-explicit-any": "off",
+        "@typescript-eslint/no-floating-promises": "error",
+        "@typescript-eslint/no-for-in-array": "error",
+        "@typescript-eslint/no-inferrable-types": "off",
+        "@typescript-eslint/no-misused-new": "error",
+        "@typescript-eslint/no-namespace": "error",
+        "@typescript-eslint/no-non-null-assertion": "error",
+        "@typescript-eslint/no-param-reassign": "off",
+        "@typescript-eslint/no-parameter-properties": "error",
+        "@typescript-eslint/no-require-imports": "off",
+        "@typescript-eslint/no-this-alias": "error",
+        "@typescript-eslint/no-unnecessary-qualifier": "error",
+        "@typescript-eslint/no-unnecessary-type-arguments": "error",
+        "@typescript-eslint/no-unnecessary-type-assertion": "error",
+        "@typescript-eslint/no-use-before-define": "off",
+        "@typescript-eslint/no-var-requires": "error",
+        "@typescript-eslint/prefer-for-of": "error",
+        "@typescript-eslint/prefer-function-type": "error",
+        "@typescript-eslint/prefer-namespace-keyword": "error",
+        "@typescript-eslint/prefer-readonly": "error",
+        "@typescript-eslint/promise-function-async": "error",
+        "@typescript-eslint/quotes": "off",
+        "@typescript-eslint/restrict-plus-operands": "error",
+        "@typescript-eslint/semi": [
+            "error",
+            "always"
+        ],
+        "@typescript-eslint/strict-boolean-expressions": "off",
+        "@typescript-eslint/triple-slash-reference": "error",
+        "@typescript-eslint/type-annotation-spacing": "error",
+        "@typescript-eslint/unified-signatures": "error",
+        "arrow-body-style": "off",
+        "arrow-parens": [
+            "off",
+            "as-needed"
+        ],
+        "camelcase": "off",
+        "capitalized-comments": [
+            "off"
+        ],
+        "comma-dangle": "off",
+        "complexity": [
+            "error",
+            {
+                "max": 10
+            }
+        ],
+        "constructor-super": "error",
+        "curly": "error",
+        "default-case": "off",
+        "dot-notation": "error",
+        "eol-last": "error",
+        "eqeqeq": [
+            "error",
+            "smart"
+        ],
+        "guard-for-in": "error",
+        "id-blacklist": "off",
+        "id-match": "off",
+        "import/no-default-export": "error",
+        "import/no-deprecated": "off",
+        "import/no-extraneous-dependencies": "off",
+        "import/no-internal-modules": "error",
+        "import/no-unassigned-import": "off",
+        "import/order": [
+            "off"
+        ],
+        "jsdoc/no-types": "off",
+        "linebreak-style": "error",
+        "max-classes-per-file": [
+            "error",
+            1
+        ],
+        "max-len": "off",
+        "max-lines": [
+            "error",
+            500
+        ],
+        "new-parens": "error",
+        "newline-per-chained-call": "off",
+        "no-bitwise": "off",
+        "no-caller": "error",
+        "no-cond-assign": "error",
+        "no-console": [
+            "error",
+            {
+                "allow": [
+                    "log",
+                    "warn",
+                    "dir",
+                    "timeLog",
+                    "assert",
+                    "clear",
+                    "count",
+                    "countReset",
+                    "group",
+                    "groupEnd",
+                    "table",
+                    "dirxml",
+                    "error",
+                    "groupCollapsed",
+                    "Console",
+                    "profile",
+                    "profileEnd",
+                    "timeStamp",
+                    "context"
+                ]
+            }
+        ],
+        "no-constant-condition": "error",
+        "no-control-regex": "off",
+        "no-debugger": "error",
+        "no-duplicate-case": "error",
+        "no-duplicate-imports": "error",
+        "no-empty": "off",
+        "no-eval": "off",
+        "no-extra-bind": "error",
+        "no-extra-semi": "error",
+        "no-fallthrough": "off",
+        "no-invalid-regexp": "error",
+        "no-invalid-this": "off",
+        "no-irregular-whitespace": "error",
+        "no-magic-numbers": "off",
+        "no-multi-str": "off",
+        "no-multiple-empty-lines": "error",
+        "no-new-wrappers": "error",
+        "no-null/no-null": "off",
+        "no-octal": "error",
+        "no-octal-escape": "error",
+        "no-redeclare": "error",
+        "no-regex-spaces": "error",
+        "no-restricted-syntax": [
+            "error",
+            "ForInStatement"
+        ],
+        "no-return-await": "error",
+        "no-sequences": "error",
+        "no-shadow": [
+            "error",
+            {
+                "hoist": "all"
+            }
+        ],
+        "no-sparse-arrays": "error",
+        "no-template-curly-in-string": "error",
+        "no-throw-literal": "error",
+        "no-trailing-spaces": [
+            "error",
+            {
+                "skipBlankLines": true
+            }
+        ],
+        "no-undef-init": "error",
+        "no-underscore-dangle": "off",
+        "no-unsafe-finally": "error",
+        "no-unused-expressions": "off",
+        "no-unused-labels": "error",
+        "no-var": "error",
+        "no-void": "error",
+        "object-shorthand": "off",
+        "one-var": [
+            "error",
+            "never"
+        ],
+        "padding-line-between-statements": [
+            "error",
+            {
+                "blankLine": "always",
+                "prev": "*",
+                "next": "return"
+            }
+        ],
+        "prefer-arrow/prefer-arrow-functions": "off",
+        "prefer-const": "error",
+        "prefer-object-spread": "off",
+        "prefer-template": "error",
+        "quote-props": [
+            "error",
+            "as-needed"
+        ],
+        "radix": "error",
+        "space-before-function-paren": "error",
+        "spaced-comment": "error",
+        "space-in-parens": [
+            "error",
+            "never"
+        ],
+        "unicorn/catch-error-name": [
+            "error",
+            {
+                "name": "error"
+            }
+        ],
+        "unicorn/no-array-instanceof": "error",
+        "unicorn/no-nested-ternary": "error",
+        "unicorn/no-unreadable-array-destructuring": "error",
+        "unicorn/prefer-includes": "error",
+        "unicorn/prefer-starts-ends-with": "error",
+        "unicorn/prefer-trim-start-end": "error",
+        "use-isnan": "error",
+        "valid-typeof": "off",
+        "yoda": "error"
+    }
+};

File diff suppressed because it is too large
+ 0 - 0
dist/index.browser.js


File diff suppressed because it is too large
+ 0 - 0
dist/index.cli.js


File diff suppressed because it is too large
+ 0 - 0
dist/index.js


+ 10 - 6
package.json

@@ -34,7 +34,6 @@
     "estraverse": "4.3.0",
     "eventemitter3": "4.0.0",
     "fast-deep-equal": "3.1.1",
-    "fork-ts-checker-webpack-plugin": "3.1.1",
     "inversify": "5.0.1",
     "js-string-escape": "1.0.1",
     "md5": "2.2.1",
@@ -61,8 +60,17 @@
     "@types/sinon": "7.5.1",
     "@types/string-template": "1.0.2",
     "@types/webpack-env": "1.15.0",
+    "@typescript-eslint/eslint-plugin": "2.18.0",
+    "@typescript-eslint/parser": "2.18.0",
     "chai": "4.2.0",
     "coveralls": "3.0.9",
+    "eslint": "6.8.0",
+    "eslint-plugin-import": "2.20.0",
+    "eslint-plugin-jsdoc": "21.0.0",
+    "eslint-plugin-no-null": "1.0.2",
+    "eslint-plugin-prefer-arrow": "1.1.7",
+    "eslint-plugin-unicorn": "15.0.1",
+    "fork-ts-checker-webpack-plugin": "4.0.3",
     "mocha": "7.0.0",
     "nyc": "15.0.0",
     "pjson": "1.0.9",
@@ -72,10 +80,6 @@
     "threads": "1.0.0",
     "ts-loader": "6.2.1",
     "ts-node": "6.1.0",
-    "tslint": "5.20.1",
-    "tslint-eslint-rules": "5.4.0",
-    "tslint-language-service": "0.9.9",
-    "tslint-microsoft-contrib": "6.2.0",
     "typescript": "3.8.0-beta",
     "webpack": "4.41.5",
     "webpack-cli": "3.3.10",
@@ -102,7 +106,7 @@
     "test:mocha": "scripts/test-mocha",
     "test:removeTmpDir": "scripts/test-remove-tmp-dir",
     "test": "scripts/test",
-    "tslint": "scripts/tslint",
+    "eslint": "scripts/eslint",
     "travis": "scripts/travis",
     "git:addFiles": "scripts/git-add-files",
     "postinstall": "opencollective || exit 0"

+ 1 - 1
scripts/build

@@ -2,5 +2,5 @@
 
 yarn run removeCacheDir &&
 yarn run webpack:prod &&
-yarn run tslint &&
+yarn run eslint &&
 yarn test

+ 3 - 0
scripts/eslint

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+$(yarn bin)/eslint src/**/*.ts

+ 1 - 1
scripts/travis

@@ -1,4 +1,4 @@
 #!/bin/bash
 
-yarn run tslint &&
+yarn run eslint &&
 yarn test

+ 0 - 3
scripts/tslint

@@ -1,3 +0,0 @@
-#!/bin/bash
-
-$(yarn bin)/tslint src/**/*.ts --project src/tsconfig.node.json

+ 1 - 1
src/JavaScriptObfuscator.ts

@@ -105,7 +105,7 @@ export class JavaScriptObfuscator implements IJavaScriptObfuscator {
      * @param {ILogger} logger
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.ITransformersRunner) transformersRunner: ITransformersRunner,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.Factory__IObfuscatedCode) obfuscatedCodeFactory: TObfuscatedCodeFactory,

+ 1 - 1
src/analyzers/calls-graph-analyzer/CallsGraphAnalyzer.ts

@@ -72,7 +72,7 @@ export class CallsGraphAnalyzer implements ICallsGraphAnalyzer {
      */
     private readonly calleeDataExtractorFactory: TCalleeDataExtractorFactory;
 
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__ICalleeDataExtractor) calleeDataExtractorFactory: TCalleeDataExtractorFactory
     ) {
         this.calleeDataExtractorFactory = calleeDataExtractorFactory;

+ 1 - 1
src/analyzers/prevailing-kind-of-variables-analyzer/PrevailingKindOfVariablesAnalyzer.ts

@@ -26,7 +26,7 @@ export class PrevailingKindOfVariablesAnalyzer implements IPrevailingKindOfVaria
      */
     private prevailingKindOfVariables: ESTree.VariableDeclaration['kind'] = PrevailingKindOfVariablesAnalyzer.defaultKindOfVariables;
 
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IArrayUtils) arrayUtils: IArrayUtils
     ) {
         this.arrayUtils = arrayUtils;

+ 1 - 1
src/analyzers/string-array-storage-analyzer/StringArrayStorageAnalyzer.ts

@@ -49,7 +49,7 @@ export class StringArrayStorageAnalyzer implements IStringArrayStorageAnalyzer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.TStringArrayStorage) stringArrayStorage: IStringArrayStorage,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions,

+ 1 - 1
src/cli/JavaScriptObfuscatorCLI.ts

@@ -71,7 +71,7 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
     /**
      * @param {string[]} argv
      */
-    constructor (argv: string[]) {
+    public constructor (argv: string[]) {
         this.rawArguments = argv;
         this.arguments = argv.slice(2);
     }

+ 1 - 1
src/cli/sanitizers/ArraySanitizer.ts

@@ -5,7 +5,7 @@ import { TCLISanitizer } from '../../types/cli/TCLISanitizer';
  * @returns {string[]}
  */
 export const ArraySanitizer: TCLISanitizer <string[]> = (value: string): string[] => {
-    if (/,$/.test(value)) {
+    if (value.endsWith(',')) {
         throw new SyntaxError(`Multiple <list> values should be wrapped inside quotes: --option-name 'value1','value2'`);
     }
 

+ 1 - 1
src/cli/utils/SourceCodeReader.ts

@@ -28,7 +28,7 @@ export class SourceCodeReader {
     /**
      * @param {TInputCLIOptions} options
      */
-    constructor (options: TInputCLIOptions) {
+    public constructor (options: TInputCLIOptions) {
         this.options = options;
     }
 

+ 4 - 4
src/container/InversifyContainerFacade.ts

@@ -37,7 +37,7 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
      */
     private readonly container: interfaces.Container;
 
-    constructor () {
+    public constructor () {
         this.container = new Container();
     }
 
@@ -86,15 +86,15 @@ export class InversifyContainerFacade implements IInversifyContainerFacade {
      */
     public static getConstructorFactory <T extends string, U> (
         serviceIdentifier: interfaces.ServiceIdentifier<interfaces.Newable<U>>,
-        ...dependencies: interfaces.ServiceIdentifier<interfaces.Newable<Object>>[]
+        ...dependencies: interfaces.ServiceIdentifier<interfaces.Newable<Record<string, any>>>[]
     ): (context: interfaces.Context) => (bindingName: T) => U {
         return (context: interfaces.Context): (bindingName: T) => U => {
             const cache: Map<T, interfaces.Newable<U>> = new Map();
-            const cachedDependencies: Object[] = [];
+            const cachedDependencies: Record<string, any>[] = [];
 
             return (bindingName: T) => {
                 dependencies.forEach((
-                    dependency: interfaces.ServiceIdentifier<interfaces.Newable<Object>>,
+                    dependency: interfaces.ServiceIdentifier<interfaces.Newable<Record<string, any>>>,
                     index: number
                 ) => {
                     if (!cachedDependencies[index]) {

+ 1 - 1
src/custom-nodes/AbstractCustomNodeGroup.ts

@@ -46,7 +46,7 @@ export abstract class AbstractCustomNodeGroup implements ICustomNodeGroup {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/custom-nodes/CustomNodeFormatter.ts

@@ -20,7 +20,7 @@ export class CustomNodeFormatter implements ICustomNodeFormatter {
      */
     private readonly prevailingKindOfVariables: ESTree.VariableDeclaration['kind'];
 
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IPrevailingKindOfVariablesAnalyzer)
             prevailingKindOfVariablesAnalyzer: IPrevailingKindOfVariablesAnalyzer
     ) {

+ 1 - 1
src/custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode.ts

@@ -32,7 +32,7 @@ export class ConsoleOutputDisableExpressionNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/console-output-nodes/group/ConsoleOutputCustomNodeGroup.ts

@@ -45,7 +45,7 @@ export class ConsoleOutputCustomNodeGroup extends AbstractCustomNodeGroup {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/BinaryExpressionFunctionNode.ts

@@ -27,7 +27,7 @@ export class BinaryExpressionFunctionNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/BlockStatementControlFlowFlatteningNode.ts

@@ -43,7 +43,7 @@ export class BlockStatementControlFlowFlatteningNode extends AbstractCustomNode
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/CallExpressionFunctionNode.ts

@@ -30,7 +30,7 @@ export class CallExpressionFunctionNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/LogicalExpressionFunctionNode.ts

@@ -27,7 +27,7 @@ export class LogicalExpressionFunctionNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/StringLiteralNode.ts

@@ -27,7 +27,7 @@ export class StringLiteralNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/CallExpressionControlFlowStorageCallNode.ts

@@ -48,7 +48,7 @@ export class CallExpressionControlFlowStorageCallNode extends AbstractCustomNode
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ControlFlowStorageNode.ts

@@ -33,7 +33,7 @@ export class ControlFlowStorageNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/ExpressionWithOperatorControlFlowStorageCallNode.ts

@@ -46,7 +46,7 @@ export class ExpressionWithOperatorControlFlowStorageCallNode extends AbstractCu
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/control-flow-flattening-nodes/control-flow-storage-nodes/StringLiteralControlFlowStorageCallNode.ts

@@ -34,7 +34,7 @@ export class StringLiteralControlFlowStorageCallNode extends AbstractCustomNode
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/dead-code-injection-nodes/BlockStatementDeadCodeInjectionNode.ts

@@ -32,7 +32,7 @@ export class BlockStatementDeadCodeInjectionNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionCallNode.ts

@@ -35,7 +35,7 @@ export class DebugProtectionFunctionCallNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionIntervalNode.ts

@@ -29,7 +29,7 @@ export class DebugProtectionFunctionIntervalNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/debug-protection-nodes/DebugProtectionFunctionNode.ts

@@ -33,7 +33,7 @@ export class DebugProtectionFunctionNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/debug-protection-nodes/group/DebugProtectionCustomNodeGroup.ts

@@ -48,7 +48,7 @@ export class DebugProtectionCustomNodeGroup extends AbstractCustomNodeGroup {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,

+ 1 - 1
src/custom-nodes/domain-lock-nodes/DomainLockNode.ts

@@ -39,7 +39,7 @@ export class DomainLockNode extends AbstractCustomNode {
      * @param {IOptions} options
      * @param {ICryptUtils} cryptUtils
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/domain-lock-nodes/group/DomainLockCustomNodeGroup.ts

@@ -45,7 +45,7 @@ export class DomainLockCustomNodeGroup extends AbstractCustomNodeGroup {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,

+ 1 - 1
src/custom-nodes/node-calls-controller-nodes/NodeCallsControllerFunctionNode.ts

@@ -40,7 +40,7 @@ export class NodeCallsControllerFunctionNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/object-expression-keys-transformer-nodes/ObjectExpressionVariableDeclarationHostNode.ts

@@ -26,7 +26,7 @@ export class ObjectExpressionVariableDeclarationHostNode extends AbstractCustomN
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/self-defending-nodes/SelfDefendingUnicodeNode.ts

@@ -39,7 +39,7 @@ export class SelfDefendingUnicodeNode extends AbstractCustomNode {
      * @param {IOptions} options
      * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/self-defending-nodes/group/SelfDefendingCustomNodeGroup.ts

@@ -45,7 +45,7 @@ export class SelfDefendingCustomNodeGroup extends AbstractCustomNodeGroup {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,

+ 1 - 1
src/custom-nodes/string-array-nodes/StringArrayCallsWrapper.ts

@@ -54,7 +54,7 @@ export class StringArrayCallsWrapper extends AbstractCustomNode {
      * @param {IOptions} options
      * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/string-array-nodes/StringArrayNode.ts

@@ -36,7 +36,7 @@ export class StringArrayNode extends AbstractCustomNode {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/string-array-nodes/StringArrayRotateFunctionNode.ts

@@ -47,7 +47,7 @@ export class StringArrayRotateFunctionNode extends AbstractCustomNode {
      * @param {IOptions} options
      * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.ICustomNodeFormatter) customNodeFormatter: ICustomNodeFormatter,

+ 1 - 1
src/custom-nodes/string-array-nodes/group/StringArrayCustomNodeGroup.ts

@@ -53,7 +53,7 @@ export class StringArrayCustomNodeGroup extends AbstractCustomNodeGroup {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__ICustomNode) customNodeFactory: TCustomNodeFactory,
         @inject(ServiceIdentifiers.TStringArrayStorage) stringArrayStorage: IStringArrayStorage,
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)

+ 1 - 1
src/declarations/ESTree.d.ts

@@ -1,4 +1,4 @@
-/* tslint:disable:interface-name */
+/* eslint-disable */
 
 import * as acorn from 'acorn';
 import * as escodegen from 'escodegen';

+ 1 - 1
src/declarations/escodegen.d.ts

@@ -1,4 +1,4 @@
-/* tslint:disable:interface-name */
+/* eslint-disable */
 
 import * as ESTree from 'estree';
 

+ 1 - 2
src/declarations/eslint-scope.d.ts

@@ -1,5 +1,4 @@
-/* tslint:disable:interface-name */
-/* tslint:disable:no-empty-interface */
+/* eslint-disable */
 
 import * as eslint from 'eslint';
 import * as eslintScope from 'eslint-scope';

+ 0 - 2
src/decorators/Initializable.ts

@@ -1,5 +1,3 @@
-/* tslint:disable:no-invalid-this */
-
 import { IInitializable } from '../interfaces/IInitializable';
 
 const defaultDescriptor: PropertyDescriptor = {

+ 1 - 1
src/generators/identifier-names-generators/AbstractIdentifierNamesGenerator.ts

@@ -26,7 +26,7 @@ export abstract class AbstractIdentifierNamesGenerator implements IIdentifierNam
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/generators/identifier-names-generators/DictionaryIdentifierNamesGenerator.ts

@@ -29,7 +29,7 @@ export class DictionaryIdentifierNamesGenerator extends AbstractIdentifierNamesG
      * @param {IOptions} options
      * @param {IArrayUtils} arrayUtils
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions,
         @inject(ServiceIdentifiers.IArrayUtils) arrayUtils: IArrayUtils,

+ 1 - 1
src/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.ts

@@ -24,7 +24,7 @@ export class HexadecimalIdentifierNamesGenerator extends AbstractIdentifierNames
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/generators/identifier-names-generators/MangledIdentifierNamesGenerator.ts

@@ -38,7 +38,7 @@ export class MangledIdentifierNamesGenerator extends AbstractIdentifierNamesGene
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 0 - 1
src/interfaces/utils/ICryptUtils.ts

@@ -16,6 +16,5 @@ export interface ICryptUtils {
      * @param string
      * @returns {string}
      */
-    /* tslint:disable */
     rc4 (string: string, key: string): string;
 }

+ 1 - 1
src/logger/Logger.ts

@@ -34,7 +34,7 @@ export class Logger implements ILogger {
     /**
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {
         this.options = options;

+ 1 - 1
src/node-transformers/AbstractNodeTransformer.ts

@@ -33,7 +33,7 @@ export abstract class AbstractNodeTransformer implements INodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/TransformersRunner.ts

@@ -45,7 +45,7 @@ export class TransformersRunner implements ITransformersRunner {
      * @param {TNodeTransformerFactory} nodeTransformerFactory
      * @param {INodeTransformerNamesGroupsBuilder} nodeTransformerNamesGroupsBuilder
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__INodeTransformer)
             nodeTransformerFactory: TNodeTransformerFactory,
         @inject(ServiceIdentifiers.INodeTransformerNamesGroupsBuilder)

+ 1 - 1
src/node-transformers/control-flow-transformers/BlockStatementControlFlowTransformer.ts

@@ -40,7 +40,7 @@ export class BlockStatementControlFlowTransformer extends AbstractNodeTransforme
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
             controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory,
         @inject(ServiceIdentifiers.IArrayUtils) arrayUtils: IArrayUtils,

+ 1 - 1
src/node-transformers/control-flow-transformers/FunctionControlFlowTransformer.ts

@@ -88,7 +88,7 @@ export class FunctionControlFlowTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__TControlFlowStorage)
             controlFlowStorageFactory: TControlFlowStorageFactory,
         @inject(ServiceIdentifiers.Factory__IControlFlowReplacer)

+ 1 - 1
src/node-transformers/control-flow-transformers/control-flow-replacers/AbstractControlFlowReplacer.ts

@@ -38,7 +38,7 @@ export abstract class AbstractControlFlowReplacer implements IControlFlowReplace
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
             controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/control-flow-transformers/control-flow-replacers/BinaryExpressionControlFlowReplacer.ts

@@ -28,7 +28,7 @@ export class BinaryExpressionControlFlowReplacer extends ExpressionWithOperatorC
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
             controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/control-flow-transformers/control-flow-replacers/CallExpressionControlFlowReplacer.ts

@@ -31,7 +31,7 @@ export class CallExpressionControlFlowReplacer extends AbstractControlFlowReplac
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
             controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/control-flow-transformers/control-flow-replacers/ExpressionWithOperatorControlFlowReplacer.ts

@@ -24,7 +24,7 @@ export abstract class ExpressionWithOperatorControlFlowReplacer extends Abstract
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
             controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/control-flow-transformers/control-flow-replacers/LogicalExpressionControlFlowReplacer.ts

@@ -30,7 +30,7 @@ export class LogicalExpressionControlFlowReplacer extends ExpressionWithOperator
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
             controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/control-flow-transformers/control-flow-replacers/StringLiteralControlFlowReplacer.ts

@@ -31,7 +31,7 @@ export class StringLiteralControlFlowReplacer extends AbstractControlFlowReplace
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IControlFlowCustomNode)
             controlFlowCustomNodeFactory: TControlFlowCustomNodeFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/converting-transformers/MemberExpressionTransformer.ts

@@ -19,7 +19,7 @@ export class MemberExpressionTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/converting-transformers/MethodDefinitionTransformer.ts

@@ -36,7 +36,7 @@ export class MethodDefinitionTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/converting-transformers/ObjectExpressionKeysTransformer.ts

@@ -37,7 +37,7 @@ export class ObjectExpressionKeysTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IObjectExpressionExtractor)
             objectExpressionExtractorFactory: TObjectExpressionExtractorFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/converting-transformers/ObjectExpressionTransformer.ts

@@ -26,7 +26,7 @@ export class ObjectExpressionTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 2 - 2
src/node-transformers/converting-transformers/SplitStringTransformer.ts

@@ -39,7 +39,7 @@ export class SplitStringTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {
@@ -114,7 +114,7 @@ export class SplitStringTransformer extends AbstractNodeTransformer {
 
         // pass #2: split large chunks on a chunks with length of `splitStringsChunkLength`
         const secondPassChunksNode: ESTree.Node = estraverse.replace(firstPassChunksNode, {
-            /* tslint:disable:no-shadowed-variable */
+            // eslint-disable-next-line no-shadow
             enter: (node: ESTree.Node, parentNode: ESTree.Node | null) => {
                 if (parentNode && NodeGuards.isLiteralNode(node)) {
                     return this.transformLiteralNodeByChunkLength(

+ 1 - 1
src/node-transformers/converting-transformers/TemplateLiteralTransformer.ts

@@ -24,7 +24,7 @@ export class TemplateLiteralTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/converting-transformers/object-expression-extractors/ObjectExpressionToVariableDeclarationExtractor.ts

@@ -30,7 +30,7 @@ export class ObjectExpressionToVariableDeclarationExtractor implements IObjectEx
     /**
      * @param {TObjectExpressionKeysTransformerCustomNodeFactory} objectExpressionKeysTransformerCustomNodeFactory
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IObjectExpressionKeysTransformerCustomNode)
             objectExpressionKeysTransformerCustomNodeFactory: TObjectExpressionKeysTransformerCustomNodeFactory,
     ) {

+ 1 - 1
src/node-transformers/dead-code-injection-transformers/DeadCodeInjectionTransformer.ts

@@ -82,7 +82,7 @@ export class DeadCodeInjectionTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IDeadCodeInjectionCustomNode)
             deadCodeInjectionCustomNodeFactory: TDeadNodeInjectionCustomNodeFactory,
         @inject(ServiceIdentifiers.ITransformersRunner) transformersRunner: ITransformersRunner,

+ 1 - 1
src/node-transformers/obfuscating-transformers/LabeledStatementTransformer.ts

@@ -47,7 +47,7 @@ export class LabeledStatementTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
             identifierObfuscatingReplacerFactory: TIdentifierObfuscatingReplacerFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/obfuscating-transformers/LiteralTransformer.ts

@@ -45,7 +45,7 @@ export class LiteralTransformer extends AbstractNodeTransformer {
      * @param {IStringArrayStorageAnalyzer} stringArrayStorageAnalyzer
      * @param {IEscapeSequenceEncoder} escapeSequenceEncoder
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IObfuscatingReplacer)
             literalObfuscatingReplacerFactory: TLiteralObfuscatingReplacerFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/obfuscating-transformers/ScopeIdentifiersTransformer.ts

@@ -60,7 +60,7 @@ export class ScopeIdentifiersTransformer extends AbstractNodeTransformer {
      * @param {IOptions} options
      * @param {IScopeAnalyzer} scopeAnalyzer
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
             identifierObfuscatingReplacerFactory: TIdentifierObfuscatingReplacerFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/obfuscating-transformers/obfuscating-replacers/AbstractObfuscatingReplacer.ts

@@ -18,7 +18,7 @@ export abstract class AbstractObfuscatingReplacer implements IObfuscatingReplace
     /**
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {
         this.options = options;

+ 1 - 1
src/node-transformers/obfuscating-transformers/obfuscating-replacers/identifier-obfuscating-replacers/BaseIdentifierObfuscatingReplacer.ts

@@ -29,7 +29,7 @@ export class BaseIdentifierObfuscatingReplacer extends AbstractObfuscatingReplac
      * @param {TIdentifierNamesGeneratorFactory} identifierNamesGeneratorFactory
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierNamesGenerator)
             identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory,
         @inject(ServiceIdentifiers.IOptions) options: IOptions

+ 1 - 1
src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/BooleanLiteralObfuscatingReplacer.ts

@@ -13,7 +13,7 @@ export class BooleanLiteralObfuscatingReplacer extends AbstractObfuscatingReplac
     /**
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {
         super(options);

+ 1 - 1
src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/NumberLiteralObfuscatingReplacer.ts

@@ -20,7 +20,7 @@ export class NumberLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
     /**
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {
         super(options);

+ 1 - 1
src/node-transformers/obfuscating-transformers/obfuscating-replacers/literal-obfuscating-replacers/StringLiteralObfuscatingReplacer.ts

@@ -47,7 +47,7 @@ export class StringLiteralObfuscatingReplacer extends AbstractObfuscatingReplace
      * @param {IStringArrayStorageAnalyzer} stringArrayStorageAnalyzer
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.TStringArrayStorage) stringArrayStorage: IStringArrayStorage,
         @inject(ServiceIdentifiers.IStringArrayStorageAnalyzer) stringArrayStorageAnalyzer: IStringArrayStorageAnalyzer,
         @inject(ServiceIdentifiers.IOptions) options: IOptions

+ 1 - 1
src/node-transformers/preparing-transformers/CommentsTransformer.ts

@@ -28,7 +28,7 @@ export class CommentsTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/preparing-transformers/CustomNodesTransformer.ts

@@ -58,7 +58,7 @@ export class CustomNodesTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.ICallsGraphAnalyzer) callsGraphAnalyzer: ICallsGraphAnalyzer,
         @inject(ServiceIdentifiers.IPrevailingKindOfVariablesAnalyzer)
             prevailingKindOfVariablesAnalyzer: IPrevailingKindOfVariablesAnalyzer,

+ 1 - 1
src/node-transformers/preparing-transformers/EvalCallExpressionTransformer.ts

@@ -26,7 +26,7 @@ export class EvalCallExpressionTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/preparing-transformers/MetadataTransformer.ts

@@ -22,7 +22,7 @@ export class MetadataTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/preparing-transformers/ObfuscatingGuardsTransformer.ts

@@ -40,7 +40,7 @@ export class ObfuscatingGuardsTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__INodeGuard) obfuscatingGuardFactory: TObfuscatingGuardFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions

+ 1 - 1
src/node-transformers/preparing-transformers/ParentificationTransformer.ts

@@ -21,7 +21,7 @@ export class ParentificationTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/node-transformers/preparing-transformers/VariablePreserveTransformer.ts

@@ -30,7 +30,7 @@ export class VariablePreserveTransformer extends AbstractNodeTransformer {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.Factory__IIdentifierObfuscatingReplacer)
             identifierObfuscatingReplacerFactory: TIdentifierObfuscatingReplacerFactory,
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,

+ 1 - 1
src/node-transformers/preparing-transformers/obfuscating-guards/BlackListObfuscatingGuard.ts

@@ -22,7 +22,7 @@ export class BlackListObfuscatingGuard implements IObfuscatingGuard {
      */
     private readonly blackListGuardsLength: number;
 
-    constructor () {
+    public constructor () {
         this.blackListGuardsLength = BlackListObfuscatingGuard.blackListGuards.length;
     }
 

+ 1 - 1
src/node-transformers/preparing-transformers/obfuscating-guards/ReservedStringObfuscatingGuard.ts

@@ -19,7 +19,7 @@ export class ReservedStringObfuscatingGuard implements IObfuscatingGuard {
     /**
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {
         this.options = options;

+ 0 - 2
src/node/NodeFactory.ts

@@ -1,5 +1,3 @@
-/* tslint:disable:max-file-line-count */
-
 import * as escodegen from 'escodegen';
 import * as ESTree from 'estree';
 

+ 1 - 0
src/node/NodeGuards.ts

@@ -225,6 +225,7 @@ export class NodeGuards {
      * @param {Object} object
      * @returns {boolean}
      */
+    // eslint-disable-next-line @typescript-eslint/ban-types
     public static isNode (object: Object & { type?: string }): object is ESTree.Node {
         return object && !object.type !== undefined;
     }

+ 1 - 1
src/node/NodeLexicalScopeUtils.ts

@@ -21,7 +21,7 @@ export class NodeLexicalScopeUtils {
         return NodeLexicalScopeUtils.getLexicalScopesRecursive(node);
     }
 
-    /***
+    /**
      * @param {Node} node
      * @param {number} maxSize
      * @param {TNodeWithLexicalScope[]} nodesWithLexicalScope

+ 1 - 1
src/node/NodeStatementUtils.ts

@@ -78,7 +78,7 @@ export class NodeStatementUtils {
         return parentNode;
     }
 
-    /***
+    /**
      * @param {Node} node
      * @param {number} maxSize
      * @param {TNodeWithStatements[]} nodesWithStatements

+ 1 - 1
src/options/Options.ts

@@ -291,7 +291,7 @@ export class Options implements IOptions {
      * @param {TInputOptions} inputOptions
      * @param {IOptionsNormalizer} optionsNormalizer
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.TInputOptions) inputOptions: TInputOptions,
         @inject(ServiceIdentifiers.IOptionsNormalizer) optionsNormalizer: IOptionsNormalizer
     ) {

+ 1 - 1
src/source-code/ObfuscatedCode.ts

@@ -32,7 +32,7 @@ export class ObfuscatedCode implements IObfuscatedCode {
     @initializable()
     private sourceMap!: string;
 
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.ICryptUtils) cryptUtils: ICryptUtils,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/source-code/SourceCode.ts

@@ -15,7 +15,7 @@ export class SourceCode implements ISourceCode {
      * @param {string} sourceCode
      * @param {string} sourceMap
      */
-    constructor (sourceCode: string, sourceMap: string) {
+    public constructor (sourceCode: string, sourceMap: string) {
         this.sourceCode = sourceCode;
         this.sourceMap = sourceMap;
     }

+ 1 - 1
src/storages/ArrayStorage.ts

@@ -40,7 +40,7 @@ export abstract class ArrayStorage <V> implements IArrayStorage <V> {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    protected constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

+ 1 - 1
src/storages/MapStorage.ts

@@ -35,7 +35,7 @@ export abstract class MapStorage <K, V> implements IMapStorage <K, V> {
      * @param {IRandomGenerator} randomGenerator
      * @param {IOptions} options
      */
-    constructor (
+    public constructor (
         @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
         @inject(ServiceIdentifiers.IOptions) options: IOptions
     ) {

Some files were not shown because too many files changed in this diff