api documentation for eslint (v3.19.0)

An AST-based pattern checker for JavaScript.

table of contents

  1. module eslint
    1. function eslint.CLIEngine (options)
    2. function eslint.RuleTester (testerConfig)
    3. function eslint.SourceCode (text, ast)
    4. function eslint.rule_context (ruleId, eslint, severity, options, settings, parserOptions, parserPath, meta, parserServices)
    5. object eslint.CLIEngine.prototype
    6. object eslint.RuleTester.prototype
    7. object eslint.SourceCode.prototype
    8. object eslint.api
    9. object eslint.ast_utils
    10. object eslint.linter
    11. object eslint.logging
    12. object eslint.options
    13. object eslint.rule_context.prototype
    14. object eslint.rules
    15. object eslint.timing
  2. module eslint.CLIEngine
    1. function eslint.CLIEngine (options)
    2. function eslint.CLIEngine.getErrorResults (results)
    3. function eslint.CLIEngine.getFormatter (format)
    4. function eslint.CLIEngine.outputFixes (report)
    5. string eslint.CLIEngine.version
  3. module eslint.CLIEngine.prototype
    1. function eslint.CLIEngine.prototype.addPlugin (name, pluginobject)
    2. function eslint.CLIEngine.prototype.constructor (options)
    3. function eslint.CLIEngine.prototype.executeOnFiles (patterns)
    4. function eslint.CLIEngine.prototype.executeOnText (text, filename, warnIgnored)
    5. function eslint.CLIEngine.prototype.getConfigForFile (filePath)
    6. function eslint.CLIEngine.prototype.getFormatter (format)
    7. function eslint.CLIEngine.prototype.isPathIgnored (filePath)
    8. function eslint.CLIEngine.prototype.resolveFileGlobPatterns (patterns)
  4. module eslint.RuleTester
    1. function eslint.RuleTester (testerConfig)
    2. function eslint.RuleTester.describe (text, method)
    3. function eslint.RuleTester.getDefaultConfig ()
    4. function eslint.RuleTester.it (text, method)
    5. function eslint.RuleTester.resetDefaultConfig ()
    6. function eslint.RuleTester.setDefaultConfig (config)
  5. module eslint.RuleTester.prototype
    1. function eslint.RuleTester.prototype.defineRule (name, rule)
    2. function eslint.RuleTester.prototype.run (ruleName, rule, test)
  6. module eslint.SourceCode
    1. function eslint.SourceCode (text, ast)
    2. function eslint.SourceCode.splitLines (text)
  7. module eslint.SourceCode.prototype
    1. function eslint.SourceCode.prototype.constructor (text, ast)
    2. function eslint.SourceCode.prototype.getAllComments ()
    3. function eslint.SourceCode.prototype.getComments (node)
    4. function eslint.SourceCode.prototype.getIndexFromLoc (loc)
    5. function eslint.SourceCode.prototype.getJSDocComment (node)
    6. function eslint.SourceCode.prototype.getLines ()
    7. function eslint.SourceCode.prototype.getLocFromIndex (index)
    8. function eslint.SourceCode.prototype.getNodeByRangeIndex (index)
    9. function eslint.SourceCode.prototype.getText (node, beforeCount, afterCount)
    10. function eslint.SourceCode.prototype.isSpaceBetweenTokens (first, second)
  8. module eslint.api
    1. function eslint.api.CLIEngine (options)
    2. function eslint.api.RuleTester (testerConfig)
    3. function eslint.api.SourceCode (text, ast)
    4. object eslint.api.linter
  9. module eslint.ast_utils
    1. function eslint.ast_utils.couldBeError (node)
    2. function eslint.ast_utils.createGlobalLinebreakMatcher ()
    3. function eslint.ast_utils.getDirectivePrologue (node)
    4. function eslint.ast_utils.getFunctionHeadLoc (node, sourceCode)
    5. function eslint.ast_utils.getFunctionNameWithKind (node)
    6. function eslint.ast_utils.getLabel (node)
    7. function eslint.ast_utils.getModifyingReferences (references)
    8. function eslint.ast_utils.getParenthesisedText (sourceCode, node)
    9. function eslint.ast_utils.getPrecedence (node)
    10. function eslint.ast_utils.getStaticPropertyName (node)
    11. function eslint.ast_utils.getTrailingStatement (node)
    12. function eslint.ast_utils.getUpperFunction (node)
    13. function eslint.ast_utils.getVariableByName (initScope, name)
    14. function eslint.ast_utils.isArrayFromMethod (node)
    15. function eslint.ast_utils.isArrowToken (token)
    16. function eslint.ast_utils.isBreakableStatement (node)
    17. function eslint.ast_utils.isCallee (node)
    18. function eslint.ast_utils.isClosingBraceToken (token)
    19. function eslint.ast_utils.isClosingBracketToken (token)
    20. function eslint.ast_utils.isClosingParenToken (token)
    21. function eslint.ast_utils.isColonToken (token)
    22. function eslint.ast_utils.isCommaToken (token)
    23. function eslint.ast_utils.isCommentToken (token)
    24. function eslint.ast_utils.isDecimalInteger (node)
    25. function eslint.ast_utils.isDefaultThisBinding (node, sourceCode)
    26. function eslint.ast_utils.isDirectiveComment (node)
    27. function eslint.ast_utils.isES5Constructor (node)
    28. function eslint.ast_utils.isEmptyBlock (node)
    29. function eslint.ast_utils.isEmptyFunction (node)
    30. function eslint.ast_utils.isFunction (node)
    31. function eslint.ast_utils.isInLoop (node)
    32. function eslint.ast_utils.isKeywordToken (token)
    33. function eslint.ast_utils.isLoop (node)
    34. function eslint.ast_utils.isNotClosingBraceToken (token)
    35. function eslint.ast_utils.isNotClosingBracketToken (token)
    36. function eslint.ast_utils.isNotClosingParenToken (token)
    37. function eslint.ast_utils.isNotColonToken (token)
    38. function eslint.ast_utils.isNotCommaToken (token)
    39. function eslint.ast_utils.isNotOpeningBraceToken (token)
    40. function eslint.ast_utils.isNotOpeningBracketToken (token)
    41. function eslint.ast_utils.isNotOpeningParenToken (token)
    42. function eslint.ast_utils.isNotSemicolonToken (token)
    43. function eslint.ast_utils.isNullLiteral (node)
    44. function eslint.ast_utils.isNullOrUndefined (node)
    45. function eslint.ast_utils.isOpeningBraceToken (token)
    46. function eslint.ast_utils.isOpeningBracketToken (token)
    47. function eslint.ast_utils.isOpeningParenToken (token)
    48. function eslint.ast_utils.isParenthesised (sourceCode, node)
    49. function eslint.ast_utils.isSemicolonToken (token)
    50. function eslint.ast_utils.isStringLiteral (node)
    51. function eslint.ast_utils.isSurroundedBy (val, character)
    52. function eslint.ast_utils.isTokenOnSameLine (left, right)
    53. object eslint.ast_utils.COMMENTS_IGNORE_PATTERN
    54. object eslint.ast_utils.LINEBREAKS
    55. object eslint.ast_utils.LINEBREAK_MATCHER
    56. object eslint.ast_utils.STATEMENT_LIST_PARENTS
  10. module eslint.linter
    1. function eslint.linter.defaults ()
    2. function eslint.linter.defineRule (ruleId, ruleModule)
    3. function eslint.linter.defineRules (rulesToDefine)
    4. function eslint.linter.getAllComments (a, b, c, d, e)
    5. function eslint.linter.getAncestors ()
    6. function eslint.linter.getComments (a, b, c, d, e)
    7. function eslint.linter.getDeclaredVariables (node)
    8. function eslint.linter.getFilename ()
    9. function eslint.linter.getFirstToken (a, b, c, d, e)
    10. function eslint.linter.getFirstTokens (a, b, c, d, e)
    11. function eslint.linter.getJSDocComment (a, b, c, d, e)
    12. function eslint.linter.getLastToken (a, b, c, d, e)
    13. function eslint.linter.getLastTokens (a, b, c, d, e)
    14. function eslint.linter.getNodeByRangeIndex (a, b, c, d, e)
    15. function eslint.linter.getRules ()
    16. function eslint.linter.getScope ()
    17. function eslint.linter.getSource (a, b, c, d, e)
    18. function eslint.linter.getSourceCode ()
    19. function eslint.linter.getSourceLines (a, b, c, d, e)
    20. function eslint.linter.getTokenAfter (a, b, c, d, e)
    21. function eslint.linter.getTokenBefore (a, b, c, d, e)
    22. function eslint.linter.getTokenByRangeStart (a, b, c, d, e)
    23. function eslint.linter.getTokens (a, b, c, d, e)
    24. function eslint.linter.getTokensAfter (a, b, c, d, e)
    25. function eslint.linter.getTokensBefore (a, b, c, d, e)
    26. function eslint.linter.getTokensBetween (a, b, c, d, e)
    27. function eslint.linter.markVariableAsUsed (name)
    28. function eslint.linter.report (ruleId, severity, node, location, message, opts, fix, meta)
    29. function eslint.linter.reset ()
    30. function eslint.linter.verify (textOrSourceCode, config, filenameOrOptions, saveState)
    31. number eslint.linter._maxListeners
    32. string eslint.linter.version
  11. module eslint.logging
    1. function eslint.logging.error ()
    2. function eslint.logging.info ()
  12. module eslint.options
    1. function eslint.options.generateHelp (arg$)
    2. function eslint.options.generateHelpForOption (optionName)
    3. function eslint.options.parse (input, arg$)
    4. function eslint.options.parseArgv (it)
  13. module eslint.rule_context
    1. function eslint.rule_context (ruleId, eslint, severity, options, settings, parserOptions, parserPath, meta, parserServices)
  14. module eslint.rule_context.prototype
    1. function eslint.rule_context.prototype.getAllComments (a, b, c, d, e)
    2. function eslint.rule_context.prototype.getAncestors (a, b, c, d, e)
    3. function eslint.rule_context.prototype.getComments (a, b, c, d, e)
    4. function eslint.rule_context.prototype.getDeclaredVariables (a, b, c, d, e)
    5. function eslint.rule_context.prototype.getFilename (a, b, c, d, e)
    6. function eslint.rule_context.prototype.getFirstToken (a, b, c, d, e)
    7. function eslint.rule_context.prototype.getFirstTokens (a, b, c, d, e)
    8. function eslint.rule_context.prototype.getJSDocComment (a, b, c, d, e)
    9. function eslint.rule_context.prototype.getLastToken (a, b, c, d, e)
    10. function eslint.rule_context.prototype.getLastTokens (a, b, c, d, e)
    11. function eslint.rule_context.prototype.getNodeByRangeIndex (a, b, c, d, e)
    12. function eslint.rule_context.prototype.getScope (a, b, c, d, e)
    13. function eslint.rule_context.prototype.getSource (a, b, c, d, e)
    14. function eslint.rule_context.prototype.getSourceLines (a, b, c, d, e)
    15. function eslint.rule_context.prototype.getTokenAfter (a, b, c, d, e)
    16. function eslint.rule_context.prototype.getTokenBefore (a, b, c, d, e)
    17. function eslint.rule_context.prototype.getTokenByRangeStart (a, b, c, d, e)
    18. function eslint.rule_context.prototype.getTokens (a, b, c, d, e)
    19. function eslint.rule_context.prototype.getTokensAfter (a, b, c, d, e)
    20. function eslint.rule_context.prototype.getTokensBefore (a, b, c, d, e)
    21. function eslint.rule_context.prototype.getTokensBetween (a, b, c, d, e)
    22. function eslint.rule_context.prototype.markVariableAsUsed (a, b, c, d, e)
  15. module eslint.rules
    1. function eslint.rules.define (ruleId, ruleModule)
    2. function eslint.rules.get (ruleId)
    3. function eslint.rules.getAllLoadedRules ()
    4. function eslint.rules.importPlugin (plugin, pluginName)
    5. function eslint.rules.load (rulesDir, cwd)
    6. function eslint.rules.testClear ()
    7. function eslint.rules.testReset ()
  16. module eslint.timing
    1. boolean eslint.timing.enabled
    2. function eslint.timing.time (key, fn)

