Bump packages to fix linter
This commit is contained in:
parent
ed9506bbaf
commit
0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions
16
node_modules/eslint/lib/source-code/source-code.js
generated
vendored
16
node_modules/eslint/lib/source-code/source-code.js
generated
vendored
|
|
@ -143,10 +143,12 @@ function isSpaceBetween(sourceCode, first, second, checkInsideOfJSXText) {
|
|||
// Public Interface
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Represents parsed source code.
|
||||
*/
|
||||
class SourceCode extends TokenStore {
|
||||
|
||||
/**
|
||||
* Represents parsed source code.
|
||||
* @param {string|Object} textOrConfig The source code text or config object.
|
||||
* @param {string} textOrConfig.text The source code text.
|
||||
* @param {ASTNode} textOrConfig.ast The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
|
||||
|
|
@ -175,20 +177,20 @@ class SourceCode extends TokenStore {
|
|||
|
||||
/**
|
||||
* The flag to indicate that the source code has Unicode BOM.
|
||||
* @type boolean
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.hasBOM = (text.charCodeAt(0) === 0xFEFF);
|
||||
|
||||
/**
|
||||
* The original text source code.
|
||||
* BOM was stripped from this text.
|
||||
* @type string
|
||||
* @type {string}
|
||||
*/
|
||||
this.text = (this.hasBOM ? text.slice(1) : text);
|
||||
|
||||
/**
|
||||
* The parsed AST for the source code.
|
||||
* @type ASTNode
|
||||
* @type {ASTNode}
|
||||
*/
|
||||
this.ast = ast;
|
||||
|
||||
|
|
@ -223,7 +225,7 @@ class SourceCode extends TokenStore {
|
|||
/**
|
||||
* The source code split into lines according to ECMA-262 specification.
|
||||
* This is done to avoid each rule needing to do so separately.
|
||||
* @type string[]
|
||||
* @type {string[]}
|
||||
*/
|
||||
this.lines = [];
|
||||
this.lineStartIndices = [0];
|
||||
|
|
@ -506,6 +508,7 @@ class SourceCode extends TokenStore {
|
|||
/**
|
||||
* Converts a source text index into a (line, column) pair.
|
||||
* @param {number} index The index of a character in a file
|
||||
* @throws {TypeError} If non-numeric index or index out of range.
|
||||
* @returns {Object} A {line, column} location object with a 0-indexed column
|
||||
* @public
|
||||
*/
|
||||
|
|
@ -545,6 +548,9 @@ class SourceCode extends TokenStore {
|
|||
* @param {Object} loc A line/column location
|
||||
* @param {number} loc.line The line number of the location (1-indexed)
|
||||
* @param {number} loc.column The column number of the location (0-indexed)
|
||||
* @throws {TypeError|RangeError} If `loc` is not an object with a numeric
|
||||
* `line` and `column`, if the `line` is less than or equal to zero or
|
||||
* the line or column is out of the expected range.
|
||||
* @returns {number} The range index of the location in the file.
|
||||
* @public
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue