├── .circleci └── config.yml ├── .codecov.yml ├── .dependency-cruiser.json ├── .editorconfig ├── .fimbullinter.yaml ├── .gitattributes ├── .gitignore ├── .nycrc.json ├── .travis.yml ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── .wotanrc.yaml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── appveyor.yml ├── ava.config.js ├── baselines └── packages │ ├── bifrost │ └── api │ │ ├── packlist.txt │ │ └── src │ │ └── index.d.ts │ ├── disir │ └── test │ │ ├── import-package │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-barrel-import │ │ ├── default │ │ │ ├── subdir │ │ │ │ └── test.ts.lint │ │ │ └── test.ts.lint │ │ └── project │ │ │ ├── subdir │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── no-import-self │ │ ├── default │ │ └── test.ts.lint │ │ └── project │ │ ├── test.ts.fix │ │ └── test.ts.lint │ ├── heimdall │ └── api │ │ ├── packlist.txt │ │ └── src │ │ └── index.d.ts │ ├── mimir │ ├── api │ │ ├── packlist.txt │ │ └── src │ │ │ ├── formatters │ │ │ ├── json.d.ts │ │ │ └── stylish.d.ts │ │ │ └── rules │ │ │ ├── async-function-assignability.d.ts │ │ │ ├── await-async-result.d.ts │ │ │ ├── await-only-promise.d.ts │ │ │ ├── ban-dom-globals.d.ts │ │ │ ├── delete-only-optional-property.d.ts │ │ │ ├── generator-require-yield.d.ts │ │ │ ├── new-parens.d.ts │ │ │ ├── no-case-declaration.d.ts │ │ │ ├── no-debugger.d.ts │ │ │ ├── no-duplicate-case.d.ts │ │ │ ├── no-duplicate-spread-property.d.ts │ │ │ ├── no-fallthrough.d.ts │ │ │ ├── no-implicit-tostring.d.ts │ │ │ ├── no-invalid-assertion.d.ts │ │ │ ├── no-misused-generics.d.ts │ │ │ ├── no-nan-compare.d.ts │ │ │ ├── no-object-spread-of-iterable.d.ts │ │ │ ├── no-octal-escape.d.ts │ │ │ ├── no-restricted-property-access.d.ts │ │ │ ├── no-return-await.d.ts │ │ │ ├── no-unassigned-variable.d.ts │ │ │ ├── no-uninferred-type-parameter.d.ts │ │ │ ├── no-unreachable-code.d.ts │ │ │ ├── no-unsafe-finally.d.ts │ │ │ ├── no-unstable-api-use.d.ts │ │ │ ├── no-unused-expression.d.ts │ │ │ ├── no-unused-label.d.ts │ │ │ ├── no-useless-assertion.d.ts │ │ │ ├── no-useless-declare.d.ts │ │ │ ├── no-useless-destructuring.d.ts │ │ │ ├── no-useless-initializer.d.ts │ │ │ ├── no-useless-jump-label.d.ts │ │ │ ├── no-useless-predicate.d.ts │ │ │ ├── no-useless-spread.d.ts │ │ │ ├── no-useless-strict.d.ts │ │ │ ├── no-useless-try-catch.d.ts │ │ │ ├── no-writeonly-property-read.d.ts │ │ │ ├── parameter-properties.d.ts │ │ │ ├── prefer-const.d.ts │ │ │ ├── prefer-dot-notation.d.ts │ │ │ ├── prefer-for-of.d.ts │ │ │ ├── prefer-namespace-keyword.d.ts │ │ │ ├── prefer-number-methods.d.ts │ │ │ ├── prefer-object-spread.d.ts │ │ │ ├── return-never-call.d.ts │ │ │ ├── syntaxcheck.d.ts │ │ │ ├── trailing-newline.d.ts │ │ │ ├── try-catch-return-await.d.ts │ │ │ ├── type-assertion.d.ts │ │ │ └── typecheck.d.ts │ └── test │ │ ├── async-function-assignability │ │ └── default │ │ │ └── test.ts.lint │ │ ├── await-async-result │ │ └── default │ │ │ └── test.ts.lint │ │ ├── await-only-promise │ │ └── default │ │ │ ├── for-await.ts.fix │ │ │ ├── for-await.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── ban-dom-globals │ │ ├── default │ │ │ └── test.ts.lint │ │ ├── es5-dom │ │ │ └── test.ts.lint │ │ └── es5 │ │ │ └── test.ts.lint │ │ ├── delete-only-optional-property │ │ └── default │ │ │ └── test.ts.lint │ │ ├── formatters.spec.ts.md │ │ ├── formatters.spec.ts.snap │ │ ├── generator-require-yield │ │ └── default │ │ │ └── test.ts.lint │ │ ├── new-parens │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-case-declaration │ │ └── default │ │ │ └── test.ts.lint │ │ ├── no-debugger │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-duplicate-case │ │ ├── default │ │ │ ├── bigint.ts.lint │ │ │ └── test.ts.lint │ │ ├── project-loose │ │ │ └── test.ts.lint │ │ └── project │ │ │ ├── bigint.ts.lint │ │ │ └── test.ts.lint │ │ ├── no-duplicate-spread-property │ │ ├── default │ │ │ └── test.ts.lint │ │ ├── js-literal │ │ │ └── literal.js.lint │ │ └── loose │ │ │ └── test.ts.lint │ │ ├── no-fallthrough │ │ ├── default │ │ │ └── test.ts.lint │ │ └── typed │ │ │ └── test.ts.lint │ │ ├── no-implicit-tostring │ │ ├── advanced │ │ │ └── test.ts.lint │ │ ├── allow-primitive │ │ │ └── test.ts.lint │ │ ├── default │ │ │ └── test.ts.lint │ │ └── number-boolean │ │ │ └── test.ts.lint │ │ ├── no-invalid-assertion │ │ └── default │ │ │ ├── bigint.ts.lint │ │ │ ├── literal.ts.lint │ │ │ └── union.ts.lint │ │ ├── no-misused-generics │ │ └── default │ │ │ └── test.ts.lint │ │ ├── no-nan-compare │ │ └── default │ │ │ └── test.ts.lint │ │ ├── no-object-spread-of-iterable │ │ └── default │ │ │ └── test.tsx.lint │ │ ├── no-octal-escape │ │ └── default │ │ │ ├── test.tsx.fix │ │ │ └── test.tsx.lint │ │ ├── no-restricted-property-access │ │ ├── default │ │ │ ├── jsdoc.js.lint │ │ │ ├── test.ts.lint │ │ │ └── use-before-assign.ts.lint │ │ ├── define │ │ │ └── use-before-assign.ts.lint │ │ └── fields │ │ │ └── use-before-assign.ts.lint │ │ ├── no-return-await │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-unassigned-variable │ │ └── default │ │ │ ├── ambient.d.ts.lint │ │ │ ├── global.ts.lint │ │ │ └── test.ts.lint │ │ ├── no-uninferred-type-parameter │ │ └── default │ │ │ ├── js.js.lint │ │ │ ├── jsx.tsx.lint │ │ │ └── test.ts.lint │ │ ├── no-unreachable-code │ │ ├── default │ │ │ └── test.ts.lint │ │ └── typed │ │ │ └── test.ts.lint │ │ ├── no-unsafe-finally │ │ └── default │ │ │ └── test.ts.lint │ │ ├── no-unstable-api-use │ │ └── default │ │ │ ├── es6-module.ts.lint │ │ │ ├── export-assignment.ts.lint │ │ │ ├── jsx.tsx.lint │ │ │ └── test.ts.lint │ │ ├── no-unused-expression │ │ ├── allow-new │ │ │ └── test.ts.lint │ │ ├── allow-short-circuit │ │ │ └── test.ts.lint │ │ ├── allow-tagged-template │ │ │ └── test.ts.lint │ │ ├── allow-ternary │ │ │ └── test.ts.lint │ │ └── default │ │ │ └── test.ts.lint │ │ ├── no-unused-label │ │ └── default │ │ │ ├── function.ts.fix │ │ │ ├── function.ts.lint │ │ │ ├── ok.ts.lint │ │ │ ├── test.d.ts.lint │ │ │ ├── wrong-location.ts.fix │ │ │ ├── wrong-location.ts.lint │ │ │ ├── wrong-target.js.fix │ │ │ └── wrong-target.js.lint │ │ ├── no-useless-assertion │ │ ├── loose │ │ │ ├── conditional-types.ts.fix │ │ │ ├── conditional-types.ts.lint │ │ │ ├── definite-assignment.ts.fix │ │ │ ├── definite-assignment.ts.lint │ │ │ ├── global.ts.fix │ │ │ ├── global.ts.lint │ │ │ ├── non-null.ts.fix │ │ │ ├── non-null.ts.lint │ │ │ ├── optional-chaining.ts.fix │ │ │ ├── optional-chaining.ts.lint │ │ │ ├── type-assertion.ts.fix │ │ │ └── type-assertion.ts.lint │ │ └── strict │ │ │ ├── conditional-types.ts.fix │ │ │ ├── conditional-types.ts.lint │ │ │ ├── definite-assignment.ts.fix │ │ │ ├── definite-assignment.ts.lint │ │ │ ├── global.ts.fix │ │ │ ├── global.ts.lint │ │ │ ├── non-null.ts.fix │ │ │ ├── non-null.ts.lint │ │ │ ├── optional-chaining.ts.fix │ │ │ ├── optional-chaining.ts.lint │ │ │ ├── type-assertion.ts.fix │ │ │ └── type-assertion.ts.lint │ │ ├── no-useless-declare │ │ └── default │ │ │ ├── declaration.d.ts.fix │ │ │ ├── declaration.d.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-useless-destructuring │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-useless-initializer │ │ ├── default │ │ │ ├── javascript.js.fix │ │ │ ├── javascript.js.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── project-loose │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── project │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-useless-jump-label │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-useless-predicate │ │ ├── default │ │ │ ├── bigint.ts.lint │ │ │ └── test.ts.lint │ │ └── loose │ │ │ └── test.ts.lint │ │ ├── no-useless-spread │ │ └── default │ │ │ ├── test.tsx.fix │ │ │ └── test.tsx.lint │ │ ├── no-useless-strict │ │ ├── always-strict │ │ │ ├── module.ts.fix │ │ │ ├── module.ts.lint │ │ │ ├── nested.ts.fix │ │ │ ├── nested.ts.lint │ │ │ ├── strict-module.ts.fix │ │ │ ├── strict-module.ts.lint │ │ │ ├── top.ts.fix │ │ │ └── top.ts.lint │ │ ├── default │ │ │ ├── module.ts.fix │ │ │ ├── module.ts.lint │ │ │ ├── nested.ts.fix │ │ │ ├── nested.ts.lint │ │ │ ├── strict-module.ts.fix │ │ │ ├── strict-module.ts.lint │ │ │ ├── top.ts.fix │ │ │ └── top.ts.lint │ │ └── project │ │ │ ├── module.ts.fix │ │ │ ├── module.ts.lint │ │ │ ├── nested.ts.fix │ │ │ ├── nested.ts.lint │ │ │ ├── strict-module.ts.fix │ │ │ ├── strict-module.ts.lint │ │ │ ├── top.ts.fix │ │ │ └── top.ts.lint │ │ ├── no-useless-try-catch │ │ └── default │ │ │ ├── fix.ts.fix │ │ │ ├── fix.ts.lint │ │ │ ├── invalid.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── no-writeonly-property-read │ │ └── default │ │ │ ├── assignment-declaration.js.lint │ │ │ └── test.ts.lint │ │ ├── parameter-properties │ │ ├── consistent │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── default │ │ │ ├── test.js.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── never │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── prefer-const │ │ ├── any │ │ │ ├── global.ts.fix │ │ │ ├── global.ts.lint │ │ │ ├── module.ts.fix │ │ │ └── module.ts.lint │ │ └── default │ │ │ ├── global.ts.fix │ │ │ ├── global.ts.lint │ │ │ ├── module.ts.fix │ │ │ └── module.ts.lint │ │ ├── prefer-dot-notation │ │ ├── default │ │ │ ├── invalid.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── no-property-access-from-index-signature │ │ │ ├── invalid.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── prefer-for-of │ │ ├── es3 │ │ │ └── types.ts.lint │ │ ├── es5-iteration │ │ │ └── types.ts.lint │ │ ├── es5 │ │ │ └── types.ts.lint │ │ └── es6 │ │ │ ├── detection.ts.lint │ │ │ └── types.ts.lint │ │ ├── prefer-namespace-keyword │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── prefer-number-methods │ │ ├── es5 │ │ │ ├── declaration.d.ts.lint │ │ │ └── test.ts.lint │ │ └── esnext │ │ │ ├── declaration.d.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── prefer-object-spread │ │ └── default │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── return-never-call │ │ └── default │ │ │ └── test.ts.lint │ │ ├── syntaxcheck │ │ └── default │ │ │ ├── javascript.js.lint │ │ │ └── typescript.ts.lint │ │ ├── trailing-newline │ │ └── default │ │ │ ├── comment.ts.fix │ │ │ ├── comment.ts.lint │ │ │ ├── empty-bom.ts.lint │ │ │ ├── empty.ts.lint │ │ │ ├── fail.crlf.ts.fix │ │ │ ├── fail.crlf.ts.lint │ │ │ ├── ok.crlf.ts.lint │ │ │ ├── ok.ts.lint │ │ │ ├── whitespace.ts.fix │ │ │ └── whitespace.ts.lint │ │ ├── try-catch-return-await │ │ └── default │ │ │ ├── location.ts.fix │ │ │ ├── location.ts.lint │ │ │ ├── types.ts.fix │ │ │ └── types.ts.lint │ │ ├── type-assertion │ │ ├── classic │ │ │ ├── jsx.tsx.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── default │ │ │ ├── jsx.tsx.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── typecheck │ │ ├── composite │ │ └── typescript.ts.lint │ │ ├── declaration │ │ └── typescript.ts.lint │ │ └── default │ │ ├── checked.js.lint │ │ ├── javascript.js.lint │ │ └── typescript.ts.lint │ ├── mithotyn │ └── api │ │ └── packlist.txt │ ├── valtyr │ └── api │ │ ├── index.d.ts │ │ ├── packlist.txt │ │ └── src │ │ ├── configuration-provider.d.ts │ │ ├── formatter-loader.d.ts │ │ ├── line-switches.d.ts │ │ └── rule-loader.d.ts │ ├── ve │ ├── api │ │ ├── packlist.txt │ │ └── src │ │ │ └── index.d.ts │ └── test │ │ ├── all │ │ ├── bye.vue.fix │ │ ├── bye.vue.lint │ │ ├── first-line.vue.fix │ │ ├── first-line.vue.lint │ │ ├── foo.ts.fix │ │ ├── foo.ts.lint │ │ ├── hello.vue.fix │ │ ├── hello.vue.lint │ │ ├── jsx.tsx.fix │ │ └── jsx.tsx.lint │ │ └── default │ │ ├── bye.vue.fix │ │ ├── bye.vue.lint │ │ ├── first-line.vue.fix │ │ ├── first-line.vue.lint │ │ ├── foo.ts.fix │ │ ├── foo.ts.lint │ │ ├── hello.vue.fix │ │ ├── hello.vue.lint │ │ ├── jsx.tsx.fix │ │ └── jsx.tsx.lint │ ├── wotan │ ├── api │ │ ├── index.d.ts │ │ ├── language-service │ │ │ └── index.d.ts │ │ ├── packlist.txt │ │ └── src │ │ │ ├── argparse.d.ts │ │ │ ├── baseline.d.ts │ │ │ ├── di │ │ │ ├── core.module.d.ts │ │ │ └── default.module.d.ts │ │ │ ├── fix.d.ts │ │ │ ├── linter.d.ts │ │ │ ├── optparse.d.ts │ │ │ ├── runner.d.ts │ │ │ └── services │ │ │ ├── cached-file-system.d.ts │ │ │ ├── configuration-manager.d.ts │ │ │ ├── default │ │ │ ├── builtin-resolver.d.ts │ │ │ ├── cache-factory.d.ts │ │ │ ├── configuration-provider.d.ts │ │ │ ├── content-hasher.d.ts │ │ │ ├── deprecation-handler.d.ts │ │ │ ├── directory-service.d.ts │ │ │ ├── file-filter.d.ts │ │ │ ├── file-system.d.ts │ │ │ ├── formatter-loader-host.d.ts │ │ │ ├── line-switches.d.ts │ │ │ ├── message-handler.d.ts │ │ │ ├── resolver.d.ts │ │ │ ├── rule-loader-host.d.ts │ │ │ └── state-persistence.d.ts │ │ │ ├── dependency-resolver.d.ts │ │ │ ├── formatter-loader.d.ts │ │ │ ├── processor-loader.d.ts │ │ │ ├── program-state.d.ts │ │ │ └── rule-loader.d.ts │ └── test │ │ ├── baseline.spec.ts.md │ │ ├── baseline.spec.ts.snap │ │ ├── commands.spec.ts.md │ │ ├── commands.spec.ts.snap │ │ ├── configuration │ │ ├── main │ │ │ ├── jstest.js.lint │ │ │ └── tstest.ts.lint │ │ └── submodule │ │ │ ├── jstest.js.lint │ │ │ └── tstest.ts.lint │ │ ├── files │ │ └── node_modules │ │ │ ├── default │ │ │ ├── processor.js.lint │ │ │ ├── test.jsx.lint │ │ │ └── test.mjs.lint │ │ │ ├── processor │ │ │ ├── processor.js.lint │ │ │ └── test.jsx.lint │ │ │ ├── project-processor │ │ │ └── test.jsx.lint │ │ │ └── project │ │ │ └── test.jsx.lint │ │ ├── fix │ │ ├── false │ │ │ └── test.ts.lint │ │ ├── five │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── one │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ └── true │ │ │ ├── invalid.ts.lint │ │ │ ├── test.ts.fix │ │ │ └── test.ts.lint │ │ ├── line-switches │ │ ├── default │ │ │ ├── dont-crash-no-eofline.ts.lint │ │ │ ├── dont-crash.ts.lint │ │ │ └── test.ts.lint │ │ └── report-useless │ │ │ ├── dont-crash-no-eofline.ts.fix │ │ │ ├── dont-crash-no-eofline.ts.lint │ │ │ ├── dont-crash.ts.fix │ │ │ ├── dont-crash.ts.lint │ │ │ ├── useless.ts.fix │ │ │ └── useless.ts.lint │ │ ├── predicates │ │ └── default │ │ │ └── test.ts.lint │ │ ├── processors │ │ ├── prefixed │ │ │ ├── default │ │ │ │ ├── foo.test.fix │ │ │ │ └── foo.test.lint │ │ │ └── project │ │ │ │ ├── foo.test.fix │ │ │ │ ├── foo.test.lint │ │ │ │ ├── other.test.fix │ │ │ │ └── other.test.lint │ │ └── vue │ │ │ ├── default │ │ │ ├── bye.vue.fix │ │ │ ├── bye.vue.lint │ │ │ ├── hello.vue.fix │ │ │ ├── hello.vue.lint │ │ │ ├── utils.ts.fix │ │ │ └── utils.ts.lint │ │ │ ├── exclude │ │ │ └── utils.ts.lint │ │ │ └── no-project │ │ │ ├── bye.vue.lint │ │ │ └── hello.vue.lint │ │ ├── program-state.spec.ts.md │ │ ├── program-state.spec.ts.snap │ │ ├── project │ │ ├── exclude-external │ │ │ └── default │ │ │ │ └── test.ts.lint │ │ ├── fix-error │ │ │ └── default │ │ │ │ ├── a.ts.fix │ │ │ │ ├── a.ts.lint │ │ │ │ ├── b.ts.fix │ │ │ │ └── b.ts.lint │ │ ├── fix │ │ │ └── default │ │ │ │ ├── invalid.ts.lint │ │ │ │ ├── test.ts.fix │ │ │ │ └── test.ts.lint │ │ ├── references │ │ │ ├── default │ │ │ │ └── e │ │ │ │ │ └── index.ts.lint │ │ │ ├── filtered │ │ │ │ ├── a │ │ │ │ │ ├── a.ts.lint │ │ │ │ │ ├── a1.js.lint │ │ │ │ │ └── ambient.d.ts.lint │ │ │ │ ├── c │ │ │ │ │ └── index.ts.lint │ │ │ │ └── e │ │ │ │ │ └── index.ts.lint │ │ │ ├── leaf │ │ │ │ └── outfile │ │ │ │ │ └── a.ts.lint │ │ │ ├── missing │ │ │ │ └── missing │ │ │ │ │ ├── y.ts.fix │ │ │ │ │ └── y.ts.lint │ │ │ ├── outfile │ │ │ │ └── outfile │ │ │ │ │ └── b.ts.lint │ │ │ └── references │ │ │ │ ├── a │ │ │ │ ├── a.ts.fix │ │ │ │ ├── a.ts.lint │ │ │ │ ├── a1.js.lint │ │ │ │ ├── ambient.d.ts.lint │ │ │ │ └── index.ts.lint │ │ │ │ ├── b │ │ │ │ └── index.tsx.lint │ │ │ │ ├── c │ │ │ │ └── index.ts.lint │ │ │ │ ├── d │ │ │ │ └── index.ts.lint │ │ │ │ ├── e │ │ │ │ └── index.ts.lint │ │ │ │ └── outfile │ │ │ │ ├── a.ts.lint │ │ │ │ └── b.ts.lint │ │ ├── resolvejsonmodule │ │ │ └── default │ │ │ │ └── test.ts.lint │ │ └── setup │ │ │ └── default │ │ │ └── test.ts.lint │ │ ├── runner.spec.ts.md │ │ └── runner.spec.ts.snap │ └── ymir │ └── api │ ├── packlist.txt │ └── src │ └── index.d.ts ├── docs ├── api.md ├── local-rules.md ├── recipes │ ├── no-unused-locals.md │ ├── tslint-type-check.md │ └── tslint-vue.md ├── shareable-config.md ├── testing-rules.md ├── understanding-typescript-api.md └── writing-rules.md ├── package.json ├── packages ├── bifrost │ ├── .npmignore │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.ts │ └── test │ │ ├── formatter.spec.ts │ │ ├── rule.spec.ts │ │ └── tslint.json ├── disir │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.yaml │ │ ├── rules │ │ │ ├── import-package.ts │ │ │ ├── no-barrel-import.ts │ │ │ └── no-import-self.ts │ │ └── util.ts │ └── test │ │ ├── import-package │ │ ├── .wotanrc.yaml │ │ ├── test.json │ │ └── test.ts │ │ ├── no-barrel-import │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── index.ts │ │ ├── other.ts │ │ ├── project.test.json │ │ ├── subdir │ │ │ ├── index.ts │ │ │ └── test.ts │ │ ├── test.ts │ │ └── tsconfig.json │ │ └── no-import-self │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── index.ts │ │ ├── other.ts │ │ ├── project.test.json │ │ ├── test.ts │ │ └── tsconfig.json ├── heimdall │ ├── .npmignore │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.ts │ └── test │ │ ├── fixtures │ │ ├── .wotanrc.yaml │ │ ├── my-rule.js │ │ └── myTslintRuleRule.js │ │ ├── formatter-loader.spec.ts │ │ ├── module.spec.ts │ │ ├── rule-loader.spec.ts │ │ └── tslint.json ├── mimir │ ├── .npmignore │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── docs │ │ ├── async-function-assignability.md │ │ ├── await-async-result.md │ │ ├── await-only-promise.md │ │ ├── ban-dom-globals.md │ │ ├── delete-only-optional-property.md │ │ ├── generator-require-yield.md │ │ ├── new-parens.md │ │ ├── no-case-declaration.md │ │ ├── no-debugger.md │ │ ├── no-duplicate-case.md │ │ ├── no-duplicate-spread-property.md │ │ ├── no-fallthrough.md │ │ ├── no-implicit-tostring.md │ │ ├── no-invalid-assertion.md │ │ ├── no-misused-generics.md │ │ ├── no-nan-compare.md │ │ ├── no-object-spread-of-iterable.md │ │ ├── no-octal-escape.md │ │ ├── no-restricted-property-access.md │ │ ├── no-return-await.md │ │ ├── no-unassigned-variable.md │ │ ├── no-uninferred-type-parameter.md │ │ ├── no-unreachable-code.md │ │ ├── no-unsafe-finally.md │ │ ├── no-unstable-api-use.md │ │ ├── no-unused-expression.md │ │ ├── no-unused-label.md │ │ ├── no-useless-assertion.md │ │ ├── no-useless-declare.md │ │ ├── no-useless-destructuring.md │ │ ├── no-useless-initializer.md │ │ ├── no-useless-jump-label.md │ │ ├── no-useless-predicate.md │ │ ├── no-useless-spread.md │ │ ├── no-useless-strict.md │ │ ├── no-useless-try-catch.md │ │ ├── no-writeonly-property-read.md │ │ ├── parameter-properties.md │ │ ├── prefer-const.md │ │ ├── prefer-dot-notation.md │ │ ├── prefer-for-of.md │ │ ├── prefer-namespace-keyword.md │ │ ├── prefer-number-methods.md │ │ ├── prefer-object-spread.md │ │ ├── return-never-call.md │ │ ├── syntaxcheck.md │ │ ├── traling-newline.md │ │ ├── try-catch-return-await.md │ │ ├── type-assertion.md │ │ └── typecheck.md │ ├── latest.yaml │ ├── package.json │ ├── recommended.yaml │ ├── src │ │ ├── formatters │ │ │ ├── json.ts │ │ │ └── stylish.ts │ │ ├── iteration.ts │ │ ├── restricted-property.ts │ │ ├── rules │ │ │ ├── async-function-assignability.ts │ │ │ ├── await-async-result.ts │ │ │ ├── await-only-promise.ts │ │ │ ├── ban-dom-globals.ts │ │ │ ├── delete-only-optional-property.ts │ │ │ ├── generator-require-yield.ts │ │ │ ├── new-parens.ts │ │ │ ├── no-case-declaration.ts │ │ │ ├── no-debugger.ts │ │ │ ├── no-duplicate-case.ts │ │ │ ├── no-duplicate-spread-property.ts │ │ │ ├── no-fallthrough.ts │ │ │ ├── no-implicit-tostring.ts │ │ │ ├── no-invalid-assertion.ts │ │ │ ├── no-misused-generics.ts │ │ │ ├── no-nan-compare.ts │ │ │ ├── no-object-spread-of-iterable.ts │ │ │ ├── no-octal-escape.ts │ │ │ ├── no-restricted-property-access.ts │ │ │ ├── no-return-await.ts │ │ │ ├── no-unassigned-variable.ts │ │ │ ├── no-uninferred-type-parameter.ts │ │ │ ├── no-unreachable-code.ts │ │ │ ├── no-unsafe-finally.ts │ │ │ ├── no-unstable-api-use.ts │ │ │ ├── no-unused-expression.ts │ │ │ ├── no-unused-label.ts │ │ │ ├── no-useless-assertion.ts │ │ │ ├── no-useless-declare.ts │ │ │ ├── no-useless-destructuring.ts │ │ │ ├── no-useless-initializer.ts │ │ │ ├── no-useless-jump-label.ts │ │ │ ├── no-useless-predicate.ts │ │ │ ├── no-useless-spread.ts │ │ │ ├── no-useless-strict.ts │ │ │ ├── no-useless-try-catch.ts │ │ │ ├── no-writeonly-property-read.ts │ │ │ ├── parameter-properties.ts │ │ │ ├── prefer-const.ts │ │ │ ├── prefer-dot-notation.ts │ │ │ ├── prefer-for-of.ts │ │ │ ├── prefer-namespace-keyword.ts │ │ │ ├── prefer-number-methods.ts │ │ │ ├── prefer-object-spread.ts │ │ │ ├── return-never-call.ts │ │ │ ├── syntaxcheck.ts │ │ │ ├── trailing-newline.ts │ │ │ ├── try-catch-return-await.ts │ │ │ ├── type-assertion.ts │ │ │ └── typecheck.ts │ │ └── utils.ts │ └── test │ │ ├── async-function-assignability │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── await-async-result │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── await-only-promise │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── for-await.ts │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── ban-dom-globals │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── es5-dom.test.json │ │ ├── es5.test.json │ │ ├── test.ts │ │ ├── tsconfig-es5-dom.json │ │ ├── tsconfig-es5.json │ │ └── tsconfig.json │ │ ├── delete-only-optional-property │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── formatters.spec.ts │ │ ├── generator-require-yield │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── new-parens │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-case-declaration │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-debugger │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-duplicate-case │ │ ├── .wotanrc.yaml │ │ ├── bigint.ts │ │ ├── default.test.json │ │ ├── project-loose.test.json │ │ ├── project.test.json │ │ ├── test.ts │ │ ├── tsconfig-loose.json │ │ └── tsconfig.json │ │ ├── no-duplicate-spread-property │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── js-literal.test.json │ │ ├── literal.js │ │ ├── loose.test.json │ │ ├── test.ts │ │ ├── tsconfig-loose.json │ │ └── tsconfig.json │ │ ├── no-fallthrough │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.ts │ │ ├── tsconfig.json │ │ └── typed.test.json │ │ ├── no-implicit-tostring │ │ ├── advanced.test.json │ │ ├── advanced.wotanrc.yaml │ │ ├── allow-primitive.test.json │ │ ├── allow-primitive.wotanrc.yaml │ │ ├── default.test.json │ │ ├── default.wotanrc.yaml │ │ ├── number-boolean.test.json │ │ ├── number-boolean.wotanrc.yaml │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── no-invalid-assertion │ │ ├── .wotanrc.yaml │ │ ├── bigint.ts │ │ ├── default.test.json │ │ ├── literal.ts │ │ ├── tsconfig.json │ │ └── union.ts │ │ ├── no-misused-generics │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-nan-compare │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-object-spread-of-iterable │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.tsx │ │ └── tsconfig.json │ │ ├── no-octal-escape │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.tsx │ │ ├── no-restricted-property-access │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── define.test.json │ │ ├── fields.test.json │ │ ├── jsdoc.js │ │ ├── test.ts │ │ ├── tsconfig-define.json │ │ ├── tsconfig-fields.json │ │ ├── tsconfig.json │ │ └── use-before-assign.ts │ │ ├── no-return-await │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-unassigned-variable │ │ ├── .wotanrc.yaml │ │ ├── ambient.d.ts │ │ ├── default.test.json │ │ ├── global.ts │ │ └── test.ts │ │ ├── no-uninferred-type-parameter │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── js.js │ │ ├── jsx.tsx │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── no-unreachable-code │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.ts │ │ ├── tsconfig.json │ │ └── typed.test.json │ │ ├── no-unsafe-finally │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-unstable-api-use │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── es6-module.ts │ │ ├── export-assignment.ts │ │ ├── jsx.tsx │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── no-unused-expression │ │ ├── .wotanrc-allow-new.yaml │ │ ├── .wotanrc-allow-short-circuit.yaml │ │ ├── .wotanrc-allow-tagged-template.yaml │ │ ├── .wotanrc-allow-ternary.yaml │ │ ├── .wotanrc.yaml │ │ ├── allow-new.test.json │ │ ├── allow-short-circuit.test.json │ │ ├── allow-tagged-template.test.json │ │ ├── allow-ternary.test.json │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-unused-label │ │ ├── .wotanrc.json5 │ │ ├── default.test.json │ │ ├── function.ts │ │ ├── ok.ts │ │ ├── test.d.ts │ │ ├── wrong-location.ts │ │ └── wrong-target.js │ │ ├── no-useless-assertion │ │ ├── .wotanrc.yaml │ │ ├── conditional-types.ts │ │ ├── definite-assignment.ts │ │ ├── global.ts │ │ ├── global2.ts │ │ ├── loose.test.json │ │ ├── non-null.ts │ │ ├── optional-chaining.ts │ │ ├── strict.test.json │ │ ├── tsconfig-loose.json │ │ ├── tsconfig.json │ │ └── type-assertion.ts │ │ ├── no-useless-declare │ │ ├── .wotanrc.yaml │ │ ├── declaration.d.ts │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-useless-destructuring │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-useless-initializer │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── javascript.js │ │ ├── project-loose.test.json │ │ ├── project.test.json │ │ ├── test.ts │ │ ├── tsconfig-loose.json │ │ └── tsconfig.json │ │ ├── no-useless-jump-label │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── no-useless-predicate │ │ ├── .wotanrc.yaml │ │ ├── bigint.ts │ │ ├── default.test.json │ │ ├── loose.test.json │ │ ├── test.ts │ │ ├── tsconfig.json │ │ └── tsconfig.loose.json │ │ ├── no-useless-spread │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.tsx │ │ ├── no-useless-strict │ │ ├── .wotanrc.yaml │ │ ├── always-strict.test.json │ │ ├── default.test.json │ │ ├── module.ts │ │ ├── nested.ts │ │ ├── project.test.json │ │ ├── strict-module.ts │ │ ├── top.ts │ │ ├── tsconfig-strict.json │ │ └── tsconfig.json │ │ ├── no-useless-try-catch │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── fix.ts │ │ ├── invalid.ts │ │ └── test.ts │ │ ├── no-writeonly-property-read │ │ ├── .wotanrc.yaml │ │ ├── assignment-declaration.js │ │ ├── default.test.json │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── parameter-properties │ │ ├── .wotanrc-consistent.yaml │ │ ├── .wotanrc-never.yaml │ │ ├── .wotanrc.yaml │ │ ├── consistent.test.json │ │ ├── default.test.json │ │ ├── never.test.json │ │ ├── test.js │ │ └── test.ts │ │ ├── prefer-const │ │ ├── .wotanrc-any.yaml │ │ ├── .wotanrc.yaml │ │ ├── any.test.json │ │ ├── default.test.json │ │ ├── global.ts │ │ └── module.ts │ │ ├── prefer-dot-notation │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── invalid.ts │ │ ├── no-property-access-from-index-signature.test.json │ │ ├── test.ts │ │ ├── tsconfig.json │ │ └── tsconfig.nopropertyaccessfromindexsignature.json │ │ ├── prefer-for-of │ │ ├── .wotanrc.yaml │ │ ├── detection.ts │ │ ├── es3.test.json │ │ ├── es5-iteration.test.json │ │ ├── es5.test.json │ │ ├── es6.test.json │ │ ├── jsdoc.js │ │ ├── tsconfig-es5-iteration.json │ │ ├── tsconfig-es5.json │ │ ├── tsconfig-es6.json │ │ ├── tsconfig.json │ │ └── types.ts │ │ ├── prefer-namespace-keyword │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ └── test.ts │ │ ├── prefer-number-methods │ │ ├── .wotanrc.yaml │ │ ├── declaration.d.ts │ │ ├── es5.test.json │ │ ├── esnext.test.json │ │ ├── test.ts │ │ ├── tsconfig.es5.json │ │ └── tsconfig.esnext.json │ │ ├── prefer-object-spread │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── return-never-call │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── test.ts │ │ └── tsconfig.json │ │ ├── syntaxcheck │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── javascript.js │ │ ├── tsconfig.json │ │ └── typescript.ts │ │ ├── trailing-newline │ │ ├── .wotanrc.yaml │ │ ├── comment.ts │ │ ├── default.test.json │ │ ├── empty-bom.ts │ │ ├── empty.ts │ │ ├── fail.crlf.ts │ │ ├── ok.crlf.ts │ │ ├── ok.ts │ │ └── whitespace.ts │ │ ├── try-catch-return-await │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── location.ts │ │ ├── tsconfig.json │ │ └── types.ts │ │ ├── tslint.json │ │ ├── type-assertion │ │ ├── .wotanrc-classic.yaml │ │ ├── .wotanrc.yaml │ │ ├── classic.test.json │ │ ├── default.test.json │ │ ├── jsx.tsx │ │ └── test.ts │ │ └── typecheck │ │ ├── .wotanrc.yaml │ │ ├── checked.js │ │ ├── composite.test.json │ │ ├── declaration.test.json │ │ ├── default.test.json │ │ ├── external.d.ts │ │ ├── javascript.js │ │ ├── tsconfig-composite.json │ │ ├── tsconfig-declaration.json │ │ ├── tsconfig.json │ │ └── typescript.ts ├── mithotyn │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── index.ts │ ├── package.json │ └── tslint.json ├── valtyr │ ├── .npmignore │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── index.ts │ ├── package.json │ ├── src │ │ ├── configuration-provider.ts │ │ ├── formatter-loader.ts │ │ ├── line-switches.ts │ │ └── rule-loader.ts │ └── test │ │ ├── configuration-provider.spec.ts │ │ ├── fixtures │ │ ├── .dotfile.ts │ │ ├── .dotjs.jsx │ │ ├── .fimbullinter.yaml │ │ ├── myRuleRule.js │ │ ├── processed.vue │ │ ├── processed2.vue │ │ ├── processed3.vue │ │ ├── test.excluded.ts │ │ ├── test.tsx │ │ └── tslint.json │ │ ├── formatter-loader.spec.ts │ │ ├── line-switches.spec.ts │ │ ├── module.spec.ts │ │ ├── rule-loader.spec.ts │ │ └── tslint.json ├── ve │ ├── .npmignore │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── index.yaml │ └── test │ │ ├── .wotanrc-all.yaml │ │ ├── .wotanrc.yaml │ │ ├── all.test.json │ │ ├── bye.vue │ │ ├── default.test.json │ │ ├── first-line.vue │ │ ├── foo.ts │ │ ├── hello.vue │ │ ├── jsx.tsx │ │ ├── nested-script.vue │ │ ├── no-script.vue │ │ ├── tsconfig.json │ │ └── unrelated.html ├── wotan │ ├── .npmignore │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── bin │ │ └── main.js │ ├── index.ts │ ├── language-service │ │ └── index.ts │ ├── package.json │ ├── src │ │ ├── argparse.ts │ │ ├── baseline.ts │ │ ├── cli.ts │ │ ├── commands │ │ │ ├── base.ts │ │ │ ├── index.ts │ │ │ ├── lint.ts │ │ │ ├── save.ts │ │ │ ├── show.ts │ │ │ ├── test.ts │ │ │ └── validate.ts │ │ ├── config-hash.ts │ │ ├── di │ │ │ ├── core.module.ts │ │ │ └── default.module.ts │ │ ├── fix.ts │ │ ├── linter.ts │ │ ├── optparse.ts │ │ ├── project-host.ts │ │ ├── runner.ts │ │ ├── services │ │ │ ├── cached-file-system.ts │ │ │ ├── configuration-manager.ts │ │ │ ├── default │ │ │ │ ├── builtin-resolver.ts │ │ │ │ ├── cache-factory.ts │ │ │ │ ├── configuration-provider.ts │ │ │ │ ├── content-hasher.ts │ │ │ │ ├── deprecation-handler.ts │ │ │ │ ├── directory-service.ts │ │ │ │ ├── file-filter.ts │ │ │ │ ├── file-system.ts │ │ │ │ ├── formatter-loader-host.ts │ │ │ │ ├── line-switches.ts │ │ │ │ ├── message-handler.ts │ │ │ │ ├── resolver.ts │ │ │ │ ├── rule-loader-host.ts │ │ │ │ └── state-persistence.ts │ │ │ ├── dependency-resolver.ts │ │ │ ├── formatter-loader.ts │ │ │ ├── processor-loader.ts │ │ │ ├── program-state.ts │ │ │ └── rule-loader.ts │ │ └── utils.ts │ └── test │ │ ├── argparse.spec.ts │ │ ├── baseline.spec.ts │ │ ├── cached-file-system.spec.ts │ │ ├── cli.spec.ts │ │ ├── commands.spec.ts │ │ ├── configuration.spec.ts │ │ ├── configuration │ │ ├── jstest.js │ │ ├── main.test.json │ │ ├── node_modules │ │ │ └── my-config │ │ │ │ ├── index.yaml │ │ │ │ └── package.json │ │ ├── submodule.test.json │ │ └── tstest.ts │ │ ├── dependency-resolver.spec.ts │ │ ├── files │ │ └── node_modules │ │ │ ├── .wotanrc-processor.yaml │ │ │ ├── .wotanrc.yaml │ │ │ ├── default.test.json │ │ │ ├── processor.js │ │ │ ├── processor.test.json │ │ │ ├── project-processor.test.json │ │ │ ├── project.test.json │ │ │ ├── test.jsx │ │ │ ├── test.md │ │ │ ├── test.mjs │ │ │ └── tsconfig.json │ │ ├── fix.spec.ts │ │ ├── fix │ │ ├── .wotanrc.yaml │ │ ├── delete.js │ │ ├── false.test.json │ │ ├── five.test.json │ │ ├── invalid.ts │ │ ├── one.test.json │ │ ├── test.ts │ │ └── true.test.json │ │ ├── fixtures │ │ ├── cache │ │ │ ├── .wotanrc.yaml │ │ │ ├── a.ts │ │ │ ├── b.ts │ │ │ ├── tsconfig.fimbullintercache │ │ │ └── tsconfig.json │ │ ├── configuration │ │ │ ├── .wotanrc.yaml │ │ │ ├── base.yaml │ │ │ ├── base2.yaml │ │ │ └── invalid-rule.yaml │ │ ├── global-config │ │ │ ├── .fimbullinter.yaml │ │ │ ├── empty │ │ │ │ └── .fimbullinter.yaml │ │ │ └── invalid │ │ │ │ └── .fimbullinter.yaml │ │ ├── invalid.js │ │ ├── multi-project │ │ │ ├── .wotanrc.yaml │ │ │ ├── src │ │ │ │ ├── foo.ts │ │ │ │ └── tsconfig.json │ │ │ └── test │ │ │ │ ├── foo.spec.ts │ │ │ │ └── tsconfig.json │ │ ├── node_modules │ │ │ ├── custom-formatter.js │ │ │ ├── custom-processor.js │ │ │ └── my-config.js │ │ ├── paths │ │ │ ├── .wotanrc.yaml │ │ │ ├── a.ts │ │ │ └── tsconfig.json │ │ └── test │ │ │ ├── .fail-fix.test.json │ │ │ ├── .fail.test.json │ │ │ ├── .success.test.json │ │ │ ├── .wotanrc-empty.yaml │ │ │ ├── .wotanrc.fail-fix.yaml │ │ │ ├── .wotanrc.fail.yaml │ │ │ ├── .wotanrc.yaml │ │ │ ├── 1.ts │ │ │ ├── 2.ts │ │ │ ├── 3.ts │ │ │ ├── baselines │ │ │ └── .fail-fix │ │ │ │ ├── 1.ts.lint │ │ │ │ ├── 2.ts.lint │ │ │ │ ├── 3.ts.fix │ │ │ │ ├── 3.ts.lint │ │ │ │ ├── 4.ts.fix │ │ │ │ └── 4.ts.lint │ │ │ └── subdir │ │ │ ├── .invalid-option-name.test.json │ │ │ ├── .invalid-option-value.test.json │ │ │ └── .outside.test.json │ │ ├── line-switches.spec.ts │ │ ├── line-switches │ │ ├── .wotanrc.yaml │ │ ├── default.test.json │ │ ├── dont-crash-no-eofline.ts │ │ ├── dont-crash.ts │ │ ├── report-useless.test.json │ │ ├── test.ts │ │ └── useless.ts │ │ ├── linter.spec.ts │ │ ├── predicates │ │ ├── .wotanrc.yaml │ │ ├── false.js │ │ ├── reason.js │ │ ├── rule.js │ │ ├── test.json │ │ ├── test.ts │ │ └── true.js │ │ ├── processors │ │ ├── prefixed │ │ │ ├── .wotanrc-exclude.yaml │ │ │ ├── .wotanrc.yaml │ │ │ ├── default.test.json │ │ │ ├── foo.test │ │ │ ├── other.test │ │ │ ├── processor.js │ │ │ ├── project.test.json │ │ │ └── tsconfig.json │ │ └── vue │ │ │ ├── .wotanrc-exclude.yaml │ │ │ ├── .wotanrc-ext.yaml │ │ │ ├── .wotanrc.yaml │ │ │ ├── bye.vue │ │ │ ├── default.test.json │ │ │ ├── exclude.test.json │ │ │ ├── extension.js │ │ │ ├── hello.vue │ │ │ ├── no-project.test.json │ │ │ ├── tsconfig.json │ │ │ ├── utils.ts │ │ │ └── vue.js │ │ ├── program-state.spec.ts │ │ ├── project │ │ ├── exclude-external │ │ │ ├── .wotanrc.yaml │ │ │ ├── test.json │ │ │ ├── test.ts │ │ │ └── tsconfig.json │ │ ├── fix-error │ │ │ ├── .wotanrc.yaml │ │ │ ├── a.ts │ │ │ ├── b.ts │ │ │ ├── default.test.json │ │ │ ├── delete.js │ │ │ └── tsconfig.json │ │ ├── fix │ │ │ ├── .wotanrc.yaml │ │ │ ├── default.test.json │ │ │ ├── foo.js │ │ │ ├── invalid.ts │ │ │ ├── other.ts │ │ │ ├── test.ts │ │ │ ├── tsconfig.json │ │ │ └── zzz.ts │ │ ├── references │ │ │ ├── .wotanrc.yaml │ │ │ ├── a │ │ │ │ ├── a.ts │ │ │ │ ├── a1.js │ │ │ │ ├── ambient.d.ts │ │ │ │ ├── data.json │ │ │ │ ├── index.ts │ │ │ │ └── tsconfig.json │ │ │ ├── b │ │ │ │ ├── index.tsx │ │ │ │ └── tsconfig.json │ │ │ ├── c │ │ │ │ ├── index.ts │ │ │ │ └── tsconfig.json │ │ │ ├── d │ │ │ │ ├── index.ts │ │ │ │ └── tsconfig.json │ │ │ ├── default.test.json │ │ │ ├── e │ │ │ │ ├── index.ts │ │ │ │ └── tsconfig.json │ │ │ ├── filtered.test.json │ │ │ ├── leaf.test.json │ │ │ ├── missing.test.json │ │ │ ├── missing │ │ │ │ ├── .wotanrc.yaml │ │ │ │ ├── tsconfig.x.json │ │ │ │ ├── tsconfig.y.json │ │ │ │ ├── x.d.ts │ │ │ │ ├── x.js │ │ │ │ ├── x.ts │ │ │ │ └── y.ts │ │ │ ├── out-a │ │ │ │ ├── a.js │ │ │ │ ├── a1.js │ │ │ │ ├── data.json │ │ │ │ ├── index.js │ │ │ │ └── tsconfig.json │ │ │ ├── outdir │ │ │ │ ├── a │ │ │ │ │ ├── a.d.ts │ │ │ │ │ ├── a1.d.ts │ │ │ │ │ └── index.d.ts │ │ │ │ ├── b │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── index.js │ │ │ │ ├── c │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── index.js │ │ │ │ └── d │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── index.js │ │ │ ├── outfile.test.json │ │ │ ├── outfile │ │ │ │ ├── a.ts │ │ │ │ ├── b.ts │ │ │ │ ├── out-a.d.ts │ │ │ │ ├── out-a.js │ │ │ │ ├── tsconfig.a.json │ │ │ │ └── tsconfig.b.json │ │ │ ├── quotemark.js │ │ │ ├── references.test.json │ │ │ └── tsconfig.json │ │ ├── resolvejsonmodule │ │ │ ├── .wotanrc.yaml │ │ │ ├── data.json │ │ │ ├── default.test.json │ │ │ ├── test.ts │ │ │ └── tsconfig.json │ │ └── setup │ │ │ ├── .wotanrc.yaml │ │ │ ├── default.test.json │ │ │ ├── test.ts │ │ │ ├── tsconfig.json │ │ │ └── types │ │ │ ├── .wotanrc.yaml │ │ │ └── foo │ │ │ └── index.d.ts │ │ ├── runner.spec.ts │ │ ├── services.spec.ts │ │ ├── tslint.json │ │ └── utils.spec.ts └── ymir │ ├── .npmignore │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── package.json │ └── src │ └── index.ts ├── renovate.json ├── scripts ├── api-guard.ts ├── cleanup-tests.ts ├── fixed-issues.ts ├── github-release.ts ├── last-travis-nightly.js ├── nightly.ts ├── prepare-release.ts ├── release.ts ├── tslint.json ├── updated.ts └── util.ts ├── tsconfig.json ├── tslint.json └── yarn.lock /.codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | notify: 3 | require_ci_to_pass: false 4 | comment: false 5 | coverage: 6 | range: "75...100" 7 | status: 8 | project: 9 | default: 10 | # basic 11 | target: auto 12 | threshold: "0.2%" 13 | patch: false 14 | changes: false 15 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | trim_trailing_whitespace = true 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 4 8 | indent_style = space 9 | insert_final_newline = true 10 | 11 | [*.{json,yaml,yml,md}] 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /.fimbullinter.yaml: -------------------------------------------------------------------------------- 1 | project: 2 | - tsconfig.json 3 | reportUselessDirectives: true 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ** text eol=lf 2 | **/*crlf* -text 3 | -------------------------------------------------------------------------------- /.nycrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "packages/*/src/**", 4 | "packages/*/index.ts" 5 | ], 6 | "exclude": [ 7 | "packages/wotan/src/di/**" 8 | ], 9 | "extension": [ 10 | ".ts" 11 | ], 12 | "reporter": [ 13 | "lcov" 14 | ], 15 | "sourceMap": true, 16 | "all": true, 17 | "cache": true 18 | } 19 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "EditorConfig.editorconfig", 6 | "ms-vscode.vscode-typescript-tslint-plugin", 7 | "bierner.markdown-preview-github-styles", 8 | "fimbullinter.vscode-plugin" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2017 Klaus Meinhardt (https://github.com/ajafff) 2 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Checklist 2 | 3 | - [ ] Fixes: # 4 | - [ ] Added or updated tests / baselines 5 | - [ ] Documentation update 6 | 7 | #### Overview of change 8 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # Test against the latest version of Node.js 2 | environment: 3 | nodejs_version: "" 4 | 5 | install: 6 | - ps: Install-Product node $env:nodejs_version 7 | - yarn 8 | 9 | build: off 10 | 11 | test_script: 12 | - yarn compile --incremental false 13 | - yarn lint 14 | - node_modules/.bin/nyc node_modules/.bin/run-s test 15 | - yarn report-coverage 16 | -------------------------------------------------------------------------------- /ava.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | files: [ 3 | "packages/*/test/*.spec.js" 4 | ], 5 | snapshotDir: "baselines", 6 | verbose: true, 7 | }; 8 | -------------------------------------------------------------------------------- /baselines/packages/bifrost/api/packlist.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | NOTICE 3 | README.md 4 | package.json 5 | src/index.d.ts 6 | src/index.js 7 | src/index.js.map 8 | -------------------------------------------------------------------------------- /baselines/packages/bifrost/api/src/index.d.ts: -------------------------------------------------------------------------------- 1 | import { RuleContext, RuleConstructor, FormatterConstructor } from '@fimbul/ymir'; 2 | import * as TSLint from 'tslint'; 3 | export declare function wrapTslintRule(Rule: TSLint.RuleConstructor, name?: string): RuleConstructor; 4 | export declare function wrapTslintFormatter(Formatter: TSLint.FormatterConstructor): FormatterConstructor; 5 | export declare function wrapRuleForTslint(Rule: RuleConstructor): TSLint.RuleConstructor; 6 | -------------------------------------------------------------------------------- /baselines/packages/disir/test/import-package/default/test.ts.fix: -------------------------------------------------------------------------------- 1 | import {Linter} from '@fimbul/wotan'; 2 | import {Finding} from '@fimbul/wotan'; 3 | import {AbstractRule} from '@fimbul/wotan'; 4 | import {Rule} from '../../src/rules/import-package'; 5 | import foo from 'packages/something/foo'; 6 | import self from './test'; 7 | import heimdall = require('@fimbul/heimdall'); 8 | export * from '@fimbul/bifrost'; 9 | -------------------------------------------------------------------------------- /baselines/packages/disir/test/no-barrel-import/project/subdir/test.ts.fix: -------------------------------------------------------------------------------- 1 | import {foo} from '../other'; 2 | import {bar} from '../other'; 3 | import {baz} from '../other'; 4 | import {bas} from '../other'; 5 | -------------------------------------------------------------------------------- /baselines/packages/disir/test/no-barrel-import/project/test.ts.fix: -------------------------------------------------------------------------------- 1 | import {baz} from './other'; 2 | import {bas} from './other'; 3 | 4 | import {foo as otherFoo} from './other'; 5 | import {bar as otherBar} from './other'; 6 | import {foo} from './subdir'; 7 | import {bar} from './subdir/index'; 8 | 9 | export * from '.'; 10 | export * from '@fimbul/wotan'; 11 | -------------------------------------------------------------------------------- /baselines/packages/disir/test/no-import-self/project/test.ts.fix: -------------------------------------------------------------------------------- 1 | import { foo, bas } from './index'; 2 | import { bar as renamedBar } from './other'; 3 | import { getPackageName } from '../../src/util'; 4 | import {baz} from './index'; 5 | import {bar} from './other'; 6 | import * as ns from '@fimbul/disir'; 7 | import '@fimbul/disir'; 8 | 9 | export * from '@fimbul/disir'; 10 | -------------------------------------------------------------------------------- /baselines/packages/heimdall/api/packlist.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | NOTICE 3 | README.md 4 | package.json 5 | src/index.d.ts 6 | src/index.js 7 | src/index.js.map 8 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/formatters/json.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractFormatter, FileSummary } from '@fimbul/ymir'; 2 | export declare class Formatter extends AbstractFormatter { 3 | prefix: string; 4 | format(fileName: string, summary: FileSummary): string | undefined; 5 | flush(): string; 6 | } 7 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/formatters/stylish.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractFormatter, FileSummary } from '@fimbul/ymir'; 2 | export declare class Formatter extends AbstractFormatter { 3 | format(fileName: string, summary: FileSummary): undefined; 4 | flush(): string | undefined; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/async-function-assignability.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/await-async-result.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/await-only-promise.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/ban-dom-globals.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/delete-only-optional-property.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/generator-require-yield.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/new-parens.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-case-declaration.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-debugger.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-duplicate-case.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-duplicate-spread-property.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-fallthrough.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-invalid-assertion.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-misused-generics.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-nan-compare.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-object-spread-of-iterable.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-octal-escape.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-restricted-property-access.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-return-await.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-unassigned-variable.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-uninferred-type-parameter.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-unreachable-code.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-unsafe-finally.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-unstable-api-use.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-unused-expression.d.ts: -------------------------------------------------------------------------------- 1 | import { ConfigurableRule } from '@fimbul/ymir'; 2 | export interface Options { 3 | allowNew: boolean; 4 | allowShortCircuit: boolean; 5 | allowTaggedTemplate: boolean; 6 | allowTernary: boolean; 7 | } 8 | export declare class Rule extends ConfigurableRule { 9 | parseOptions(input: Partial | {} | null | undefined): Options; 10 | apply(): void; 11 | } 12 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-unused-label.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-assertion.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-declare.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-destructuring.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-initializer.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-jump-label.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-predicate.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-spread.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-strict.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-useless-try-catch.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/no-writeonly-property-read.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/parameter-properties.d.ts: -------------------------------------------------------------------------------- 1 | import { ConfigurableRule } from '@fimbul/ymir'; 2 | export interface Options { 3 | mode: Mode; 4 | } 5 | export declare enum Mode { 6 | Never = 0, 7 | WhenPossible = 1, 8 | Consistent = 2 9 | } 10 | export declare class Rule extends ConfigurableRule { 11 | protected parseOptions(options: { 12 | mode: string; 13 | } | null | undefined): Options; 14 | apply(): void; 15 | } 16 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/prefer-const.d.ts: -------------------------------------------------------------------------------- 1 | import { ConfigurableRule } from '@fimbul/ymir'; 2 | export interface Options { 3 | destructuring: 'all' | 'any'; 4 | } 5 | export declare class Rule extends ConfigurableRule { 6 | protected parseOptions(options: { 7 | destructuring?: string; 8 | } | null | undefined): Options; 9 | apply(): void; 10 | } 11 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/prefer-dot-notation.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/prefer-for-of.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/prefer-namespace-keyword.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/prefer-number-methods.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/prefer-object-spread.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/return-never-call.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/syntaxcheck.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/trailing-newline.d.ts: -------------------------------------------------------------------------------- 1 | import { AbstractRule } from '@fimbul/ymir'; 2 | export declare class Rule extends AbstractRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/try-catch-return-await.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/type-assertion.d.ts: -------------------------------------------------------------------------------- 1 | import { ConfigurableRule } from '@fimbul/ymir'; 2 | export interface Options { 3 | style: 'classic' | 'as'; 4 | } 5 | export declare class Rule extends ConfigurableRule { 6 | parseOptions(options: Partial | null | undefined): Options; 7 | apply(): void; 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/mimir/api/src/rules/typecheck.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | export declare class Rule extends TypedRule { 3 | apply(): void; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/formatters.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fimbullinter/wotan/e25bf84561562935584a47220af5c996d6b746e7/baselines/packages/mimir/test/formatters.spec.ts.snap -------------------------------------------------------------------------------- /baselines/packages/mimir/test/new-parens/default/test.ts.fix: -------------------------------------------------------------------------------- 1 | new Array() 2 | 3 | new Array 4 | (); 5 | 6 | new Array(); 7 | new Array(); 8 | new Array(1); 9 | 10 | // new Array 11 | new Array(); 12 | 13 | Array 14 | Array(1) 15 | 16 | interface FooConstructor { 17 | new(): any; 18 | } 19 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/new-parens/default/test.ts.lint: -------------------------------------------------------------------------------- 1 | new Array 2 | ~nil [error new-parens: Expected parentheses on constructor call.] 3 | 4 | new Array 5 | (); 6 | 7 | new Array(); 8 | new Array(); 9 | new Array(1); 10 | 11 | // new Array 12 | new Array; 13 | ~nil [error new-parens: Expected parentheses on constructor call.] 14 | 15 | Array 16 | Array(1) 17 | 18 | interface FooConstructor { 19 | new(): any; 20 | } 21 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-debugger/default/test.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | label: ; 3 | if (foo) 4 | ; 5 | else { 6 | } 7 | foo.debugger; 8 | foo.debugger(); 9 | "debugger"; 10 | "debugger;"; 11 | for (;;) ; 12 | do 13 | ; 14 | while (true) 15 | ` 16 | debugger 17 | debugger; 18 | ` 19 | 20 | class Foo { 21 | debugger; 22 | static debugger; 23 | } /* multiline 24 | comment */ 25 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-octal-escape/default/test.tsx.fix: -------------------------------------------------------------------------------- 1 | export {}; 2 | 3 | 040; 4 | 0o40; 5 | /* \040 */'\u0020'; 6 | '\x20' 7 | '\x20'; 8 | '\x040'; 9 | '\\040'; 10 | '\\\x20'; 11 | '\\\\040'; 12 | '\0'; 13 | '\x00'; 14 | '\x00'; 15 | '\x01'; 16 | '\x018'; 17 | '\x02\x03b\x04'; 18 | '\xff'; 19 | '\x1f8'; 20 | '\x3f7'; 21 | '\x200'; 22 | '\xc0'; 23 | `\x08`; 24 | `\xa9${1}\8${2}\x07${3}a\x06b`; 25 | 26 | const foo: '\x01' = '1'; 27 | 28 | \40 29 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unassigned-variable/default/ambient.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare let foo: number; 2 | declare const bar: string; 3 | 4 | declare namespace ns { 5 | let foo: number; 6 | let bar: string; 7 | export {foo}; 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unassigned-variable/default/global.ts.lint: -------------------------------------------------------------------------------- 1 | let someGlobal: string; 2 | var someOtherGlobal: number; 3 | 4 | { 5 | let local: string; 6 | ~~~~~ [error no-unassigned-variable: Variable 'local' is never assigned.] 7 | let otherLocal = 1; 8 | let initializedLater: boolean; 9 | initializedLater = true; 10 | } 11 | 12 | declare module "foo" { 13 | let foo: number; 14 | let bar: string; 15 | export {foo}; 16 | } 17 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unstable-api-use/default/export-assignment.ts.lint: -------------------------------------------------------------------------------- 1 | /** @deprecated */ 2 | function doStuff() {} 3 | namespace doStuff {} 4 | 5 | export = doStuff; 6 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/function.ts.fix: -------------------------------------------------------------------------------- 1 | bar: for (;;) { 2 | let fn = function foo() { 3 | while (true) 4 | break foo; 5 | } 6 | continue bar; 7 | } 8 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/function.ts.lint: -------------------------------------------------------------------------------- 1 | bar: foo: for (;;) { 2 | ~~~ [error no-unused-label: Unused label 'foo'.] 3 | let fn = function foo() { 4 | while (true) 5 | break foo; 6 | } 7 | continue bar; 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/ok.ts.lint: -------------------------------------------------------------------------------- 1 | foo: for (;;) { 2 | let foo; 3 | bar: switch (foo) { 4 | case bar: 5 | break bar; 6 | default: continue foo; 7 | } 8 | 9 | bar: { 10 | break bar; 11 | } 12 | 13 | bar: if (Boolean()) baz: { 14 | break baz; 15 | } else 16 | break bar; 17 | 18 | bar: break bar; 19 | } 20 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/test.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare const foo: string; 2 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/wrong-location.ts.fix: -------------------------------------------------------------------------------- 1 | foo: for (;;) { 2 | let foo = bar; 3 | break foo; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/wrong-location.ts.lint: -------------------------------------------------------------------------------- 1 | foo: for (;;) { 2 | bar: baz: let foo = bar; 3 | ~~~ [error no-unused-label: Unused label 'bar'.] 4 | ~~~ [error no-unused-label: Unused label 'baz'.] 5 | break foo; 6 | } 7 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/wrong-target.js.fix: -------------------------------------------------------------------------------- 1 | for (;;) { 2 | break; 3 | bar: switch (true) { 4 | case true: 5 | break bar; 6 | default: 7 | continue bar; 8 | } 9 | } 10 | 11 | for(;;) 12 | foo: while(true) 13 | break foo; 14 | break foo; 15 | 16 | break bas; 17 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-unused-label/default/wrong-target.js.lint: -------------------------------------------------------------------------------- 1 | bar: for (;;) { 2 | ~~~ [error no-unused-label: Unused label 'bar'.] 3 | break; 4 | bar: switch (true) { 5 | case true: 6 | break bar; 7 | default: 8 | continue bar; 9 | } 10 | } 11 | 12 | foo: for(;;) 13 | ~~~ [error no-unused-label: Unused label 'foo'.] 14 | foo: while(true) 15 | break foo; 16 | break foo; 17 | 18 | baz: break bas; 19 | ~~~ [error no-unused-label: Unused label 'baz'.] 20 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-assertion/loose/global.ts.fix: -------------------------------------------------------------------------------- 1 | let foo: string; 2 | foo; 3 | foo; 4 | NaN; 5 | something; 6 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-assertion/loose/optional-chaining.ts.fix: -------------------------------------------------------------------------------- 1 | export {}; 2 | declare function get(): T; 3 | 4 | get<{prop: string}>()?.prop; 5 | get<{prop?: string}>()?.prop; 6 | get()?.prop; 7 | get()?.prop.charAt(0); 8 | get()?.prop.charAt(0); 9 | get()?.prop.charAt(0); 10 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-assertion/strict/global.ts.fix: -------------------------------------------------------------------------------- 1 | let foo: string; 2 | foo!; 3 | foo; 4 | NaN; 5 | something; 6 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-assertion/strict/global.ts.lint: -------------------------------------------------------------------------------- 1 | let foo: string; 2 | foo!; 3 | foo; 4 | ~~~~~~~~ [error no-useless-assertion: This assertion is unnecesary as it doesn't change the type of the expression.] 5 | NaN!; 6 | ~ [error no-useless-assertion: This assertion is unnecesary as it doesn't change the type of the expression.] 7 | something!; 8 | ~ [error no-useless-assertion: This assertion is unnecesary as it doesn't change the type of the expression.] 9 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-assertion/strict/optional-chaining.ts.fix: -------------------------------------------------------------------------------- 1 | export {}; 2 | declare function get(): T; 3 | 4 | get<{prop: string}>()?.prop; 5 | get<{prop?: string}>()?.prop!; 6 | get()?.prop!; 7 | get()?.prop.charAt(0); 8 | get()?.prop!.charAt(0); 9 | get()?.prop!.charAt(0); 10 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/always-strict/module.ts.fix: -------------------------------------------------------------------------------- 1 | export {}; 2 | namespace foo { 3 | foo; 4 | 'use strict'; 5 | } 6 | 7 | var C = class { 8 | get prop() { 9 | return 1; 10 | } 11 | }; 12 | 13 | const obj = { 14 | get prop() { 15 | return 1; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/always-strict/strict-module.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | export {}; 3 | namespace foo { 4 | foo; 5 | 'use strict'; 6 | } 7 | 8 | var C = class { 9 | get prop() { 10 | return 1; 11 | } 12 | }; 13 | 14 | const obj = { 15 | get prop() { 16 | return 1; 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/always-strict/top.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | namespace foo { 3 | foo; 4 | 'use strict'; 5 | } 6 | 7 | var C = class { 8 | get prop() { 9 | return 1; 10 | } 11 | }; 12 | 13 | const obj = { 14 | get prop() { 15 | return 1; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/default/module.ts.fix: -------------------------------------------------------------------------------- 1 | export {}; 2 | namespace foo { 3 | foo; 4 | 'use strict'; 5 | } 6 | 7 | var C = class { 8 | get prop() { 9 | return 1; 10 | } 11 | }; 12 | 13 | const obj = { 14 | get prop() { 15 | return 1; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/default/strict-module.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | export {}; 3 | namespace foo { 4 | foo; 5 | 'use strict'; 6 | } 7 | 8 | var C = class { 9 | get prop() { 10 | return 1; 11 | } 12 | }; 13 | 14 | const obj = { 15 | get prop() { 16 | return 1; 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/default/top.ts.fix: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | namespace foo { 3 | foo; 4 | 'use strict'; 5 | } 6 | 7 | var C = class { 8 | get prop() { 9 | return 1; 10 | } 11 | }; 12 | 13 | const obj = { 14 | get prop() { 15 | return 1; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/project/module.ts.fix: -------------------------------------------------------------------------------- 1 | export {}; 2 | namespace foo { 3 | foo; 4 | 'use strict'; 5 | } 6 | 7 | var C = class { 8 | get prop() { 9 | return 1; 10 | } 11 | }; 12 | 13 | const obj = { 14 | get prop() { 15 | return 1; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/project/strict-module.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | export {}; 3 | namespace foo { 4 | foo; 5 | 'use strict'; 6 | } 7 | 8 | var C = class { 9 | get prop() { 10 | return 1; 11 | } 12 | }; 13 | 14 | const obj = { 15 | get prop() { 16 | return 1; 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-useless-strict/project/top.ts.fix: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | namespace foo { 3 | foo; 4 | 'use strict'; 5 | } 6 | 7 | var C = class { 8 | get prop() { 9 | return 1; 10 | } 11 | }; 12 | 13 | const obj = { 14 | get prop() { 15 | return 1; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/no-writeonly-property-read/default/assignment-declaration.js.lint: -------------------------------------------------------------------------------- 1 | const obj = {}; 2 | Object.defineProperty(obj, 'foo', {value: 1}); 3 | Object.defineProperty(obj, 'bar', {get: () => 1}); 4 | Object.defineProperty(obj, 'baz', {set: (/** @type {number} */ v) => {}}); 5 | obj.foo + obj.bar + obj.baz; 6 | ~~~ [error no-writeonly-property-read: Cannot read property 'baz' of type 'typeof obj' as it only has a 'set' accessor.] 7 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/parameter-properties/default/test.js.lint: -------------------------------------------------------------------------------- 1 | export class Car { 2 | constructor(engine) { 3 | this.engine = engine; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/prefer-const/any/global.ts.fix: -------------------------------------------------------------------------------- 1 | let foo = 1; 2 | var bar = 2; 3 | { 4 | const baz = 3; 5 | var bas = 4; 6 | } 7 | function test() { 8 | const foobar = 5; 9 | const foobaz = 6; 10 | } 11 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/prefer-const/default/global.ts.fix: -------------------------------------------------------------------------------- 1 | let foo = 1; 2 | var bar = 2; 3 | { 4 | const baz = 3; 5 | var bas = 4; 6 | } 7 | function test() { 8 | const foobar = 5; 9 | const foobaz = 6; 10 | } 11 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/prefer-dot-notation/default/invalid.ts.lint: -------------------------------------------------------------------------------- 1 | window[]; 2 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/prefer-dot-notation/no-property-access-from-index-signature/invalid.ts.lint: -------------------------------------------------------------------------------- 1 | window[]; 2 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/prefer-namespace-keyword/default/test.ts.fix: -------------------------------------------------------------------------------- 1 | export namespace foo { 2 | declare namespace bar {} 3 | } 4 | export namespace foo { 5 | namespace nested.sub { 6 | namespace event.more.nesting {} 7 | } 8 | } 9 | 10 | namespace namespace { 11 | namespace module {} 12 | } 13 | 14 | declare module 'foo' { 15 | namespace ns { 16 | namespace nested {} 17 | } 18 | } 19 | declare module 'bar'; 20 | 21 | declare global {} 22 | 23 | let module = ''; 24 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/prefer-number-methods/es5/declaration.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare namespace foo { 2 | function isNaN(p: number): boolean; 3 | function isFinite(p: number): boolean; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/prefer-number-methods/esnext/declaration.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare namespace foo { 2 | function isNaN(p: number): boolean; 3 | function isFinite(p: number): boolean; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/comment.ts.fix: -------------------------------------------------------------------------------- 1 | // comment 2 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/comment.ts.lint: -------------------------------------------------------------------------------- 1 | // comment 2 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/empty-bom.ts.lint: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/empty.ts.lint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fimbullinter/wotan/e25bf84561562935584a47220af5c996d6b746e7/baselines/packages/mimir/test/trailing-newline/default/empty.ts.lint -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/fail.crlf.ts.fix: -------------------------------------------------------------------------------- 1 | foo(); 2 | bar(); 3 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/fail.crlf.ts.lint: -------------------------------------------------------------------------------- 1 | foo(); 2 | bar(); 3 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/ok.crlf.ts.lint: -------------------------------------------------------------------------------- 1 | foo(); 2 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/ok.ts.lint: -------------------------------------------------------------------------------- 1 | foo(); 2 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/whitespace.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/trailing-newline/default/whitespace.ts.lint: -------------------------------------------------------------------------------- 1 | 2 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/mimir/test/type-assertion/classic/jsx.tsx.lint: -------------------------------------------------------------------------------- 1 | 'foo' as string; 2 | ; 3 | -------------------------------------------------------------------------------- /baselines/packages/mimir/test/type-assertion/default/jsx.tsx.lint: -------------------------------------------------------------------------------- 1 | 'foo' as string; 2 | ; 3 | -------------------------------------------------------------------------------- /baselines/packages/mithotyn/api/packlist.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | NOTICE 3 | README.md 4 | index.js 5 | package.json 6 | -------------------------------------------------------------------------------- /baselines/packages/valtyr/api/index.d.ts: -------------------------------------------------------------------------------- 1 | import { ContainerModule } from 'inversify'; 2 | import { TslintFormatterLoaderHost } from './src/formatter-loader'; 3 | import { TslintRuleLoaderHost } from './src/rule-loader'; 4 | import { TslintLineSwitchParser } from './src/line-switches'; 5 | import { TslintConfigurationProvider } from './src/configuration-provider'; 6 | export { TslintFormatterLoaderHost, TslintRuleLoaderHost, TslintLineSwitchParser, TslintConfigurationProvider, }; 7 | export declare function createModule(): ContainerModule; 8 | -------------------------------------------------------------------------------- /baselines/packages/valtyr/api/packlist.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | NOTICE 3 | README.md 4 | index.d.ts 5 | index.js 6 | index.js.map 7 | package.json 8 | src/configuration-provider.d.ts 9 | src/configuration-provider.js 10 | src/configuration-provider.js.map 11 | src/formatter-loader.d.ts 12 | src/formatter-loader.js 13 | src/formatter-loader.js.map 14 | src/line-switches.d.ts 15 | src/line-switches.js 16 | src/line-switches.js.map 17 | src/rule-loader.d.ts 18 | src/rule-loader.js 19 | src/rule-loader.js.map 20 | -------------------------------------------------------------------------------- /baselines/packages/valtyr/api/src/formatter-loader.d.ts: -------------------------------------------------------------------------------- 1 | import { FormatterLoaderHost, FormatterConstructor } from '@fimbul/wotan'; 2 | export declare class TslintFormatterLoaderHost implements FormatterLoaderHost { 3 | loadCoreFormatter: typeof loadFormatter; 4 | loadCustomFormatter: typeof loadFormatter; 5 | } 6 | declare function loadFormatter(name: string): FormatterConstructor | undefined; 7 | export {}; 8 | -------------------------------------------------------------------------------- /baselines/packages/valtyr/api/src/line-switches.d.ts: -------------------------------------------------------------------------------- 1 | import { LineSwitchParser, RawLineSwitch, LineSwitchParserContext } from '@fimbul/wotan'; 2 | export declare class TslintLineSwitchParser implements LineSwitchParser { 3 | parse({ sourceFile }: LineSwitchParserContext): RawLineSwitch[]; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/valtyr/api/src/rule-loader.d.ts: -------------------------------------------------------------------------------- 1 | import { RuleLoaderHost, RuleConstructor } from '@fimbul/wotan'; 2 | export declare class TslintRuleLoaderHost implements RuleLoaderHost { 3 | loadCoreRule(name: string): RuleConstructor | undefined; 4 | loadCustomRule(name: string, dir: string): RuleConstructor | undefined; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/ve/api/packlist.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | NOTICE 3 | README.md 4 | package.json 5 | src/index.d.ts 6 | src/index.js 7 | src/index.js.map 8 | src/index.yaml 9 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/all/first-line.vue.fix: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/all/first-line.vue.lint: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/all/foo.ts.fix: -------------------------------------------------------------------------------- 1 | import {foo} from './jsx'; 2 | (async function() { 3 | 1; 4 | // JSDoc type annotations only work in JavaScript files 5 | /** @type {PromiseLike} */ 6 | let p = null; 7 | let v = null; 8 | p; 9 | v; 10 | await foo(); 11 | await Promise.resolve(); 12 | })(); 13 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/all/jsx.tsx.fix: -------------------------------------------------------------------------------- 1 | 2 | export async function foo() { 3 | 1; 4 | // JSDoc type annotations only work in JavaScript files 5 | /** @type {PromiseLike} */ 6 | let p = null; 7 | let v = null; 8 | p; 9 | v; 10 | await Promise.resolve(); 11 | } 12 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/default/first-line.vue.fix: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/default/first-line.vue.lint: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/default/foo.ts.fix: -------------------------------------------------------------------------------- 1 | import {foo} from './jsx'; 2 | (async function() { 3 | 1; 4 | // JSDoc type annotations only work in JavaScript files 5 | /** @type {PromiseLike} */ 6 | let p = null; 7 | let v = null; 8 | p; 9 | v; 10 | await foo(); 11 | await Promise.resolve(); 12 | })(); 13 | -------------------------------------------------------------------------------- /baselines/packages/ve/test/default/jsx.tsx.fix: -------------------------------------------------------------------------------- 1 | 2 | export async function foo() { 3 | 1; 4 | // JSDoc type annotations only work in JavaScript files 5 | /** @type {PromiseLike} */ 6 | let p = null; 7 | let v = null; 8 | p; 9 | v; 10 | await Promise.resolve(); 11 | } 12 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/baseline.d.ts: -------------------------------------------------------------------------------- 1 | import { FileSummary } from '@fimbul/ymir'; 2 | export declare function isCodeLine(line: string): boolean; 3 | export declare function createBaseline(summary: FileSummary): string; 4 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/di/core.module.d.ts: -------------------------------------------------------------------------------- 1 | import { ContainerModule } from 'inversify'; 2 | import { GlobalOptions } from '@fimbul/ymir'; 3 | export declare function createCoreModule(globalOptions: GlobalOptions): ContainerModule; 4 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/di/default.module.d.ts: -------------------------------------------------------------------------------- 1 | import { ContainerModule } from 'inversify'; 2 | export declare function createDefaultModule(): ContainerModule; 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/builtin-resolver.d.ts: -------------------------------------------------------------------------------- 1 | import { BuiltinResolver, Resolver } from '@fimbul/ymir'; 2 | export declare class DefaultBuiltinResolver implements BuiltinResolver { 3 | constructor(resolver: Resolver); 4 | resolveConfig(name: string): string; 5 | resolveRule(name: string): string; 6 | resolveFormatter(name: string): string; 7 | } 8 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/cache-factory.d.ts: -------------------------------------------------------------------------------- 1 | import { CacheFactory, Cache } from '@fimbul/ymir'; 2 | export declare class DefaultCacheFactory implements CacheFactory { 3 | create(weak: true): Cache; 4 | create(weak?: false): Cache; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/content-hasher.d.ts: -------------------------------------------------------------------------------- 1 | import { ContentId, ContentIdHost } from '@fimbul/ymir'; 2 | export declare class ContentHasher implements ContentId { 3 | forFile(fileName: string, host: ContentIdHost): string; 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/deprecation-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { DeprecationHandler, DeprecationTarget, MessageHandler } from '@fimbul/ymir'; 2 | export declare class DefaultDeprecationHandler implements DeprecationHandler { 3 | constructor(logger: MessageHandler); 4 | handle(target: DeprecationTarget, name: string, text?: string): void; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/directory-service.d.ts: -------------------------------------------------------------------------------- 1 | import { DirectoryService } from '@fimbul/ymir'; 2 | export declare class NodeDirectoryService implements DirectoryService { 3 | getCurrentDirectory(): string; 4 | getHomeDirectory(): string; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/file-filter.d.ts: -------------------------------------------------------------------------------- 1 | import { FileFilterFactory, FileFilterContext, FileFilter } from '@fimbul/ymir'; 2 | import * as ts from 'typescript'; 3 | export declare class DefaultFileFilterFactory implements FileFilterFactory { 4 | create(context: FileFilterContext): DefaultFileFilter; 5 | } 6 | declare class DefaultFileFilter implements FileFilter { 7 | constructor(program: ts.Program, host: FileFilterContext['host']); 8 | filter(file: ts.SourceFile): boolean; 9 | } 10 | export {}; 11 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/formatter-loader-host.d.ts: -------------------------------------------------------------------------------- 1 | import { FormatterLoaderHost, FormatterConstructor, Resolver, BuiltinResolver } from '@fimbul/ymir'; 2 | export declare class NodeFormatterLoader implements FormatterLoaderHost { 3 | constructor(resolver: Resolver, builtinResolver: BuiltinResolver); 4 | loadCoreFormatter(name: string): FormatterConstructor | undefined; 5 | loadCustomFormatter(name: string, basedir: string): FormatterConstructor | undefined; 6 | } 7 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/message-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { MessageHandler } from '@fimbul/ymir'; 2 | export declare class ConsoleMessageHandler implements MessageHandler { 3 | log(message: string): void; 4 | warn(message: string): void; 5 | error(e: Error): void; 6 | } 7 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/rule-loader-host.d.ts: -------------------------------------------------------------------------------- 1 | import { RuleLoaderHost, RuleConstructor, BuiltinResolver, Resolver } from '@fimbul/ymir'; 2 | export declare class NodeRuleLoader implements RuleLoaderHost { 3 | constructor(builtinResolver: BuiltinResolver, resolver: Resolver); 4 | loadCoreRule(name: string): RuleConstructor | undefined; 5 | loadCustomRule(name: string, directory: string): RuleConstructor | undefined; 6 | } 7 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/default/state-persistence.d.ts: -------------------------------------------------------------------------------- 1 | import { CachedFileSystem } from '../cached-file-system'; 2 | import { StatePersistence, StaticProgramState } from '@fimbul/ymir'; 3 | export declare class DefaultStatePersistence implements StatePersistence { 4 | constructor(fs: CachedFileSystem); 5 | loadState(project: string): StaticProgramState | undefined; 6 | saveState(project: string, state: StaticProgramState): void; 7 | } 8 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/formatter-loader.d.ts: -------------------------------------------------------------------------------- 1 | import { FormatterLoaderHost, FormatterConstructor, DirectoryService } from '@fimbul/ymir'; 2 | export declare class FormatterLoader { 3 | constructor(host: FormatterLoaderHost, directories: DirectoryService); 4 | loadFormatter(name: string): FormatterConstructor; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/processor-loader.d.ts: -------------------------------------------------------------------------------- 1 | import { ProcessorConstructor, Resolver, CacheFactory } from '@fimbul/ymir'; 2 | export declare class ProcessorLoader { 3 | constructor(resolver: Resolver, cache: CacheFactory); 4 | loadProcessor(path: string): ProcessorConstructor; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/api/src/services/rule-loader.d.ts: -------------------------------------------------------------------------------- 1 | import { RuleLoaderHost, RuleConstructor, MessageHandler, CacheFactory } from '@fimbul/ymir'; 2 | export declare class RuleLoader { 3 | constructor(host: RuleLoaderHost, logger: MessageHandler, cache: CacheFactory); 4 | loadRule(name: string, directories: ReadonlyArray | undefined): RuleConstructor | undefined; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/baseline.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fimbullinter/wotan/e25bf84561562935584a47220af5c996d6b746e7/baselines/packages/wotan/test/baseline.spec.ts.snap -------------------------------------------------------------------------------- /baselines/packages/wotan/test/commands.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fimbullinter/wotan/e25bf84561562935584a47220af5c996d6b746e7/baselines/packages/wotan/test/commands.spec.ts.snap -------------------------------------------------------------------------------- /baselines/packages/wotan/test/configuration/main/jstest.js.lint: -------------------------------------------------------------------------------- 1 | export async function foo() { 2 | foo: let bar = '1'; 3 | ~~~ [error no-unused-label: Unused label 'foo'.] 4 | debugger; 5 | ~~~~~~~~~ [warning no-debugger: 'debugger' statements are forbidden.] 6 | return await bar; 7 | } 8 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/configuration/main/tstest.ts.lint: -------------------------------------------------------------------------------- 1 | export async function foo() { 2 | foo: let bar = '1'; 3 | ~~~ [error no-unused-label: Unused label 'foo'.] 4 | debugger; 5 | ~~~~~~~~~ [warning no-debugger: 'debugger' statements are forbidden.] 6 | return await bar; 7 | ~~~~~ [error no-return-await: Awaiting the returned value is redundant as it is wrapped in a Promise anyway.] 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/configuration/submodule/jstest.js.lint: -------------------------------------------------------------------------------- 1 | export async function foo() { 2 | foo: let bar = '1'; 3 | ~~~ [error no-unused-label: Unused label 'foo'.] 4 | debugger; 5 | ~~~~~~~~~ [warning no-debugger: 'debugger' statements are forbidden.] 6 | return await bar; 7 | } 8 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/configuration/submodule/tstest.ts.lint: -------------------------------------------------------------------------------- 1 | export async function foo() { 2 | foo: let bar = '1'; 3 | ~~~ [error no-unused-label: Unused label 'foo'.] 4 | debugger; 5 | ~~~~~~~~~ [warning no-debugger: 'debugger' statements are forbidden.] 6 | return await bar; 7 | ~~~~~ [error no-return-await: Awaiting the returned value is redundant as it is wrapped in a Promise anyway.] 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/files/node_modules/default/test.jsx.lint: -------------------------------------------------------------------------------- 1 | "jsx file"; 2 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/wotan/test/files/node_modules/default/test.mjs.lint: -------------------------------------------------------------------------------- 1 | ".mjs is not supported by default" 2 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/wotan/test/files/node_modules/processor/test.jsx.lint: -------------------------------------------------------------------------------- 1 | "jsx file"; 2 | ~nil [warning unicorn: rainbow] 3 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/wotan/test/files/node_modules/project-processor/test.jsx.lint: -------------------------------------------------------------------------------- 1 | "jsx file"; 2 | ~nil [warning unicorn: rainbow] 3 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/wotan/test/files/node_modules/project/test.jsx.lint: -------------------------------------------------------------------------------- 1 | "jsx file"; 2 | ~nil [error trailing-newline: File must end with a newline.] -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/false/test.ts.lint: -------------------------------------------------------------------------------- 1 | abcdefg; // this comment should stay intact 2 | ~ [error local/delete: remove this character] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/five/test.ts.fix: -------------------------------------------------------------------------------- 1 | fg; // this comment should stay intact 2 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/five/test.ts.lint: -------------------------------------------------------------------------------- 1 | abcdefg; // this comment should stay intact 2 | ~ [error local/delete: remove this character] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/one/test.ts.fix: -------------------------------------------------------------------------------- 1 | bcdefg; // this comment should stay intact 2 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/one/test.ts.lint: -------------------------------------------------------------------------------- 1 | abcdefg; // this comment should stay intact 2 | ~ [error local/delete: remove this character] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/true/invalid.ts.lint: -------------------------------------------------------------------------------- 1 | , // should not be autofixed 2 | ~ [error local/delete: remove this character] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/true/test.ts.fix: -------------------------------------------------------------------------------- 1 | // this comment should stay intact 2 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/fix/true/test.ts.lint: -------------------------------------------------------------------------------- 1 | abcdefg; // this comment should stay intact 2 | ~ [error local/delete: remove this character] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/line-switches/default/dont-crash-no-eofline.ts.lint: -------------------------------------------------------------------------------- 1 | /*wotan-disable-next-line*/ debugger; //wotan-disable-line -------------------------------------------------------------------------------- /baselines/packages/wotan/test/line-switches/default/dont-crash.ts.lint: -------------------------------------------------------------------------------- 1 | /*wotan-disable-line*/ /*wotan-disable-next-line*/ debugger; 2 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/line-switches/report-useless/dont-crash-no-eofline.ts.fix: -------------------------------------------------------------------------------- 1 | debugger; //wotan-disable-line -------------------------------------------------------------------------------- /baselines/packages/wotan/test/line-switches/report-useless/dont-crash-no-eofline.ts.lint: -------------------------------------------------------------------------------- 1 | /*wotan-disable-next-line*/ debugger; //wotan-disable-line 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ [error useless-line-switch: Disable switch has no effect. The specified range doesn't exits.] -------------------------------------------------------------------------------- /baselines/packages/wotan/test/line-switches/report-useless/dont-crash.ts.fix: -------------------------------------------------------------------------------- 1 | /*wotan-disable-line*/ debugger; 2 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/line-switches/report-useless/dont-crash.ts.lint: -------------------------------------------------------------------------------- 1 | /*wotan-disable-line*/ /*wotan-disable-next-line*/ debugger; 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ [error useless-line-switch: Disable switch has no effect. All specified rules have no failures to disable.] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/line-switches/report-useless/useless.ts.fix: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/predicates/default/test.ts.lint: -------------------------------------------------------------------------------- 1 | export {}; 2 | ~nil [error local/rule: finding] 3 | ~nil [error local/true: finding] 4 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/processors/prefixed/default/foo.test.fix: -------------------------------------------------------------------------------- 1 | //// import * as other from './other.test'; // debugger; 2 | //// "debugger"; 3 | //// "debugger"; "debugger"; 4 | //// if (foo) 5 | //// ; -------------------------------------------------------------------------------- /baselines/packages/wotan/test/processors/prefixed/project/foo.test.fix: -------------------------------------------------------------------------------- 1 | //// import * as other from './other.test'; // debugger; 2 | //// "debugger"; 3 | //// "debugger"; "debugger"; 4 | //// if (foo) 5 | //// ; -------------------------------------------------------------------------------- /baselines/packages/wotan/test/processors/prefixed/project/other.test.fix: -------------------------------------------------------------------------------- 1 | //// export const foo = 1; -------------------------------------------------------------------------------- /baselines/packages/wotan/test/processors/prefixed/project/other.test.lint: -------------------------------------------------------------------------------- 1 | //// export const foo = 1; 2 | //// debugger; 3 | ~~~~~~~~~ [error no-debugger: 'debugger' statements are forbidden.] 4 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/processors/vue/default/utils.ts.fix: -------------------------------------------------------------------------------- 1 | export function doStuff() { 2 | return 'foo'; 3 | } 4 | 5 | export async function doOtherStuff() { 6 | doStuff(); 7 | } 8 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/processors/vue/default/utils.ts.lint: -------------------------------------------------------------------------------- 1 | export function doStuff() { 2 | return 'foo'; 3 | } 4 | 5 | export async function doOtherStuff() { 6 | await doStuff(); 7 | ~~~~~~~~~~~~~~~ [error await-only-promise: Unnecessary 'await' of a non-Promise value.] 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/processors/vue/exclude/utils.ts.lint: -------------------------------------------------------------------------------- 1 | export function doStuff() { 2 | return 'foo'; 3 | } 4 | 5 | export async function doOtherStuff() { 6 | await doStuff(); 7 | ~~~~~~~~~~~~~~~ [error await-only-promise: Unnecessary 'await' of a non-Promise value.] 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/program-state.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fimbullinter/wotan/e25bf84561562935584a47220af5c996d6b746e7/baselines/packages/wotan/test/program-state.spec.ts.snap -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/exclude-external/default/test.ts.lint: -------------------------------------------------------------------------------- 1 | // this test throws if any external file, e.g. node_modules, @types, lib.xxx.d.ts, are linted 2 | import chalk from 'chalk'; 3 | import fs = require('fs'); 4 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/fix-error/default/a.ts.fix: -------------------------------------------------------------------------------- 1 | import {b} from './b'; 2 | // ensure the Program is in the correct state after fixing 'b.ts' caused syntax errors 3 | b; // finding is here after fixing 'b.ts' 4 | b; // findnig is here before fixing 'b.ts' 5 | b; // should never have a finding 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/fix-error/default/a.ts.lint: -------------------------------------------------------------------------------- 1 | import {b} from './b'; 2 | // ensure the Program is in the correct state after fixing 'b.ts' caused syntax errors 3 | b; // finding is here after fixing 'b.ts' 4 | b; // findnig is here before fixing 'b.ts' 5 | ~~~~~~~~ [error no-useless-assertion: This assertion is unnecesary as it doesn't change the type of the expression.] 6 | b; // should never have a finding 7 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/fix-error/default/b.ts.fix: -------------------------------------------------------------------------------- 1 | export type T = string; 2 | export type T2 = number; 3 | export let b: T; 4 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/fix-error/default/b.ts.lint: -------------------------------------------------------------------------------- 1 | export type T = string; 2 | export type T2 = number; 3 | export let b: T2; 4 | ~ [error local/delete: remove just a little bit] 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/fix/default/invalid.ts.lint: -------------------------------------------------------------------------------- 1 | import {foo: fn} from './other'; 2 | ~~~ [error local/foo: 'foo' is not allowed.] 3 | foo: bar: fn(); // should not be autofixed 4 | ~~~ [error no-unused-label: Unused label 'foo'.] 5 | ~~~ [error no-unused-label: Unused label 'bar'.] 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/fix/default/test.ts.fix: -------------------------------------------------------------------------------- 1 | import {bar as fn} from './other'; 2 | fn(); 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/fix/default/test.ts.lint: -------------------------------------------------------------------------------- 1 | import {foo as fn} from './other'; 2 | ~~~ [error local/foo: 'foo' is not allowed.] 3 | foo: bar: fn(); 4 | ~~~ [error no-unused-label: Unused label 'foo'.] 5 | ~~~ [error no-unused-label: Unused label 'bar'.] 6 | import {v} from './zzz'; 7 | ~~~~~~~~~~~~~~~~~~~~~~~~ [error local/foo: import is unused] 8 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/default/e/index.ts.lint: -------------------------------------------------------------------------------- 1 | import { D } from "../d"; 2 | ~~~~~~ [error local/quotemark: Prefer single quotes] 3 | 4 | export class E extends D {} 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/filtered/a/a.ts.lint: -------------------------------------------------------------------------------- 1 | import {A1} from './a1'; 2 | 3 | export class A { 4 | nested = new A1(); 5 | } 6 | // this fixable failure ensures we only lint this project / file once 7 | debugger; 8 | ~~~~~~~~~ [error no-debugger: 'debugger' statements are forbidden.] 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/filtered/a/a1.js.lint: -------------------------------------------------------------------------------- 1 | import * as data from './data.json'; 2 | 3 | export class A1 { 4 | data = data; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/filtered/a/ambient.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare var someGlobal: "a"; 2 | ~~~ [error local/quotemark: Prefer single quotes] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/filtered/c/index.ts.lint: -------------------------------------------------------------------------------- 1 | import { B } from "../b"; 2 | ~~~~~~ [error local/quotemark: Prefer single quotes] 3 | import { A } from "../a"; 4 | ~~~~~~ [error local/quotemark: Prefer single quotes] 5 | 6 | export class C extends B { 7 | prop = new A(); 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/filtered/e/index.ts.lint: -------------------------------------------------------------------------------- 1 | import { D } from "../d"; 2 | ~~~~~~ [error local/quotemark: Prefer single quotes] 3 | 4 | export class E extends D {} 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/leaf/outfile/a.ts.lint: -------------------------------------------------------------------------------- 1 | namespace foo { 2 | export const a = "a"; 3 | ~~~ [error local/quotemark: Prefer single quotes] 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/missing/missing/y.ts.fix: -------------------------------------------------------------------------------- 1 | import { X } from "./x"; 2 | 3 | // this needs two fixer runs and ensures it still resolves to 'x.d.ts' instead of 'x.ts' 4 | new X().prop; 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/outfile/outfile/b.ts.lint: -------------------------------------------------------------------------------- 1 | namespace foo { 2 | console.log("a:", a); 3 | ~~~~ [error local/quotemark: Prefer single quotes] 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/a/a.ts.fix: -------------------------------------------------------------------------------- 1 | import {A1} from './a1'; 2 | 3 | export class A { 4 | nested = new A1(); 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/a/a.ts.lint: -------------------------------------------------------------------------------- 1 | import {A1} from './a1'; 2 | 3 | export class A { 4 | nested = new A1(); 5 | } 6 | // this fixable failure ensures we only lint this project / file once 7 | debugger; 8 | ~~~~~~~~~ [error no-debugger: 'debugger' statements are forbidden.] 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/a/a1.js.lint: -------------------------------------------------------------------------------- 1 | import * as data from './data.json'; 2 | 3 | export class A1 { 4 | data = data; 5 | } 6 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/a/ambient.d.ts.lint: -------------------------------------------------------------------------------- 1 | declare var someGlobal: "a"; 2 | ~~~ [error local/quotemark: Prefer single quotes] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/a/index.ts.lint: -------------------------------------------------------------------------------- 1 | export * from "./a"; 2 | ~~~~~ [error local/quotemark: Prefer single quotes] 3 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/b/index.tsx.lint: -------------------------------------------------------------------------------- 1 | import { A } from "../a"; 2 | ~~~~~~ [error local/quotemark: Prefer single quotes] 3 | 4 | export class B extends A {} 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/c/index.ts.lint: -------------------------------------------------------------------------------- 1 | import { B } from "../b"; 2 | ~~~~~~ [error local/quotemark: Prefer single quotes] 3 | import { A } from "../a"; 4 | ~~~~~~ [error local/quotemark: Prefer single quotes] 5 | 6 | export class C extends B { 7 | prop = new A(); 8 | } 9 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/d/index.ts.lint: -------------------------------------------------------------------------------- 1 | import { C } from "../c"; 2 | ~~~~~~ [error local/quotemark: Prefer single quotes] 3 | 4 | export class D extends C {} 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/e/index.ts.lint: -------------------------------------------------------------------------------- 1 | import { D } from "../d"; 2 | ~~~~~~ [error local/quotemark: Prefer single quotes] 3 | 4 | export class E extends D {} 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/outfile/a.ts.lint: -------------------------------------------------------------------------------- 1 | namespace foo { 2 | export const a = "a"; 3 | ~~~ [error local/quotemark: Prefer single quotes] 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/references/references/outfile/b.ts.lint: -------------------------------------------------------------------------------- 1 | namespace foo { 2 | console.log("a:", a); 3 | ~~~~ [error local/quotemark: Prefer single quotes] 4 | } 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/project/setup/default/test.ts.lint: -------------------------------------------------------------------------------- 1 | // This test ensures that we don't crash on non-existent directories in tsconfig.json "include". 2 | // It also tests the correct handling of exclusion of typeRoots from linting. 3 | foo; 4 | ~~~ [error no-unstable-api-use: Variable 'foo' is deprecated.] 5 | -------------------------------------------------------------------------------- /baselines/packages/wotan/test/runner.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fimbullinter/wotan/e25bf84561562935584a47220af5c996d6b746e7/baselines/packages/wotan/test/runner.spec.ts.snap -------------------------------------------------------------------------------- /baselines/packages/ymir/api/packlist.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | NOTICE 3 | README.md 4 | package.json 5 | src/index.d.ts 6 | src/index.js 7 | src/index.js.map 8 | -------------------------------------------------------------------------------- /packages/bifrost/.npmignore: -------------------------------------------------------------------------------- 1 | /test/ 2 | /.* 3 | *.ts 4 | !*.d.ts 5 | /*.yml 6 | /*.yaml 7 | /*.md 8 | /*.json 9 | /yarn.lock 10 | /*.tgz 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /packages/bifrost/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Klaus Meinhardt (https://github.com/ajafff) 2 | -------------------------------------------------------------------------------- /packages/bifrost/test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tslint.json", 3 | "rules": { 4 | "no-implicit-dependencies": false, 5 | "no-null-keyword": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/disir/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@fimbul/disir", 3 | "version": "0.24.0", 4 | "description": "Rules for local development", 5 | "main": "src/index", 6 | "private": true, 7 | "dependencies": { 8 | "@fimbul/ymir": "^0.24.0", 9 | "tslib": "^2.0.0", 10 | "tsutils": "^3.5.0" 11 | }, 12 | "peerDependencies": { 13 | "typescript": ">= 4.0.0 || >= 4.2.0-dev" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/disir/src/index.yaml: -------------------------------------------------------------------------------- 1 | rulesDirectories: 2 | disir: ./rules 3 | -------------------------------------------------------------------------------- /packages/disir/test/import-package/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rulesDirectories: 2 | local: ../../src/rules 3 | rules: 4 | local/import-package: error 5 | -------------------------------------------------------------------------------- /packages/disir/test/import-package/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/disir/test/import-package/test.ts: -------------------------------------------------------------------------------- 1 | import {Linter} from '../../../wotan/src/linter'; 2 | import {Finding} from '../../../../packages/wotan'; 3 | import {AbstractRule} from '@fimbul/wotan'; 4 | import {Rule} from '../../src/rules/import-package'; 5 | import foo from 'packages/something/foo'; 6 | import self from './test'; 7 | import heimdall = require('../../../heimdall'); 8 | export * from '../../../bifrost'; 9 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rulesDirectories: 2 | local: ../../src/rules 3 | rules: 4 | local/no-barrel-import: error 5 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "**/test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/index.ts: -------------------------------------------------------------------------------- 1 | export * from './other'; 2 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/other.ts: -------------------------------------------------------------------------------- 1 | export const foo = 1; 2 | export const bar = 2; 3 | export const baz = 3; 4 | export const bas = 4; 5 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/project.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": ".", 3 | "files": "**/test.ts" 4 | } 5 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/subdir/index.ts: -------------------------------------------------------------------------------- 1 | export * from '..'; 2 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/subdir/test.ts: -------------------------------------------------------------------------------- 1 | import {foo} from '.'; 2 | import {bar} from './index'; 3 | import {baz} from '..'; 4 | import {bas} from '../index'; 5 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/test.ts: -------------------------------------------------------------------------------- 1 | import {baz} from '.'; 2 | import {bas} from './index'; 3 | 4 | import {foo as otherFoo} from './other'; 5 | import {bar as otherBar} from './other'; 6 | import {foo} from './subdir'; 7 | import {bar} from './subdir/index'; 8 | 9 | export * from '.'; 10 | export * from '@fimbul/wotan'; 11 | -------------------------------------------------------------------------------- /packages/disir/test/no-barrel-import/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /packages/disir/test/no-import-self/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rulesDirectories: 2 | local: ../../src/rules 3 | rules: 4 | local/no-import-self: error 5 | -------------------------------------------------------------------------------- /packages/disir/test/no-import-self/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/disir/test/no-import-self/index.ts: -------------------------------------------------------------------------------- 1 | export const foo = 1; 2 | export * from './other'; 3 | export const bas = 1; 4 | export * from '../../src/util'; 5 | export const baz = 1; 6 | -------------------------------------------------------------------------------- /packages/disir/test/no-import-self/other.ts: -------------------------------------------------------------------------------- 1 | export const bar = 1; 2 | -------------------------------------------------------------------------------- /packages/disir/test/no-import-self/project.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": ".", 3 | "files": "test.ts" 4 | } 5 | -------------------------------------------------------------------------------- /packages/disir/test/no-import-self/test.ts: -------------------------------------------------------------------------------- 1 | import {foo, bar as renamedBar, bas, nonExistent, getPackageName} from '@fimbul/disir'; 2 | import {baz} from '@fimbul/disir'; 3 | import {bar} from '@fimbul/disir/other'; 4 | import * as ns from '@fimbul/disir'; 5 | import '@fimbul/disir'; 6 | 7 | export * from '@fimbul/disir'; 8 | -------------------------------------------------------------------------------- /packages/disir/test/no-import-self/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@fimbul/disir": ["./index"], 6 | "@fimbul/disir/*": ["./*"] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/heimdall/.npmignore: -------------------------------------------------------------------------------- 1 | /test/ 2 | /.* 3 | *.ts 4 | !*.d.ts 5 | /*.yml 6 | /*.yaml 7 | /*.md 8 | /*.json 9 | /yarn.lock 10 | /*.tgz 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /packages/heimdall/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Klaus Meinhardt (https://github.com/ajafff) 2 | -------------------------------------------------------------------------------- /packages/heimdall/test/fixtures/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rulesDirectories: 2 | tslint: . 3 | rules: 4 | tslint/semicolon: 5 | options: always 6 | tslint/no-unused-expression: warning 7 | -------------------------------------------------------------------------------- /packages/heimdall/test/fixtures/my-rule.js: -------------------------------------------------------------------------------- 1 | const wotan = require('@fimbul/wotan'); 2 | 3 | exports.Rule = class extends wotan.AbstractRule { 4 | apply() { 5 | return [] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/heimdall/test/fixtures/myTslintRuleRule.js: -------------------------------------------------------------------------------- 1 | const Lint = require('tslint'); 2 | 3 | 'foo'; 4 | 5 | exports.Rule = class extends Lint.Rules.AbstractRule { 6 | apply() { 7 | return []; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/heimdall/test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tslint.json", 3 | "rules": { 4 | "no-implicit-dependencies": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/.npmignore: -------------------------------------------------------------------------------- 1 | /test/ 2 | /.* 3 | *.ts 4 | !*.d.ts 5 | /src/*.d.ts 6 | /*.yml 7 | /*.md 8 | /*.json 9 | /yarn.lock 10 | /*.tgz 11 | tsconfig.json 12 | .DS_Store 13 | /docs 14 | -------------------------------------------------------------------------------- /packages/mimir/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Klaus Meinhardt (https://github.com/ajafff) 2 | -------------------------------------------------------------------------------- /packages/mimir/docs/no-debugger.md: -------------------------------------------------------------------------------- 1 | # no-debugger 2 | 3 | :wrench: fixable 4 | 5 | Bans `debugger;` statements from your code. 6 | 7 | ## Rationale 8 | 9 | `debugger;` statements are often used to debug during development. In production code these statements annoy users with devtools open or disturb debugging some other program that uses your library. 10 | 11 | ## Examples 12 | 13 | :thumbsdown: Examples of incorrect code 14 | 15 | ```ts 16 | debugger; 17 | 18 | if (process.env.NODE_ENV === 'development') { 19 | debugger; 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /packages/mimir/latest.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | extends: ./recommended.yaml 3 | -------------------------------------------------------------------------------- /packages/mimir/src/formatters/json.ts: -------------------------------------------------------------------------------- 1 | import { AbstractFormatter, FileSummary } from '@fimbul/ymir'; 2 | 3 | export class Formatter extends AbstractFormatter { 4 | public prefix = '['; 5 | 6 | public format(fileName: string, summary: FileSummary) { 7 | if (summary.findings.length === 0) 8 | return; 9 | return summary.findings.map((f) => JSON.stringify({...f, fileName})).join(); 10 | } 11 | 12 | public flush() { 13 | return ']'; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/mimir/src/rules/syntaxcheck.ts: -------------------------------------------------------------------------------- 1 | import { TypedRule } from '@fimbul/ymir'; 2 | import * as ts from 'typescript'; 3 | 4 | export class Rule extends TypedRule { 5 | public apply() { 6 | for (const diagnostic of this.program.getSyntacticDiagnostics(this.sourceFile)) { 7 | const start = diagnostic.start; 8 | this.addFinding(start, start + diagnostic.length, ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/mimir/test/async-function-assignability/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | async-function-assignability: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/async-function-assignability/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/async-function-assignability/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/await-async-result/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | await-async-result: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/await-async-result/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/await-async-result/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/await-only-promise/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | await-only-promise: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/await-only-promise/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/await-only-promise/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "strictNullChecks": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/ban-dom-globals/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | ban-dom-globals: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/ban-dom-globals/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/ban-dom-globals/es5-dom.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-es5-dom.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/ban-dom-globals/es5.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-es5.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/ban-dom-globals/tsconfig-es5-dom.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "ES5", 5 | "lib": ["es5", "dom"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/ban-dom-globals/tsconfig-es5.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "ES5" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/ban-dom-globals/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/delete-only-optional-property/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | delete-only-optional-property: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/delete-only-optional-property/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/delete-only-optional-property/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "strict": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/generator-require-yield/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | generator-require-yield: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/generator-require-yield/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/new-parens/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | new-parens: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/new-parens/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/new-parens/test.ts: -------------------------------------------------------------------------------- 1 | new Array 2 | 3 | new Array 4 | (); 5 | 6 | new Array(); 7 | new Array(); 8 | new Array(1); 9 | 10 | // new Array 11 | new Array; 12 | 13 | Array 14 | Array(1) 15 | 16 | interface FooConstructor { 17 | new(): any; 18 | } 19 | -------------------------------------------------------------------------------- /packages/mimir/test/no-case-declaration/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-case-declaration: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-case-declaration/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-debugger/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-debugger: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-debugger/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-debugger/test.ts: -------------------------------------------------------------------------------- 1 | debugger; 2 | label: debugger 3 | if (foo) 4 | debugger; 5 | else { 6 | debugger; 7 | } 8 | foo.debugger; 9 | foo.debugger(); 10 | "debugger"; 11 | "debugger;"; 12 | for (;;) debugger 13 | do 14 | debugger 15 | while (true) 16 | ` 17 | debugger 18 | debugger; 19 | ` 20 | 21 | class Foo { 22 | debugger; 23 | static debugger; 24 | } 25 | // debugger; 26 | debugger; 27 | debugger // end of line comment 28 | debugger /* multiline 29 | comment */ 30 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-case/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-duplicate-case: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-case/bigint.ts: -------------------------------------------------------------------------------- 1 | switch (get()) { 2 | case 1: 3 | case 1n: 4 | case ~-2n: 5 | case -1n: 6 | case ~0n: 7 | case true: 8 | case false: 9 | case !0n: 10 | case !-1n: 11 | case +1n: 12 | case +-1n: 13 | case '1n': 14 | case 99n: 15 | case ~-100n: 16 | case -100n: 17 | case ~99n: 18 | case 0n: 19 | case ~-1n: 20 | case get<1n>(): 21 | case -get<1n>(): 22 | case -get<0n>(): 23 | } 24 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-case/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-case/project-loose.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-loose.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-case/project.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-case/tsconfig-loose.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": false 4 | }, 5 | "files": ["test.ts"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-case/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-spread-property/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-duplicate-spread-property: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-spread-property/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json", 3 | "files": "*.ts" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-spread-property/js-literal.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json", 3 | "files": "literal.js" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-spread-property/literal.js: -------------------------------------------------------------------------------- 1 | export const emptyLiteral = {}; 2 | emptyLiteral.a = 1; 3 | Object.defineProperty(emptyLiteral, 'b', {value: 1}); 4 | 5 | export const literal = {a: 1, b: 1}; 6 | 7 | ({ 8 | ...emptyLiteral, 9 | a: 1, 10 | b: 1, 11 | }); 12 | 13 | ({ 14 | a: 1, 15 | b: 1, 16 | c: 1, 17 | ...emptyLiteral, 18 | }); 19 | 20 | ({ 21 | ...literal, 22 | a: 1, 23 | b: 1, 24 | }); 25 | 26 | ({ 27 | a: 1, 28 | b: 1, 29 | c: 1, 30 | ...literal, 31 | }); 32 | 33 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-spread-property/loose.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-loose.json", 3 | "files": "*.ts" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-spread-property/tsconfig-loose.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": false, 4 | "target": "esnext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-duplicate-spread-property/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext", 5 | "allowJs": true, 6 | "checkJs": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/mimir/test/no-fallthrough/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-fallthrough: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-fallthrough/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-fallthrough/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-fallthrough/typed.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/advanced.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": "advanced.wotanrc.yaml" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/advanced.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-implicit-tostring: 3 | severity: error 4 | options: 5 | allowBigInt: true 6 | allowNull: true 7 | allowUndefined: true 8 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/allow-primitive.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": "allow-primitive.wotanrc.yaml" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/allow-primitive.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-implicit-tostring: 3 | severity: error 4 | options: 5 | allowPrimitive: true 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": "default.wotanrc.yaml" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/default.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-implicit-tostring: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/number-boolean.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": "number-boolean.wotanrc.yaml" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/number-boolean.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-implicit-tostring: 3 | severity: error 4 | options: 5 | allowNumber: true 6 | allowBoolean: true 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-implicit-tostring/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "ESNext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-invalid-assertion/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-invalid-assertion: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-invalid-assertion/bigint.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | 3 | declare function get(): T; 4 | 5 | get<1n>() as 1n; 6 | get<1n>() as 2n; 7 | get<1n>() as 1n | 2n; 8 | get<2n>() as -2n; 9 | get<-2n>() as -2n; 10 | get<1n | 2n>() as 1n; 11 | get<1n | 2n>() as 2n; 12 | get<1n | 2n>() as 3n; 13 | 14 | get<1n | 'foo'>() as 1 | 'foo'; 15 | get<1n | 'foo'>() as 2n | 'foo'; 16 | get() as 2n; 17 | get<1n | bigint & {foo: 1}>() as 2n; 18 | 19 | get<1n | '1n'>() as 2n | '1n'; 20 | -------------------------------------------------------------------------------- /packages/mimir/test/no-invalid-assertion/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-invalid-assertion/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-misused-generics/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-misused-generics: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-misused-generics/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-nan-compare/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-nan-compare: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-nan-compare/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-object-spread-of-iterable/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-object-spread-of-iterable: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-object-spread-of-iterable/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-object-spread-of-iterable/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "ESNext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-octal-escape/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-octal-escape: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-octal-escape/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.tsx" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-octal-escape/test.tsx: -------------------------------------------------------------------------------- 1 | export {}; 2 | 3 | 040; 4 | 0o40; 5 | /* \040 */'\u0020'; 6 | '\40' 7 | '\040'; 8 | '\0040'; 9 | '\\040'; 10 | '\\\040'; 11 | '\\\\040'; 12 | '\0'; 13 | '\00'; 14 | '\000'; 15 | '\1'; 16 | '\18'; 17 | '\2\3b\4'; 18 | '\377'; 19 | '\378'; 20 | '\777'; 21 | '\400'; 22 | '\300'; 23 | `\10`; 24 | `\251${1}\8${2}\7${3}a\6b`; 25 | 26 | const foo: '\1' = '1'; 27 | 28 | \40 29 | -------------------------------------------------------------------------------- /packages/mimir/test/no-restricted-property-access/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-restricted-property-access: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-restricted-property-access/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-restricted-property-access/define.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-define.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-restricted-property-access/fields.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-fields.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-restricted-property-access/tsconfig-define.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "useDefineForClassFields": true 5 | }, 6 | "files": ["use-before-assign.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/no-restricted-property-access/tsconfig-fields.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig-define.json", 3 | "compilerOptions": { 4 | "target": "ESNext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-restricted-property-access/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "es2019", 5 | "allowJs": true, 6 | "checkJs": true, 7 | "experimentalDecorators": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/mimir/test/no-return-await/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-return-await: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-return-await/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unassigned-variable/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-unassigned-variable: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unassigned-variable/ambient.d.ts: -------------------------------------------------------------------------------- 1 | declare let foo: number; 2 | declare const bar: string; 3 | 4 | declare namespace ns { 5 | let foo: number; 6 | let bar: string; 7 | export {foo}; 8 | } 9 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unassigned-variable/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unassigned-variable/global.ts: -------------------------------------------------------------------------------- 1 | let someGlobal: string; 2 | var someOtherGlobal: number; 3 | 4 | { 5 | let local: string; 6 | let otherLocal = 1; 7 | let initializedLater: boolean; 8 | initializedLater = true; 9 | } 10 | 11 | declare module "foo" { 12 | let foo: number; 13 | let bar: string; 14 | export {foo}; 15 | } 16 | -------------------------------------------------------------------------------- /packages/mimir/test/no-uninferred-type-parameter/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-uninferred-type-parameter: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-uninferred-type-parameter/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-uninferred-type-parameter/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext", 5 | "module": "esnext", 6 | "allowJs": true, 7 | "checkJs": true, 8 | "jsx": "preserve" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unreachable-code/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-unreachable-code: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unreachable-code/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unreachable-code/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unreachable-code/typed.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unsafe-finally/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-unsafe-finally: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unsafe-finally/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unstable-api-use/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-unstable-api-use: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unstable-api-use/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unstable-api-use/export-assignment.ts: -------------------------------------------------------------------------------- 1 | /** @deprecated */ 2 | function doStuff() {} 3 | namespace doStuff {} 4 | 5 | export = doStuff; 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unstable-api-use/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true, 4 | "noImplicitAny": true, 5 | "target": "esnext" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/.wotanrc-allow-new.yaml: -------------------------------------------------------------------------------- 1 | extends: ./.wotanrc.yaml 2 | rules: 3 | no-unused-expression: 4 | options: 5 | allowNew: true 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/.wotanrc-allow-short-circuit.yaml: -------------------------------------------------------------------------------- 1 | extends: ./.wotanrc.yaml 2 | rules: 3 | no-unused-expression: 4 | options: 5 | allowShortCircuit: true 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/.wotanrc-allow-tagged-template.yaml: -------------------------------------------------------------------------------- 1 | extends: ./.wotanrc.yaml 2 | rules: 3 | no-unused-expression: 4 | options: 5 | allowTaggedTemplate: true 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/.wotanrc-allow-ternary.yaml: -------------------------------------------------------------------------------- 1 | extends: ./.wotanrc.yaml 2 | rules: 3 | no-unused-expression: 4 | options: 5 | allowTernary: true 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-unused-expression: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/allow-new.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts", 3 | "config": ".wotanrc-allow-new.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/allow-short-circuit.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts", 3 | "config": ".wotanrc-allow-short-circuit.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/allow-tagged-template.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts", 3 | "config": ".wotanrc-allow-tagged-template.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/allow-ternary.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts", 3 | "config": ".wotanrc-allow-ternary.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-expression/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-label/.wotanrc.json5: -------------------------------------------------------------------------------- 1 | { 2 | rules: { 3 | "no-unused-label": 'error' 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-label/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-label/function.ts: -------------------------------------------------------------------------------- 1 | bar: foo: for (;;) { 2 | let fn = function foo() { 3 | while (true) 4 | break foo; 5 | } 6 | continue bar; 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-label/ok.ts: -------------------------------------------------------------------------------- 1 | foo: for (;;) { 2 | let foo; 3 | bar: switch (foo) { 4 | case bar: 5 | break bar; 6 | default: continue foo; 7 | } 8 | 9 | bar: { 10 | break bar; 11 | } 12 | 13 | bar: if (Boolean()) baz: { 14 | break baz; 15 | } else 16 | break bar; 17 | 18 | bar: break bar; 19 | } 20 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-label/test.d.ts: -------------------------------------------------------------------------------- 1 | declare const foo: string; 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-label/wrong-location.ts: -------------------------------------------------------------------------------- 1 | foo: for (;;) { 2 | bar: baz: let foo = bar; 3 | break foo; 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-unused-label/wrong-target.js: -------------------------------------------------------------------------------- 1 | bar: for (;;) { 2 | break; 3 | bar: switch (true) { 4 | case true: 5 | break bar; 6 | default: 7 | continue bar; 8 | } 9 | } 10 | 11 | foo: for(;;) 12 | foo: while(true) 13 | break foo; 14 | break foo; 15 | 16 | baz: break bas; 17 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-assertion: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/global.ts: -------------------------------------------------------------------------------- 1 | let foo: string; 2 | foo!; 3 | foo; 4 | NaN!; 5 | something!; 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/global2.ts: -------------------------------------------------------------------------------- 1 | let something: string; 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/loose.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-loose.json", 3 | "exclude": ["global2.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/optional-chaining.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | declare function get(): T; 3 | 4 | get<{prop: string}>()?.prop!; 5 | get<{prop?: string}>()?.prop!; 6 | get()?.prop!; 7 | get()?.prop!.charAt(0); 8 | get()?.prop!.charAt(0); 9 | get()?.prop!.charAt(0); 10 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/strict.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json", 3 | "exclude": ["global2.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/tsconfig-loose.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "strict": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-assertion/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-declare/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-declare: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-declare/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": ["test.ts", "declaration.d.ts"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-destructuring/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-destructuring: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-destructuring/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": ["test.ts"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-initializer/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-initializer: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-initializer/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.{j,t}s" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-initializer/project-loose.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-loose.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-initializer/project.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-initializer/tsconfig-loose.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": false, 4 | "target": "esnext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-initializer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-jump-label/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-jump-label: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-jump-label/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-predicate/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-predicate: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-predicate/bigint.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | 3 | declare function get(): T; 4 | 5 | typeof 1n === 'bigint'; 6 | typeof 1n === 'object'; 7 | typeof 1n === 'number'; 8 | 9 | 1n === 1n; 10 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-predicate/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-predicate/loose.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.loose.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-predicate/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-predicate/tsconfig.loose.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "strict": false 5 | }, 6 | "exclude": ["bigint.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-spread/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-spread: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-spread/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.tsx" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-strict: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/always-strict.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-strict.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.{j,t}s" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/module.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | namespace foo { 3 | 'use strict'; 4 | "use strict"; 5 | foo; 6 | 'use strict'; 7 | } 8 | 9 | var C = class { 10 | get prop() { 11 | 'use strict'; 12 | return 1; 13 | } 14 | }; 15 | 16 | const obj = { 17 | get prop() { 18 | 'use strict'; 19 | return 1; 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/project.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/strict-module.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | export {}; 3 | namespace foo { 4 | 'use strict'; 5 | "use strict"; 6 | foo; 7 | 'use strict'; 8 | } 9 | 10 | var C = class { 11 | get prop() { 12 | 'use strict'; 13 | return 1; 14 | } 15 | }; 16 | 17 | const obj = { 18 | get prop() { 19 | 'use strict'; 20 | return 1; 21 | }, 22 | }; 23 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/top.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | namespace foo { 3 | 'use strict'; 4 | "use strict"; 5 | foo; 6 | 'use strict'; 7 | } 8 | 9 | var C = class { 10 | get prop() { 11 | 'use strict'; 12 | return 1; 13 | } 14 | }; 15 | 16 | const obj = { 17 | get prop() { 18 | 'use strict'; 19 | return 1; 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/tsconfig-strict.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "es5" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-strict/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": false, 4 | "target": "es5" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-try-catch/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-useless-try-catch: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-try-catch/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-useless-try-catch/invalid.ts: -------------------------------------------------------------------------------- 1 | try {} 2 | 3 | try {} finally 4 | 5 | try {console.log('try')} 6 | 7 | try {console.log('try')} finally 8 | 9 | try {console.log('try')} catch 10 | 11 | try {console.log('try')} catch (e) 12 | 13 | try {console.log('try')} catch (e) { throw } 14 | -------------------------------------------------------------------------------- /packages/mimir/test/no-writeonly-property-read/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-writeonly-property-read: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/no-writeonly-property-read/assignment-declaration.js: -------------------------------------------------------------------------------- 1 | const obj = {}; 2 | Object.defineProperty(obj, 'foo', {value: 1}); 3 | Object.defineProperty(obj, 'bar', {get: () => 1}); 4 | Object.defineProperty(obj, 'baz', {set: (/** @type {number} */ v) => {}}); 5 | obj.foo + obj.bar + obj.baz; 6 | -------------------------------------------------------------------------------- /packages/mimir/test/no-writeonly-property-read/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/no-writeonly-property-read/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "ESNext", 5 | "allowJs": true, 6 | "checkJs": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/mimir/test/parameter-properties/.wotanrc-consistent.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | parameter-properties: 3 | severity: error 4 | options: 5 | mode: consistent 6 | -------------------------------------------------------------------------------- /packages/mimir/test/parameter-properties/.wotanrc-never.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | parameter-properties: 3 | severity: error 4 | options: 5 | mode: never 6 | -------------------------------------------------------------------------------- /packages/mimir/test/parameter-properties/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | parameter-properties: 3 | severity: error 4 | options: 5 | mode: when-possible 6 | -------------------------------------------------------------------------------- /packages/mimir/test/parameter-properties/consistent.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts", 3 | "config": ".wotanrc-consistent.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/parameter-properties/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": ["*.ts", "*.js"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/parameter-properties/never.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts", 3 | "config": ".wotanrc-never.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/parameter-properties/test.js: -------------------------------------------------------------------------------- 1 | export class Car { 2 | constructor(engine) { 3 | this.engine = engine; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-const/.wotanrc-any.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | prefer-const: 3 | severity: error 4 | options: 5 | destructuring: any 6 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-const/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | prefer-const: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-const/any.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts", 3 | "config": ".wotanrc-any.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-const/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-const/global.ts: -------------------------------------------------------------------------------- 1 | let foo = 1; 2 | var bar = 2; 3 | { 4 | let baz = 3; 5 | var bas = 4; 6 | } 7 | function test() { 8 | let foobar = 5; 9 | var foobaz = 6; 10 | } 11 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-dot-notation/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | prefer-dot-notation: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-dot-notation/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-dot-notation/invalid.ts: -------------------------------------------------------------------------------- 1 | window[]; 2 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-dot-notation/no-property-access-from-index-signature.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescriptVersion": ">= 4.2.0", 3 | "project": "tsconfig.nopropertyaccessfromindexsignature.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-dot-notation/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-dot-notation/tsconfig.nopropertyaccessfromindexsignature.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "noPropertyAccessFromIndexSignature": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | prefer-for-of: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/es3.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": "jsdoc.js" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/es5-iteration.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-es5-iteration.json", 3 | "exclude": "jsdoc.js" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/es5.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-es5.json", 3 | "exclude": "jsdoc.js" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/es6.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-es6.json", 3 | "exclude": "jsdoc.js" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/tsconfig-es5-iteration.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ES5", 5 | "downlevelIteration": true, 6 | "lib": ["ES6"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/tsconfig-es5.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ES5" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/tsconfig-es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ES6" 5 | }, 6 | "include": [ 7 | "*.ts" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-for-of/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "allowJs": true, 5 | "checkJs": true, 6 | "types": [] 7 | }, 8 | "files": [ 9 | "types.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-namespace-keyword/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | prefer-namespace-keyword: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-namespace-keyword/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "test.ts" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-namespace-keyword/test.ts: -------------------------------------------------------------------------------- 1 | export namespace foo { 2 | declare module bar {} 3 | } 4 | export module foo { 5 | namespace nested.sub { 6 | module event.more.nesting {} 7 | } 8 | } 9 | 10 | module namespace { 11 | namespace module {} 12 | } 13 | 14 | declare module 'foo' { 15 | namespace ns { 16 | module nested {} 17 | } 18 | } 19 | declare module 'bar'; 20 | 21 | declare global {} 22 | 23 | let module = ''; 24 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-number-methods/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | prefer-number-methods: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-number-methods/declaration.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace foo { 2 | function isNaN(p: number): boolean; 3 | function isFinite(p: number): boolean; 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-number-methods/es5.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.es5.json", 3 | "files": ["test.ts", "declaration.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-number-methods/esnext.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig.esnext.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-number-methods/tsconfig.es5.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "types": [] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-number-methods/tsconfig.esnext.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.es5.json", 3 | "compilerOptions": { 4 | "lib": [ 5 | "esnext" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-object-spread/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | prefer-object-spread: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-object-spread/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/prefer-object-spread/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true, 4 | "target": "esnext" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/return-never-call/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | return-never-call: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/return-never-call/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/mimir/test/return-never-call/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/syntaxcheck/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | syntaxcheck: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/syntaxcheck/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescriptVersion": ">= 4.2.0" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/syntaxcheck/javascript.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | public method() {} 3 | } 4 | let foo: 'bar'; 5 | let bar:; 6 | 7 | new Set(); 8 | 9 | function () {} 10 | -------------------------------------------------------------------------------- /packages/mimir/test/syntaxcheck/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "checkJs": true, 5 | "target": "esnext" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/syntaxcheck/typescript.ts: -------------------------------------------------------------------------------- 1 | const foo: '; 2 | let bar: typeof foo; 3 | let baz: = bar; 4 | 5 | new Map; 6 | 7 | namespace foo 8 | 9 | let obj = {; 10 | -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | trailing-newline: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/comment.ts: -------------------------------------------------------------------------------- 1 | // comment -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "fix": true, 3 | "config": ".wotanrc.yaml", 4 | "files": "*" 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/empty-bom.ts: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/empty.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fimbullinter/wotan/e25bf84561562935584a47220af5c996d6b746e7/packages/mimir/test/trailing-newline/empty.ts -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/fail.crlf.ts: -------------------------------------------------------------------------------- 1 | foo(); 2 | bar(); -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/ok.crlf.ts: -------------------------------------------------------------------------------- 1 | foo(); 2 | -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/ok.ts: -------------------------------------------------------------------------------- 1 | foo(); 2 | -------------------------------------------------------------------------------- /packages/mimir/test/trailing-newline/whitespace.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/mimir/test/try-catch-return-await/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | try-catch-return-await: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/try-catch-return-await/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/try-catch-return-await/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strictNullChecks": true, 4 | "noImplicitAny": true, 5 | "target": "ES6" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tslint.json", 3 | "rules": { 4 | "no-implicit-dependencies": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/mimir/test/type-assertion/.wotanrc-classic.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | type-assertion: 3 | options: 4 | style: classic 5 | -------------------------------------------------------------------------------- /packages/mimir/test/type-assertion/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | type-assertion: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/type-assertion/classic.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts?(x)", 3 | "config": ".wotanrc-classic.yaml" 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/type-assertion/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": "*.ts?(x)" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/type-assertion/jsx.tsx: -------------------------------------------------------------------------------- 1 | 'foo' as string; 2 | ; 3 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | rules: 2 | typecheck: error 3 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/composite.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-composite.json", 3 | "files": "typescript.ts", 4 | "typescriptVersion": ">= 4.2.0" 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/declaration.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "tsconfig-declaration.json", 3 | "files": "typescript.ts", 4 | "typescriptVersion": ">= 4.2.0" 5 | } 6 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/default.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescriptVersion": ">= 4.2.0" 3 | } 4 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/external.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'my-external-module' { 2 | interface Foo {} 3 | function create(): Foo; 4 | } 5 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/tsconfig-composite.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "composite": true, 5 | "allowUnreachableCode": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/tsconfig-declaration.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "declaration": true, 5 | "allowUnreachableCode": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/mimir/test/typecheck/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "target": "esnext", 5 | "strict": true, 6 | "noUnusedLocals": true, 7 | "noUnusedParameters": true, 8 | "allowUnreachableCode": false 9 | }, 10 | "exclude": [ 11 | "external.d.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /packages/mithotyn/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Klaus Meinhardt (https://github.com/ajafff) 2 | -------------------------------------------------------------------------------- /packages/mithotyn/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tslint.json", 3 | "rules": { 4 | "no-submodule-imports": { 5 | "options": ["@fimbul/wotan/language-service"] 6 | }, 7 | "no-implicit-dependencies": { 8 | "options": ["dev"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/valtyr/.npmignore: -------------------------------------------------------------------------------- 1 | /test/ 2 | /.* 3 | *.ts 4 | !*.d.ts 5 | /*.yml 6 | /*.yaml 7 | /*.md 8 | /*.json 9 | /yarn.lock 10 | /*.tgz 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /packages/valtyr/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Klaus Meinhardt (https://github.com/ajafff) 2 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/.dotfile.ts: -------------------------------------------------------------------------------- 1 | '' 2 | ''// tslint:disable-line:my-rule quotemark semicolon all 3 | ''// tslint:disable-line:quotemark all 4 | ''// tslint:disable-line:all quotemark 5 | // tslint:disable-line: 6 | '' // tslint:disable-line 7 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/.dotjs.jsx: -------------------------------------------------------------------------------- 1 | '' 2 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/.fimbullinter.yaml: -------------------------------------------------------------------------------- 1 | valtyr: 2 | overrides: 3 | - files: "*.vue" 4 | processor: "@fimbul/ve" 5 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/myRuleRule.js: -------------------------------------------------------------------------------- 1 | const TSLint = require('tslint'); 2 | 3 | exports.Rule = class Rule extends TSLint.Rules.AbstractRule { 4 | apply(sourceFile) { 5 | return [new TSLint.RuleFailure(sourceFile, 0, 0, 'test message', '')] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/processed.vue: -------------------------------------------------------------------------------- 1 | 4 | 8 | 10 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/processed2.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | 9 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/processed3.vue: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/test.excluded.ts: -------------------------------------------------------------------------------- 1 | "foo" 2 | 'bar'; 3 | ; 4 | "baz" 5 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/test.tsx: -------------------------------------------------------------------------------- 1 | "foo" 2 | 'bar'; 3 | ; 4 | "baz" 5 | -------------------------------------------------------------------------------- /packages/valtyr/test/fixtures/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": ".", 3 | "defaultSeverity": "warning", 4 | "linterOptions": { 5 | "exclude": "**/*.excluded.*" 6 | }, 7 | "rules": { 8 | "semicolon": false, 9 | "quotemark": [true, "double"], 10 | "my-rule": { 11 | "severity": "error" 12 | } 13 | }, 14 | "jsRules": { 15 | "my-rule": { 16 | "severity": "warning" 17 | }, 18 | "semicolon": [true, "always"], 19 | "quotemark": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/valtyr/test/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tslint.json", 3 | "rules": { 4 | "no-implicit-dependencies": false, 5 | "no-null-keyword": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/ve/.npmignore: -------------------------------------------------------------------------------- 1 | /test/ 2 | /.* 3 | *.ts 4 | !*.d.ts 5 | /*.yml 6 | /*.yaml 7 | /*.md 8 | /*.json 9 | /yarn.lock 10 | /*.tgz 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /packages/ve/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Klaus Meinhardt (https://github.com/ajafff) 2 | -------------------------------------------------------------------------------- /packages/ve/src/index.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | overrides: 3 | - files: "*.vue" 4 | processor: ./index 5 | -------------------------------------------------------------------------------- /packages/ve/test/.wotanrc-all.yaml: -------------------------------------------------------------------------------- 1 | processor: ../src 2 | rules: 3 | await-only-promise: error 4 | -------------------------------------------------------------------------------- /packages/ve/test/.wotanrc.yaml: -------------------------------------------------------------------------------- 1 | extends: ../src 2 | rules: 3 | await-only-promise: error 4 | no-unused-expression: error 5 | -------------------------------------------------------------------------------- /packages/ve/test/all.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": ".wotanrc-all.yaml" 3 | } 4 | -------------------------------------------------------------------------------- /packages/ve/test/default.test.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/ve/test/first-line.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/ve/test/foo.ts: -------------------------------------------------------------------------------- 1 | import {foo} from './jsx'; 2 | (async function() { 3 | await 1; 4 | // JSDoc type annotations only work in JavaScript files 5 | /** @type {PromiseLike} */ 6 | let p = null; 7 | let v = null; 8 | await p; 9 | await v; 10 | await foo(); 11 | await Promise.resolve(); 12 | })(); 13 | -------------------------------------------------------------------------------- /packages/ve/test/jsx.tsx: -------------------------------------------------------------------------------- 1 | 2 | export async function foo() { 3 | await 1; 4 | // JSDoc type annotations only work in JavaScript files 5 | /** @type {PromiseLike} */ 6 | let p = null; 7 | let v = null; 8 | await p; 9 | await v; 10 | await Promise.resolve(); 11 | } 12 | -------------------------------------------------------------------------------- /packages/ve/test/nested-script.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/ve/test/no-script.vue: -------------------------------------------------------------------------------- 1 |