@fimbul/wotan
Advanced tools
Comparing version 0.22.0-dev.20190702 to 0.22.0-dev.20190806
{ | ||
"name": "@fimbul/wotan", | ||
"version": "0.22.0-dev.20190702", | ||
"version": "0.22.0-dev.20190806", | ||
"description": "Pluggable TypeScript and JavaScript linter", | ||
@@ -43,3 +43,3 @@ "bin": "bin/main.js", | ||
"dependencies": { | ||
"@fimbul/mimir": "0.21.0", | ||
"@fimbul/mimir": "0.22.0-dev.20190806", | ||
"@fimbul/ymir": "0.21.0", | ||
@@ -46,0 +46,0 @@ "bind-decorator": "^1.0.11", |
@@ -18,4 +18,4 @@ import { GlobalOptions } from '@fimbul/ymir'; | ||
extensions: OptionParser.ParseFunction<ReadonlyArray<string> | undefined>; | ||
reportUselessDirectives: OptionParser.ParseFunction<boolean | "error" | "warning" | "suggestion">; | ||
reportUselessDirectives: OptionParser.ParseFunction<boolean | "warning" | "error" | "suggestion">; | ||
}; | ||
export declare function parseGlobalOptions(options: GlobalOptions | undefined): ParsedGlobalOptions; |
@@ -20,3 +20,3 @@ "use strict"; | ||
var { command: _command } = _a, config = tslib_1.__rest(_a, ["command"]); | ||
const newContent = utils_1.format(Object.assign({}, this.options, config, { fix: config.fix || undefined, reportUselessDirectives: config.reportUselessDirectives || undefined, references: config.references || undefined }), "yaml" /* Yaml */); | ||
const newContent = utils_1.format(Object.assign(Object.assign(Object.assign({}, this.options), config), { fix: config.fix || undefined, reportUselessDirectives: config.reportUselessDirectives || undefined, references: config.references || undefined }), "yaml" /* Yaml */); | ||
const filePath = path.join(this.directories.getCurrentDirectory(), '.fimbullinter.yaml'); | ||
@@ -23,0 +23,0 @@ if (newContent.trim() === '{}') { |
@@ -19,3 +19,3 @@ "use strict"; | ||
const optparse_1 = require("../optparse"); | ||
const TEST_OPTION_SPEC = Object.assign({}, argparse_1.GLOBAL_OPTIONS_SPEC, { fix: optparse_1.OptionParser.Transform.noDefault(argparse_1.GLOBAL_OPTIONS_SPEC.fix), typescriptVersion: optparse_1.OptionParser.Factory.parsePrimitive('string') }); | ||
const TEST_OPTION_SPEC = Object.assign(Object.assign({}, argparse_1.GLOBAL_OPTIONS_SPEC), { fix: optparse_1.OptionParser.Transform.noDefault(argparse_1.GLOBAL_OPTIONS_SPEC.fix), typescriptVersion: optparse_1.OptionParser.Factory.parsePrimitive('string') }); | ||
let FakeDirectoryService = class FakeDirectoryService { | ||
@@ -122,3 +122,3 @@ constructor(realDirectorySerivce) { | ||
if (options.exact) { | ||
const remainingGlobOptions = Object.assign({}, globOptions, { cwd: baselineDir, ignore: baselinesSeen }); | ||
const remainingGlobOptions = Object.assign(Object.assign({}, globOptions), { cwd: baselineDir, ignore: baselinesSeen }); | ||
for (const unchecked of glob.sync('**', remainingGlobOptions)) { | ||
@@ -142,3 +142,3 @@ if (options.updateBaselines) { | ||
test(config, host) { | ||
const lintOptions = Object.assign({}, config, { fix: false }); | ||
const lintOptions = Object.assign(Object.assign({}, config), { fix: false }); | ||
const lintResult = Array.from(this.runner.lintCollection(lintOptions)); | ||
@@ -145,0 +145,0 @@ let containsFixes = false; |
@@ -24,5 +24,6 @@ export declare namespace OptionParser { | ||
type PrimitiveMap<T extends PrimitiveName> = T extends 'string' ? string : T extends 'number' ? number : boolean; | ||
function parsePrimitive<T extends PrimitiveName[]>(...types: T): ParseFunction<PrimitiveMap<T[number]> | undefined>; | ||
function parsePrimitiveOrArray<T extends PrimitiveName>(type: T): ParseFunction<ReadonlyArray<PrimitiveMap<T>> | undefined>; | ||
export function parsePrimitive<T extends PrimitiveName[]>(...types: T): ParseFunction<PrimitiveMap<T[number]> | undefined>; | ||
export function parsePrimitiveOrArray<T extends PrimitiveName>(type: T): ParseFunction<ReadonlyArray<PrimitiveMap<T>> | undefined>; | ||
export {}; | ||
} | ||
} |
@@ -190,3 +190,3 @@ "use strict"; | ||
createProgram(rootNames, options, oldProgram, projectReferences) { | ||
options = Object.assign({}, options, { suppressOutputPathCheck: true }); | ||
options = Object.assign(Object.assign({}, options), { suppressOutputPathCheck: true }); | ||
this.compilerOptions = options; | ||
@@ -193,0 +193,0 @@ this.moduleResolutionCache = ts.createModuleResolutionCache(this.cwd, this.getCanonicalFileName, options); |
@@ -42,4 +42,4 @@ "use strict"; | ||
if (options.project.length === 0 && options.files.length !== 0) | ||
return this.lintFiles(Object.assign({}, options, { files, exclude }), config, linterOptions); | ||
return this.lintProject(Object.assign({}, options, { files, exclude }), config, linterOptions); | ||
return this.lintFiles(Object.assign(Object.assign({}, options), { files, exclude }), config, linterOptions); | ||
return this.lintProject(Object.assign(Object.assign({}, options), { files, exclude }), config, linterOptions); | ||
} | ||
@@ -46,0 +46,0 @@ *lintProject(options, config, linterOptions) { |
@@ -137,3 +137,3 @@ "use strict"; | ||
const prev = receiver.get(ruleName); | ||
receiver.set(ruleName, Object.assign({ severity: 'error', options: undefined }, prev, config)); | ||
receiver.set(ruleName, Object.assign(Object.assign({ severity: 'error', options: undefined }, prev), config)); | ||
} | ||
@@ -140,0 +140,0 @@ } |
@@ -190,6 +190,6 @@ "use strict"; | ||
if (parent) { | ||
receiver.set(entry[0], Object.assign({}, parent, result)); | ||
receiver.set(entry[0], Object.assign(Object.assign({}, parent), result)); | ||
} | ||
else { | ||
receiver.set(entry[0], Object.assign({}, result, resolveNameAndDirectories(name, rulesDirectoryMap))); | ||
receiver.set(entry[0], Object.assign(Object.assign({}, result), resolveNameAndDirectories(name, rulesDirectoryMap))); | ||
} | ||
@@ -212,3 +212,3 @@ } | ||
const alias = aliases && aliases.get(ruleName); | ||
result.set(ruleName, Object.assign({}, (alias || resolveNameAndDirectories(ruleName, rulesDirectoryMap)), mapRuleConfig(raw[ruleName]))); | ||
result.set(ruleName, Object.assign(Object.assign({}, (alias || resolveNameAndDirectories(ruleName, rulesDirectoryMap))), mapRuleConfig(raw[ruleName]))); | ||
} | ||
@@ -215,0 +215,0 @@ return result; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
333878
4136
+ Added@fimbul/mimir@0.22.0-dev.20190806(transitive)
- Removed@fimbul/mimir@0.21.0(transitive)