depcheck: Removing (#40269)

Types are now directly maintained by upstream project.
This commit is contained in:
Stéphane Veyret
2019-11-12 11:33:53 -08:00
committed by Pranav Senthilnathan
parent cc7e016c29
commit acda7e1cdb
5 changed files with 6 additions and 159 deletions
+6
View File
@@ -882,6 +882,12 @@
"sourceRepoURL": "https://github.com/dgraham/delegated-events#readme",
"asOfVersion": "1.1.0"
},
{
"libraryName": "depcheck",
"typingsPackageName": "depcheck",
"sourceRepoURL": "https://github.com/depcheck/depcheck",
"asOfVersion": "0.9.1"
},
{
"libraryName": "detect-browser",
"typingsPackageName": "detect-browser",
-43
View File
@@ -1,43 +0,0 @@
import depcheck = require('depcheck');
const options: depcheck.Options = {
ignoreBinPackage: false,
ignoreDirs: ['sandbox', 'dist', 'bower_components'],
ignoreMatches: ['grunt-*'],
parsers: {
'*.js': depcheck.parser.es6,
'*.jsx': depcheck.parser.jsx,
},
detectors: [depcheck.detector.requireCallExpression, depcheck.detector.importDeclaration],
specials: [depcheck.special.eslint, depcheck.special.webpack],
};
// $ExpectType Promise<Results>
depcheck('/', options);
depcheck('/', options, unused => {
const dependencies: string[] = unused.dependencies;
const devDependencies: string[] = unused.devDependencies;
const missing: { [dependencyName: string]: string[] } = unused.missing;
const using: { [dependencyName: string]: string[] } = unused.using;
const invalidFiles: { [filePath: string]: any } = unused.invalidFiles;
const invalidDirs: { [filePath: string]: any } = unused.invalidDirs;
});
const exampleResult: depcheck.Results = {
dependencies: ['underscore'],
devDependencies: ['jasmine'],
missing: {
lodash: ['/path/to/my/project/file.using.lodash.js'],
},
using: {
react: ['/path/to/my/project/file.using.react.jsx', '/path/to/my/project/another.file.using.react.jsx'],
lodash: ['/path/to/my/project/file.using.lodash.js'],
},
invalidFiles: {
'/path/to/my/project/file.having.syntax.error.js': 'SyntaxError: <call stack here>',
},
invalidDirs: {
'/path/to/my/project/folder/without/permission': 'Error: EACCES, <call stack here>',
},
};
-92
View File
@@ -1,92 +0,0 @@
// Type definitions for depcheck 0.9
// Project: https://github.com/depcheck/depcheck
// Definitions by: ark120202 <https://github.com/ark120202>
// jrnail23 <https://github.com/jrnail23>
// rumpl <https://github.com/rumpl>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function depcheck(rootDir: string, options: depcheck.Options): Promise<depcheck.Results>;
declare function depcheck<T>(
rootDir: string,
options: depcheck.Options,
callback: (results: depcheck.Results) => T
): Promise<T>;
declare namespace depcheck {
interface Node {
[key: string]: any;
}
type Parser = (content: string, filePath: string, deps: ReadonlyArray<string>, rootDir: string) => Node;
type Detector = (node: Node) => ReadonlyArray<string> | string;
interface Options {
ignoreBinPackage?: boolean;
skipMissing?: boolean;
ignoreDirs?: ReadonlyArray<string>;
ignoreMatches?: ReadonlyArray<string>;
parsers?: {
[match: string]: Parser;
};
detectors?: ReadonlyArray<Detector>;
specials?: ReadonlyArray<Parser>;
}
interface Results {
dependencies: string[];
devDependencies: string[];
using: {
[dependencyName: string]: string[];
};
missing: {
[dependencyName: string]: string[];
};
invalidFiles: {
[filePath: string]: any;
};
invalidDirs: {
[filePath: string]: any;
};
}
const parser: {
coffee: Parser;
es6: Parser;
es7: Parser;
jsx: Parser;
sass: Parser;
typescript: Parser;
vue: Parser;
};
const detector: {
exportDeclaration: Detector;
expressViewEngine: Detector;
gruntLoadTaskCallExpression: Detector;
importCallExpression: Detector;
importDeclaration: Detector;
requireCallExpression: Detector;
requireResolveCallExpression: Detector;
typescriptImportEqualsDeclaration: Detector;
detectTypescriptImportType: Detector;
};
const special: {
babel: Parser;
bin: Parser;
commitizen: Parser;
eslint: Parser;
'feross-standard': Parser;
gatsby: Parser;
'gulp-load-plugins': Parser;
jest: Parser;
karma: Parser;
mocha: Parser;
tslint: Parser;
webpack: Parser;
};
}
export = depcheck;
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"depcheck-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }