aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tslint-config/test/lintrunner.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tslint-config/test/lintrunner.ts')
-rw-r--r--packages/tslint-config/test/lintrunner.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/packages/tslint-config/test/lintrunner.ts b/packages/tslint-config/test/lintrunner.ts
deleted file mode 100644
index fcd1b6844..000000000
--- a/packages/tslint-config/test/lintrunner.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as path from 'path';
-import { Configuration, Linter, Replacement } from 'tslint';
-
-export const helper = (src: string, rule: string) => {
- const linter = new Linter({ fix: false });
- linter.lint(
- '',
- src,
- Configuration.parseConfigFile({
- rules: {
- [rule]: true,
- },
- rulesDirectory: path.join(__dirname, '../rules'),
- }),
- );
- return linter.getResult();
-};
-
-export const getFixedResult = (src: string, rule: string) => {
- const result = helper(src, rule);
- const fixes = [].concat.apply(result.failures.map(x => x.getFix()));
- return Replacement.applyFixes(src, fixes);
-};