@types/jshint

  • Version 2.12.1
  • Published
  • 5.15 kB
  • No dependencies
  • MIT license

Install

npm i @types/jshint
yarn add @types/jshint
pnpm add @types/jshint

Overview

TypeScript definitions for jshint

Index

Functions

function JSHINT

JSHINT: typeof JSHINT;
  • Parameter source

    The input JavaScript source code. Type: string or an array of strings (each element is interpreted as a newline) @example: JSHINT(["'use strict';", "console.log('hello, world!');"]);

    Parameter options

    The linting options to use when analyzing the source code. Type: an object whose property names are the desired options to use and whose property values are the configuration values for those properties. @example: JSHINT(mySource, { undef: true });

    Parameter predef

    variables defined outside of the current file; the behavior of this argument is identical to the globals linting option. Type: an object whose property names are the global variable identifiers and whose property values control whether each variable should be considered read-only @example: JSHINT(mySource, myOptions, { jQuery: false });

Interfaces

interface ExtensionAPI

interface ExtensionAPI {}

    property isJSON

    readonly isJSON: boolean;

      method getOption

      getOption: (name: string) => unknown | null;

        interface LintData

        interface LintData {}

          property errors

          errors?: LintError[] | undefined;

            property functions

            functions?: LintFunction[] | undefined;

              property globals

              globals?: string[] | undefined;

                property implieds

                implieds?: any;

                  property json

                  json?: any;

                    property member

                    member?: any;

                      property options

                      options?: LintOptions | undefined;

                        property unused

                        unused?: LintUnused[] | undefined;

                          interface LintError

                          interface LintError {}

                            property a

                            a?: any;

                              property b

                              b?: any;

                                property c

                                c?: any;

                                  property character

                                  character: number;

                                    property code

                                    code: string;

                                      property d

                                      d?: any;

                                        property evidence

                                        evidence: string;

                                          property id

                                          id: string;

                                            property line

                                            line: number;

                                              property raw

                                              raw: string;

                                                property reason

                                                reason: string;

                                                  property scope

                                                  scope: string;

                                                    interface LintFunction

                                                    interface LintFunction {}

                                                      property character

                                                      character: number;

                                                        property last

                                                        last: number;

                                                          property lastcharacter

                                                          lastcharacter: number;

                                                            property line

                                                            line: number;

                                                              property metrics

                                                              metrics: {
                                                              complexity: number;
                                                              parameters: number;
                                                              statements: number;
                                                              };

                                                                property name

                                                                name: string;

                                                                  property param

                                                                  param: any;

                                                                    interface LintUnused

                                                                    interface LintUnused {}

                                                                      property character

                                                                      character: number;

                                                                        property line

                                                                        line: number;

                                                                          property name

                                                                          name: string;

                                                                            Type Aliases

                                                                            type LintOptions

                                                                            type LintOptions = Record<string, any>;

                                                                              type ModuleFunction

                                                                              type ModuleFunction = (api: ExtensionAPI) => void;

                                                                                Namespaces

                                                                                namespace JSHINT

                                                                                namespace JSHINT {}

                                                                                  variable errors

                                                                                  const errors: LintError[];
                                                                                  • An array of warnings and errors generated by the most recent invocation of JSHINT.

                                                                                  variable jshint

                                                                                  const jshint: typeof JSHINT;

                                                                                    function addModule

                                                                                    addModule: (func: ModuleFunction) => void;

                                                                                      function data

                                                                                      data: () => LintData | null | undefined;
                                                                                      • Generate a report containing details about the most recent invocation of JSHINT.

                                                                                      Package Files (1)

                                                                                      Dependencies (0)

                                                                                      No dependencies.

                                                                                      Dev Dependencies (0)

                                                                                      No dev dependencies.

                                                                                      Peer Dependencies (0)

                                                                                      No peer dependencies.

                                                                                      Badge

                                                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/jshint.

                                                                                      • Markdown
                                                                                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/jshint)
                                                                                      • HTML
                                                                                        <a href="https://www.jsdocs.io/package/@types/jshint"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>