module eslint

function eslint.CLIEngine (options)

function eslint.RuleTester (testerConfig)

function eslint.SourceCode (text, ast)

function eslint.rule_context (ruleId, eslint, severity, options, settings, parserOptions, parserPath, meta, parserServices)

module eslint.CLIEngine

function eslint.CLIEngine (options)

function eslint.CLIEngine.getErrorResults (results)

function eslint.CLIEngine.getFormatter (format)

function eslint.CLIEngine.outputFixes (report)

module eslint.CLIEngine.prototype

function eslint.CLIEngine.prototype.addPlugin (name, pluginobject)

function eslint.CLIEngine.prototype.constructor (options)

function eslint.CLIEngine.prototype.executeOnFiles (patterns)

function eslint.CLIEngine.prototype.executeOnText (text, filename, warnIgnored)

function eslint.CLIEngine.prototype.getConfigForFile (filePath)

function eslint.CLIEngine.prototype.getFormatter (format)

function eslint.CLIEngine.prototype.isPathIgnored (filePath)

function eslint.CLIEngine.prototype.resolveFileGlobPatterns (patterns)

module eslint.RuleTester

function eslint.RuleTester (testerConfig)

function eslint.RuleTester.describe (text, method)

function eslint.RuleTester.getDefaultConfig ()

