From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/tslint/lib/configuration.d.ts | 43 +++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) (limited to 'node_modules/tslint/lib/configuration.d.ts') diff --git a/node_modules/tslint/lib/configuration.d.ts b/node_modules/tslint/lib/configuration.d.ts index 552b5e807..ce2b61474 100644 --- a/node_modules/tslint/lib/configuration.d.ts +++ b/node_modules/tslint/lib/configuration.d.ts @@ -1,7 +1,26 @@ +/** + * @license + * Copyright 2013 Palantir Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import { IOptions, RuleSeverity } from "./language/rule/rule"; export interface IConfigurationFile { /** - * The severity that is applied to rules in _this_ config with `severity === "default"`. + * @deprecated property is never set + * + * The severity that is applied to rules in this config file as well as rules + * in any inherited config files which have their severity set to "default". * Not inherited. */ defaultSeverity?: RuleSeverity; @@ -32,7 +51,10 @@ export interface IConfigurationLoadResult { path?: string; results?: IConfigurationFile; } +export declare const JSON_CONFIG_FILENAME = "tslint.json"; +/** @deprecated use `JSON_CONFIG_FILENAME` or `CONFIG_FILENAMES` instead. */ export declare const CONFIG_FILENAME = "tslint.json"; +export declare const CONFIG_FILENAMES: string[]; export declare const DEFAULT_CONFIG: IConfigurationFile; export declare const EMPTY_CONFIG: IConfigurationFile; /** @@ -51,7 +73,7 @@ export declare function findConfiguration(configFile: string, inputFilePath?: st * the location of the config file is not known and you want to search for one. * @param inputFilePath A path to the current file being linted. This is the starting location * of the search for a configuration. - * @returns An absolute path to a tslint.json file + * @returns An absolute path to a tslint.json or tslint.yml or tslint.yaml file * or undefined if neither can be found. */ export declare function findConfigurationPath(suppliedConfigFilePath: string | null, inputFilePath: string): string | undefined; @@ -63,11 +85,18 @@ export declare function findConfigurationPath(suppliedConfigFilePath: string, in * './path/to/config' will be treated as a relative path * 'path/to/config' will attempt to load a to/config file inside a node module named path * @param configFilePath The configuration to load - * @param originalFilePath The entry point configuration file + * @param originalFilePath (deprecated) The entry point configuration file * @returns a configuration object for TSLint loaded from the file at configFilePath */ -export declare function loadConfigurationFromPath(configFilePath?: string, originalFilePath?: string | undefined): IConfigurationFile; +export declare function loadConfigurationFromPath(configFilePath?: string, _originalFilePath?: string): IConfigurationFile; +/** Reads the configuration file from disk and parses it as raw JSON, YAML or JS depending on the extension. */ +export declare function readConfigurationFile(filepath: string): RawConfigFile; export declare function extendConfigurationFile(targetConfig: IConfigurationFile, nextConfigSource: IConfigurationFile): IConfigurationFile; +/** + * returns the absolute path (contrary to what the name implies) + * + * @deprecated use `path.resolve` instead + */ export declare function getRelativePath(directory?: string | null, relativeTo?: string): string | undefined; export declare function useAsPath(directory: string): boolean; /** @@ -94,12 +123,14 @@ export declare type RawRuleConfig = null | undefined | boolean | any[] | { options?: any; }; /** - * Parses a config file and normalizes legacy config settings + * Parses a config file and normalizes legacy config settings. + * If `configFileDir` and `readConfig` are provided, this function will load all base configs and reduce them to the final configuration. * * @param configFile The raw object read from the JSON of a config file * @param configFileDir The directory of the config file + * @param readConfig Will be used to load all base configurations while parsing. The function is called with the resolved path. */ -export declare function parseConfigFile(configFile: RawConfigFile, configFileDir?: string): IConfigurationFile; +export declare function parseConfigFile(configFile: RawConfigFile, configFileDir?: string, readConfig?: (path: string) => RawConfigFile): IConfigurationFile; /** * Fills in default values for `IOption` properties and outputs an array of `IOption` */ -- cgit v1.2.3