function eslint.RuleTester.it (text, method)

function eslint.RuleTester.resetDefaultConfig ()

function eslint.RuleTester.setDefaultConfig (config)

module eslint.RuleTester.prototype

function eslint.RuleTester.prototype.defineRule (name, rule)

function eslint.RuleTester.prototype.run (ruleName, rule, test)

module eslint.SourceCode

function eslint.SourceCode (text, ast)

function eslint.SourceCode.splitLines (text)

module eslint.SourceCode.prototype

function eslint.SourceCode.prototype.constructor (text, ast)

function eslint.SourceCode.prototype.getAllComments ()

function eslint.SourceCode.prototype.getComments (node)

function eslint.SourceCode.prototype.getIndexFromLoc (loc)

function eslint.SourceCode.prototype.getJSDocComment (node)

function eslint.SourceCode.prototype.getLines ()

function eslint.SourceCode.prototype.getLocFromIndex (index)

function eslint.SourceCode.prototype.getNodeByRangeIndex (index)

function eslint.SourceCode.prototype.getText (node, beforeCount, afterCount)

function eslint.SourceCode.prototype.isSpaceBetweenTokens (first, second)

module eslint.api

function eslint.api.CLIEngine (options)

function eslint.api.RuleTester (testerConfig)

function eslint.api.SourceCode (text, ast)

module eslint.ast_utils

function eslint.ast_utils.couldBeError (node)

function eslint.ast_utils.createGlobalLinebreakMatcher ()

function eslint.ast_utils.getDirectivePrologue (node)

function eslint.ast_utils.getFunctionHeadLoc (node, sourceCode)

function eslint.ast_utils.getFunctionNameWithKind (node)

function eslint.ast_utils.getLabel (node)

function eslint.ast_utils.getModifyingReferences (references)

function eslint.ast_utils.getParenthesisedText (sourceCode, node)

function eslint.ast_utils.getPrecedence (node)

function eslint.ast_utils.getStaticPropertyName (node)

function eslint.ast_utils.getTrailingStatement (node)

function eslint.ast_utils.getUpperFunction (node)

function eslint.ast_utils.getVariableByName (initScope, name)

function eslint.ast_utils.isArrayFromMethod (node)

function eslint.ast_utils.isArrowToken (token)

function eslint.ast_utils.isBreakableStatement (node)

function eslint.ast_utils.isCallee (node)

function eslint.ast_utils.isClosingBraceToken (token)

function eslint.ast_utils.isClosingBracketToken (token)

function eslint.ast_utils.isClosingParenToken (token)

function eslint.ast_utils.isColonToken (token)

function eslint.ast_utils.isCommaToken (token)

function eslint.ast_utils.isCommentToken (token)

function eslint.ast_utils.isDecimalInteger (node)

function eslint.ast_utils.isDefaultThisBinding (node, sourceCode)

function eslint.ast_utils.isDirectiveComment (node)

function eslint.ast_utils.isES5Constructor (node)

function eslint.ast_utils.isEmptyBlock (node)

function eslint.ast_utils.isEmptyFunction (node)

function eslint.ast_utils.isFunction (node)

function eslint.ast_utils.isInLoop (node)

function eslint.ast_utils.isKeywordToken (token)

function eslint.ast_utils.isLoop (node)

function eslint.ast_utils.isNotClosingBraceToken (token)

function eslint.ast_utils.isNotClosingBracketToken (token)

function eslint.ast_utils.isNotClosingParenToken (token)

function eslint.ast_utils.isNotColonToken (token)

function eslint.ast_utils.isNotCommaToken (token)

function eslint.ast_utils.isNotOpeningBraceToken (token)

function eslint.ast_utils.isNotOpeningBracketToken (token)

function eslint.ast_utils.isNotOpeningParenToken (token)

function eslint.ast_utils.isNotSemicolonToken (token)

function eslint.ast_utils.isNullLiteral (node)

function eslint.ast_utils.isNullOrUndefined (node)

function eslint.ast_utils.isOpeningBraceToken (token)

function eslint.ast_utils.isOpeningBracketToken (token)

function eslint.ast_utils.isOpeningParenToken (token)

function eslint.ast_utils.isParenthesised (sourceCode, node)

function eslint.ast_utils.isSemicolonToken (token)

function eslint.ast_utils.isStringLiteral (node)

function eslint.ast_utils.isSurroundedBy (val, character)

function eslint.ast_utils.isTokenOnSameLine (left, right)

module eslint.linter

function eslint.linter.defaults ()

function eslint.linter.defineRule (ruleId, ruleModule)

function eslint.linter.defineRules (rulesToDefine)

function eslint.linter.getAllComments (a, b, c, d, e)

function eslint.linter.getAncestors ()

function eslint.linter.getComments (a, b, c, d, e)

function eslint.linter.getDeclaredVariables (node)

function eslint.linter.getFilename ()

function eslint.linter.getFirstToken (a, b, c, d, e)

function eslint.linter.getFirstTokens (a, b, c, d, e)

function eslint.linter.getJSDocComment (a, b, c, d, e)

function eslint.linter.getLastToken (a, b, c, d, e)

function eslint.linter.getLastTokens (a, b, c, d, e)

function eslint.linter.getNodeByRangeIndex (a, b, c, d, e)

function eslint.linter.getRules ()

function eslint.linter.getScope ()

function eslint.linter.getSource (a, b, c, d, e)

function eslint.linter.getSourceCode ()

function eslint.linter.getSourceLines (a, b, c, d, e)

function eslint.linter.getTokenAfter (a, b, c, d, e)

function eslint.linter.getTokenBefore (a, b, c, d, e)

function eslint.linter.getTokenByRangeStart (a, b, c, d, e)

function eslint.linter.getTokens (a, b, c, d, e)

function eslint.linter.getTokensAfter (a, b, c, d, e)

function eslint.linter.getTokensBefore (a, b, c, d, e)

function eslint.linter.getTokensBetween (a, b, c, d, e)

function eslint.linter.markVariableAsUsed (name)

function eslint.linter.report (ruleId, severity, node, location, message, opts, fix, meta)

function eslint.linter.reset ()

function eslint.linter.verify (textOrSourceCode, config, filenameOrOptions, saveState)

module eslint.logging

function eslint.logging.error ()

function eslint.logging.info ()

module eslint.options

function eslint.options.generateHelp (arg$)

function eslint.options.generateHelpForOption (optionName)

function eslint.options.parse (input, arg$)

function eslint.options.parseArgv (it)

module eslint.rule_context

function eslint.rule_context (ruleId, eslint, severity, options, settings, parserOptions, parserPath, meta, parserServices)

module eslint.rule_context.prototype

function eslint.rule_context.prototype.getAllComments (a, b, c, d, e)

function eslint.rule_context.prototype.getAncestors (a, b, c, d, e)

function eslint.rule_context.prototype.getComments (a, b, c, d, e)

function eslint.rule_context.prototype.getDeclaredVariables (a, b, c, d, e)

function eslint.rule_context.prototype.getFilename (a, b, c, d, e)

function eslint.rule_context.prototype.getFirstToken (a, b, c, d, e)

function eslint.rule_context.prototype.getFirstTokens (a, b, c, d, e)

function eslint.rule_context.prototype.getJSDocComment (a, b, c, d, e)

function eslint.rule_context.prototype.getLastToken (a, b, c, d, e)

function eslint.rule_context.prototype.getLastTokens (a, b, c, d, e)

function eslint.rule_context.prototype.getNodeByRangeIndex (a, b, c, d, e)

function eslint.rule_context.prototype.getScope (a, b, c, d, e)

function eslint.rule_context.prototype.getSource (a, b, c, d, e)

function eslint.rule_context.prototype.getSourceLines (a, b, c, d, e)

function eslint.rule_context.prototype.getTokenAfter (a, b, c, d, e)

function eslint.rule_context.prototype.getTokenBefore (a, b, c, d, e)

function eslint.rule_context.prototype.getTokenByRangeStart (a, b, c, d, e)

function eslint.rule_context.prototype.getTokens (a, b, c, d, e)

function eslint.rule_context.prototype.getTokensAfter (a, b, c, d, e)

function eslint.rule_context.prototype.getTokensBefore (a, b, c, d, e)

function eslint.rule_context.prototype.getTokensBetween (a, b, c, d, e)

function eslint.rule_context.prototype.markVariableAsUsed (a, b, c, d, e)

module eslint.rules

function eslint.rules.define (ruleId, ruleModule)

function eslint.rules.get (ruleId)

function eslint.rules.getAllLoadedRules ()

function eslint.rules.importPlugin (plugin, pluginName)

function eslint.rules.load (rulesDir, cwd)

function eslint.rules.testClear ()

function eslint.rules.testReset ()

module eslint.timing

function eslint.timing.time (key, fn)

[ this document was created with utility2 ]