mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
22
web/node_modules/babel-eslint/LICENSE
generated
vendored
Normal file
22
web/node_modules/babel-eslint/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) 2014-2016 Sebastian McKenzie <sebmck@gmail.com>
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
103
web/node_modules/babel-eslint/README.md
generated
vendored
Normal file
103
web/node_modules/babel-eslint/README.md
generated
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
# babel-eslint [](https://www.npmjs.com/package/babel-eslint) [](https://travis-ci.org/babel/babel-eslint) [](https://www.npmjs.com/package/babel-eslint)
|
||||
|
||||
**babel-eslint** allows you to lint **ALL** valid Babel code with the fantastic
|
||||
[ESLint](https://github.com/eslint/eslint).
|
||||
|
||||
### Why Use babel-eslint
|
||||
|
||||
You only need to use babel-eslint if you are using types (Flow) or experimental features not supported in ESLint itself yet. Otherwise try the default parser (you don't have to use it just because you are using Babel).
|
||||
|
||||
---
|
||||
|
||||
> If there is an issue, first check if it can be reproduced with the regular parser or with the latest versions of `eslint` and `babel-eslint`!
|
||||
|
||||
For questions and support please visit the [`#discussion`](https://babeljs.slack.com/messages/discussion/) babel slack channel (sign up [here](https://github.com/babel/notes/issues/38)) or eslint [gitter](https://gitter.im/eslint/eslint)!
|
||||
|
||||
> Note that the `ecmaFeatures` config property may still be required for ESLint to work properly with features not in ECMAScript 5 by default. Examples are `globalReturn` and `modules`).
|
||||
|
||||
## Known Issues
|
||||
|
||||
Flow:
|
||||
> Check out [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype): An `eslint` plugin that makes flow type annotations global variables and marks declarations as used. Solves the problem of false positives with `no-undef` and `no-unused-vars`.
|
||||
- `no-undef` for global flow types: `ReactElement`, `ReactClass` [#130](https://github.com/babel/babel-eslint/issues/130#issuecomment-111215076)
|
||||
- Workaround: define types as globals in `.eslintrc` or define types and import them `import type ReactElement from './types'`
|
||||
- `no-unused-vars/no-undef` with Flow declarations (`declare module A {}`) [#132](https://github.com/babel/babel-eslint/issues/132#issuecomment-112815926)
|
||||
|
||||
Modules/strict mode
|
||||
- `no-unused-vars: [2, {vars: local}]` [#136](https://github.com/babel/babel-eslint/issues/136)
|
||||
|
||||
Please check out [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for React/JSX issues
|
||||
- `no-unused-vars` with jsx
|
||||
|
||||
Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues
|
||||
|
||||
## How does it work?
|
||||
|
||||
ESLint allows custom parsers. This is great but some of the syntax nodes that Babel supports
|
||||
aren't supported by ESLint. When using this plugin, ESLint is monkeypatched and your code is
|
||||
transformed into code that ESLint can understand. All location info such as line numbers,
|
||||
columns is also retained so you can track down errors with ease.
|
||||
|
||||
Basically `babel-eslint` exports an [`index.js`](/index.js) that a linter can use.
|
||||
It just needs to export a `parse` method that takes in a string of code and outputs an AST.
|
||||
|
||||
## Usage
|
||||
|
||||
### Supported ESLint versions
|
||||
|
||||
ESLint | babel-eslint
|
||||
------------ | -------------
|
||||
4.x | >= 6.x
|
||||
3.x | >= 6.x
|
||||
2.x | >= 6.x
|
||||
1.x | >= 5.x
|
||||
|
||||
### Install
|
||||
|
||||
Ensure that you have substituted the correct version lock for `eslint` and `babel-eslint` into this command:
|
||||
|
||||
```sh
|
||||
$ npm install eslint@4.x babel-eslint@8 --save-dev
|
||||
# or
|
||||
$ yarn add eslint@4.x babel-eslint@8 -D
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
**.eslintrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"parser": "babel-eslint",
|
||||
"rules": {
|
||||
"strict": 0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rules.
|
||||
|
||||
### Configuration
|
||||
|
||||
- `sourceType` can be set to `'module'`(default) or `'script'` if your code isn't using ECMAScript modules.
|
||||
- `allowImportExportEverywhere` (default `false`) can be set to `true` to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level.
|
||||
- `codeFrame` (default `true`) can be set to `false` to disable the code frame in the reporter. This is useful since some eslint formatters don't play well with it.
|
||||
|
||||
**.eslintrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"allowImportExportEverywhere": false,
|
||||
"codeFrame": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
```sh
|
||||
$ eslint your-files-here
|
||||
```
|
346
web/node_modules/babel-eslint/lib/analyze-scope.js
generated
vendored
Normal file
346
web/node_modules/babel-eslint/lib/analyze-scope.js
generated
vendored
Normal file
|
@ -0,0 +1,346 @@
|
|||
"use strict";
|
||||
|
||||
const t = require("@babel/types");
|
||||
const requireFromESLint = require("./require-from-eslint");
|
||||
|
||||
const escope = requireFromESLint("eslint-scope");
|
||||
const Definition = requireFromESLint("eslint-scope/lib/definition").Definition;
|
||||
const OriginalPatternVisitor = requireFromESLint(
|
||||
"eslint-scope/lib/pattern-visitor"
|
||||
);
|
||||
const OriginalReferencer = requireFromESLint("eslint-scope/lib/referencer");
|
||||
const fallback = require("eslint-visitor-keys").getKeys;
|
||||
const childVisitorKeys = require("./visitor-keys");
|
||||
|
||||
const flowFlippedAliasKeys = t.FLIPPED_ALIAS_KEYS.Flow.concat([
|
||||
"ArrayPattern",
|
||||
"ClassDeclaration",
|
||||
"ClassExpression",
|
||||
"FunctionDeclaration",
|
||||
"FunctionExpression",
|
||||
"Identifier",
|
||||
"ObjectPattern",
|
||||
"RestElement",
|
||||
]);
|
||||
const visitorKeysMap = Object.keys(t.VISITOR_KEYS).reduce(function(acc, key) {
|
||||
const value = t.VISITOR_KEYS[key];
|
||||
if (flowFlippedAliasKeys.indexOf(value) === -1) {
|
||||
acc[key] = value;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
const propertyTypes = {
|
||||
// loops
|
||||
callProperties: { type: "loop", values: ["value"] },
|
||||
indexers: { type: "loop", values: ["key", "value"] },
|
||||
properties: { type: "loop", values: ["argument", "value"] },
|
||||
types: { type: "loop" },
|
||||
params: { type: "loop" },
|
||||
// single property
|
||||
argument: { type: "single" },
|
||||
elementType: { type: "single" },
|
||||
qualification: { type: "single" },
|
||||
rest: { type: "single" },
|
||||
returnType: { type: "single" },
|
||||
// others
|
||||
typeAnnotation: { type: "typeAnnotation" },
|
||||
typeParameters: { type: "typeParameters" },
|
||||
id: { type: "id" },
|
||||
};
|
||||
|
||||
class PatternVisitor extends OriginalPatternVisitor {
|
||||
ArrayPattern(node) {
|
||||
node.elements.forEach(this.visit, this);
|
||||
}
|
||||
|
||||
ObjectPattern(node) {
|
||||
node.properties.forEach(this.visit, this);
|
||||
}
|
||||
}
|
||||
|
||||
class Referencer extends OriginalReferencer {
|
||||
// inherits.
|
||||
visitPattern(node, options, callback) {
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Visit type annotations.
|
||||
this._checkIdentifierOrVisit(node.typeAnnotation);
|
||||
if (t.isAssignmentPattern(node)) {
|
||||
this._checkIdentifierOrVisit(node.left.typeAnnotation);
|
||||
}
|
||||
|
||||
// Overwrite `super.visitPattern(node, options, callback)` in order to not visit `ArrayPattern#typeAnnotation` and `ObjectPattern#typeAnnotation`.
|
||||
if (typeof options === "function") {
|
||||
callback = options;
|
||||
options = { processRightHandNodes: false };
|
||||
}
|
||||
|
||||
const visitor = new PatternVisitor(this.options, node, callback);
|
||||
visitor.visit(node);
|
||||
|
||||
// Process the right hand nodes recursively.
|
||||
if (options.processRightHandNodes) {
|
||||
visitor.rightHandNodes.forEach(this.visit, this);
|
||||
}
|
||||
}
|
||||
|
||||
// inherits.
|
||||
visitClass(node) {
|
||||
// Decorators.
|
||||
this._visitArray(node.decorators);
|
||||
|
||||
// Flow type parameters.
|
||||
const typeParamScope = this._nestTypeParamScope(node);
|
||||
|
||||
// Flow super types.
|
||||
this._visitTypeAnnotation(node.implements);
|
||||
this._visitTypeAnnotation(
|
||||
node.superTypeParameters && node.superTypeParameters.params
|
||||
);
|
||||
|
||||
// Basic.
|
||||
super.visitClass(node);
|
||||
|
||||
// Close the type parameter scope.
|
||||
if (typeParamScope) {
|
||||
this.close(node);
|
||||
}
|
||||
}
|
||||
|
||||
// inherits.
|
||||
visitFunction(node) {
|
||||
const typeParamScope = this._nestTypeParamScope(node);
|
||||
|
||||
// Flow return types.
|
||||
this._checkIdentifierOrVisit(node.returnType);
|
||||
|
||||
// Basic.
|
||||
super.visitFunction(node);
|
||||
|
||||
// Close the type parameter scope.
|
||||
if (typeParamScope) {
|
||||
this.close(node);
|
||||
}
|
||||
}
|
||||
|
||||
// inherits.
|
||||
visitProperty(node) {
|
||||
if (node.value && node.value.type === "TypeCastExpression") {
|
||||
this._visitTypeAnnotation(node.value);
|
||||
}
|
||||
this._visitArray(node.decorators);
|
||||
super.visitProperty(node);
|
||||
}
|
||||
|
||||
InterfaceDeclaration(node) {
|
||||
this._createScopeVariable(node, node.id);
|
||||
|
||||
const typeParamScope = this._nestTypeParamScope(node);
|
||||
|
||||
// TODO: Handle mixins
|
||||
this._visitArray(node.extends);
|
||||
this.visit(node.body);
|
||||
|
||||
if (typeParamScope) {
|
||||
this.close(node);
|
||||
}
|
||||
}
|
||||
|
||||
EnumDeclaration(node) {
|
||||
this._createScopeVariable(node, node.id);
|
||||
}
|
||||
|
||||
TypeAlias(node) {
|
||||
this._createScopeVariable(node, node.id);
|
||||
|
||||
const typeParamScope = this._nestTypeParamScope(node);
|
||||
|
||||
this.visit(node.right);
|
||||
|
||||
if (typeParamScope) {
|
||||
this.close(node);
|
||||
}
|
||||
}
|
||||
|
||||
ClassProperty(node) {
|
||||
this._visitClassProperty(node);
|
||||
}
|
||||
|
||||
ClassPrivateProperty(node) {
|
||||
this._visitClassProperty(node);
|
||||
}
|
||||
|
||||
DeclareModule(node) {
|
||||
this._visitDeclareX(node);
|
||||
}
|
||||
|
||||
DeclareFunction(node) {
|
||||
this._visitDeclareX(node);
|
||||
}
|
||||
|
||||
DeclareVariable(node) {
|
||||
this._visitDeclareX(node);
|
||||
}
|
||||
|
||||
DeclareClass(node) {
|
||||
this._visitDeclareX(node);
|
||||
}
|
||||
|
||||
// visit OptionalMemberExpression as a MemberExpression.
|
||||
OptionalMemberExpression(node) {
|
||||
super.MemberExpression(node);
|
||||
}
|
||||
|
||||
_visitClassProperty(node) {
|
||||
this._visitTypeAnnotation(node.typeAnnotation);
|
||||
this.visitProperty(node);
|
||||
}
|
||||
|
||||
_visitDeclareX(node) {
|
||||
if (node.id) {
|
||||
this._createScopeVariable(node, node.id);
|
||||
}
|
||||
|
||||
const typeParamScope = this._nestTypeParamScope(node);
|
||||
if (typeParamScope) {
|
||||
this.close(node);
|
||||
}
|
||||
}
|
||||
|
||||
_createScopeVariable(node, name) {
|
||||
this.currentScope().variableScope.__define(
|
||||
name,
|
||||
new Definition("Variable", name, node, null, null, null)
|
||||
);
|
||||
}
|
||||
|
||||
_nestTypeParamScope(node) {
|
||||
if (!node.typeParameters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const parentScope = this.scopeManager.__currentScope;
|
||||
const scope = new escope.Scope(
|
||||
this.scopeManager,
|
||||
"type-parameters",
|
||||
parentScope,
|
||||
node,
|
||||
false
|
||||
);
|
||||
|
||||
this.scopeManager.__nestScope(scope);
|
||||
for (let j = 0; j < node.typeParameters.params.length; j++) {
|
||||
const name = node.typeParameters.params[j];
|
||||
scope.__define(name, new Definition("TypeParameter", name, name));
|
||||
if (name.typeAnnotation) {
|
||||
this._checkIdentifierOrVisit(name);
|
||||
}
|
||||
}
|
||||
scope.__define = function() {
|
||||
return parentScope.__define.apply(parentScope, arguments);
|
||||
};
|
||||
|
||||
return scope;
|
||||
}
|
||||
|
||||
_visitTypeAnnotation(node) {
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
if (Array.isArray(node)) {
|
||||
node.forEach(this._visitTypeAnnotation, this);
|
||||
return;
|
||||
}
|
||||
|
||||
// get property to check (params, id, etc...)
|
||||
const visitorValues = visitorKeysMap[node.type];
|
||||
if (!visitorValues) {
|
||||
return;
|
||||
}
|
||||
|
||||
// can have multiple properties
|
||||
for (let i = 0; i < visitorValues.length; i++) {
|
||||
const visitorValue = visitorValues[i];
|
||||
const propertyType = propertyTypes[visitorValue];
|
||||
const nodeProperty = node[visitorValue];
|
||||
// check if property or type is defined
|
||||
if (propertyType == null || nodeProperty == null) {
|
||||
continue;
|
||||
}
|
||||
if (propertyType.type === "loop") {
|
||||
for (let j = 0; j < nodeProperty.length; j++) {
|
||||
if (Array.isArray(propertyType.values)) {
|
||||
for (let k = 0; k < propertyType.values.length; k++) {
|
||||
const loopPropertyNode = nodeProperty[j][propertyType.values[k]];
|
||||
if (loopPropertyNode) {
|
||||
this._checkIdentifierOrVisit(loopPropertyNode);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this._checkIdentifierOrVisit(nodeProperty[j]);
|
||||
}
|
||||
}
|
||||
} else if (propertyType.type === "single") {
|
||||
this._checkIdentifierOrVisit(nodeProperty);
|
||||
} else if (propertyType.type === "typeAnnotation") {
|
||||
this._visitTypeAnnotation(node.typeAnnotation);
|
||||
} else if (propertyType.type === "typeParameters") {
|
||||
for (let l = 0; l < node.typeParameters.params.length; l++) {
|
||||
this._checkIdentifierOrVisit(node.typeParameters.params[l]);
|
||||
}
|
||||
} else if (propertyType.type === "id") {
|
||||
if (node.id.type === "Identifier") {
|
||||
this._checkIdentifierOrVisit(node.id);
|
||||
} else {
|
||||
this._visitTypeAnnotation(node.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_checkIdentifierOrVisit(node) {
|
||||
if (node && node.typeAnnotation) {
|
||||
this._visitTypeAnnotation(node.typeAnnotation);
|
||||
} else if (node && node.type === "Identifier") {
|
||||
this.visit(node);
|
||||
} else {
|
||||
this._visitTypeAnnotation(node);
|
||||
}
|
||||
}
|
||||
|
||||
_visitArray(nodeList) {
|
||||
if (nodeList) {
|
||||
for (const node of nodeList) {
|
||||
this.visit(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function(ast, parserOptions) {
|
||||
const options = {
|
||||
ignoreEval: true,
|
||||
optimistic: false,
|
||||
directive: false,
|
||||
nodejsScope:
|
||||
ast.sourceType === "script" &&
|
||||
(parserOptions.ecmaFeatures &&
|
||||
parserOptions.ecmaFeatures.globalReturn) === true,
|
||||
impliedStrict: false,
|
||||
sourceType: ast.sourceType,
|
||||
ecmaVersion: parserOptions.ecmaVersion || 2018,
|
||||
fallback,
|
||||
};
|
||||
|
||||
options.childVisitorKeys = childVisitorKeys;
|
||||
|
||||
const scopeManager = new escope.ScopeManager(options);
|
||||
const referencer = new Referencer(options, scopeManager);
|
||||
|
||||
referencer.visit(ast);
|
||||
|
||||
return scopeManager;
|
||||
};
|
59
web/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js
generated
vendored
Normal file
59
web/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js
generated
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
"use strict";
|
||||
|
||||
// comment fixes
|
||||
module.exports = function(ast, comments, tokens) {
|
||||
if (comments.length) {
|
||||
var firstComment = comments[0];
|
||||
var lastComment = comments[comments.length - 1];
|
||||
// fixup program start
|
||||
if (!tokens.length) {
|
||||
// if no tokens, the program starts at the end of the last comment
|
||||
ast.start = lastComment.end;
|
||||
ast.loc.start.line = lastComment.loc.end.line;
|
||||
ast.loc.start.column = lastComment.loc.end.column;
|
||||
|
||||
if (ast.leadingComments === null && ast.innerComments.length) {
|
||||
ast.leadingComments = ast.innerComments;
|
||||
}
|
||||
} else if (firstComment.start < tokens[0].start) {
|
||||
// if there are comments before the first token, the program starts at the first token
|
||||
var token = tokens[0];
|
||||
// ast.start = token.start;
|
||||
// ast.loc.start.line = token.loc.start.line;
|
||||
// ast.loc.start.column = token.loc.start.column;
|
||||
|
||||
// estraverse do not put leading comments on first node when the comment
|
||||
// appear before the first token
|
||||
if (ast.body.length) {
|
||||
var node = ast.body[0];
|
||||
node.leadingComments = [];
|
||||
var firstTokenStart = token.start;
|
||||
var len = comments.length;
|
||||
for (var i = 0; i < len && comments[i].start < firstTokenStart; i++) {
|
||||
node.leadingComments.push(comments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// fixup program end
|
||||
if (tokens.length) {
|
||||
var lastToken = tokens[tokens.length - 1];
|
||||
if (lastComment.end > lastToken.end) {
|
||||
// If there is a comment after the last token, the program ends at the
|
||||
// last token and not the comment
|
||||
// ast.end = lastToken.end;
|
||||
ast.range[1] = lastToken.end;
|
||||
ast.loc.end.line = lastToken.loc.end.line;
|
||||
ast.loc.end.column = lastToken.loc.end.column;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!tokens.length) {
|
||||
ast.loc.start.line = 1;
|
||||
ast.loc.end.line = 1;
|
||||
}
|
||||
}
|
||||
if (ast.body && ast.body.length > 0) {
|
||||
ast.loc.start.line = ast.body[0].loc.start.line;
|
||||
ast.range[0] = ast.body[0].start;
|
||||
}
|
||||
};
|
17
web/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js
generated
vendored
Normal file
17
web/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function(comments) {
|
||||
for (var i = 0; i < comments.length; i++) {
|
||||
var comment = comments[i];
|
||||
if (comment.type === "CommentBlock") {
|
||||
comment.type = "Block";
|
||||
} else if (comment.type === "CommentLine") {
|
||||
comment.type = "Line";
|
||||
}
|
||||
// sometimes comments don't get ranges computed,
|
||||
// even with options.ranges === true
|
||||
if (!comment.range) {
|
||||
comment.range = [comment.start, comment.end];
|
||||
}
|
||||
}
|
||||
};
|
92
web/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js
generated
vendored
Normal file
92
web/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js
generated
vendored
Normal file
|
@ -0,0 +1,92 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function(tokens, tt) {
|
||||
let curlyBrace = null;
|
||||
let templateTokens = [];
|
||||
const result = [];
|
||||
|
||||
function addTemplateType() {
|
||||
const start = templateTokens[0];
|
||||
const end = templateTokens[templateTokens.length - 1];
|
||||
|
||||
const value = templateTokens.reduce((result, token) => {
|
||||
if (token.value) {
|
||||
result += token.value;
|
||||
} else if (token.type !== tt.template) {
|
||||
result += token.type.label;
|
||||
}
|
||||
|
||||
return result;
|
||||
}, "");
|
||||
|
||||
result.push({
|
||||
type: "Template",
|
||||
value: value,
|
||||
start: start.start,
|
||||
end: end.end,
|
||||
loc: {
|
||||
start: start.loc.start,
|
||||
end: end.loc.end,
|
||||
},
|
||||
});
|
||||
|
||||
templateTokens = [];
|
||||
}
|
||||
|
||||
tokens.forEach(token => {
|
||||
switch (token.type) {
|
||||
case tt.backQuote:
|
||||
if (curlyBrace) {
|
||||
result.push(curlyBrace);
|
||||
curlyBrace = null;
|
||||
}
|
||||
|
||||
templateTokens.push(token);
|
||||
|
||||
if (templateTokens.length > 1) {
|
||||
addTemplateType();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case tt.dollarBraceL:
|
||||
templateTokens.push(token);
|
||||
addTemplateType();
|
||||
break;
|
||||
|
||||
case tt.braceR:
|
||||
if (curlyBrace) {
|
||||
result.push(curlyBrace);
|
||||
}
|
||||
|
||||
curlyBrace = token;
|
||||
break;
|
||||
|
||||
case tt.template:
|
||||
if (curlyBrace) {
|
||||
templateTokens.push(curlyBrace);
|
||||
curlyBrace = null;
|
||||
}
|
||||
|
||||
templateTokens.push(token);
|
||||
break;
|
||||
|
||||
case tt.eof:
|
||||
if (curlyBrace) {
|
||||
result.push(curlyBrace);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
if (curlyBrace) {
|
||||
result.push(curlyBrace);
|
||||
curlyBrace = null;
|
||||
}
|
||||
|
||||
result.push(token);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
30
web/node_modules/babel-eslint/lib/babylon-to-espree/index.js
generated
vendored
Normal file
30
web/node_modules/babel-eslint/lib/babylon-to-espree/index.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
"use strict";
|
||||
|
||||
var attachComments = require("./attachComments");
|
||||
var convertComments = require("./convertComments");
|
||||
var toTokens = require("./toTokens");
|
||||
var toAST = require("./toAST");
|
||||
|
||||
module.exports = function(ast, traverse, tt, code) {
|
||||
// convert tokens
|
||||
ast.tokens = toTokens(ast.tokens, tt, code);
|
||||
|
||||
// add comments
|
||||
convertComments(ast.comments);
|
||||
|
||||
// transform esprima and acorn divergent nodes
|
||||
toAST(ast, traverse, code);
|
||||
|
||||
// ast.program.tokens = ast.tokens;
|
||||
// ast.program.comments = ast.comments;
|
||||
// ast = ast.program;
|
||||
|
||||
// remove File
|
||||
ast.type = "Program";
|
||||
ast.sourceType = ast.program.sourceType;
|
||||
ast.directives = ast.program.directives;
|
||||
ast.body = ast.program.body;
|
||||
delete ast.program;
|
||||
|
||||
attachComments(ast, ast.comments, ast.tokens);
|
||||
};
|
118
web/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js
generated
vendored
Normal file
118
web/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js
generated
vendored
Normal file
|
@ -0,0 +1,118 @@
|
|||
"use strict";
|
||||
|
||||
var t = require("@babel/types");
|
||||
var convertComments = require("./convertComments");
|
||||
|
||||
module.exports = function(ast, traverse, code) {
|
||||
var state = { source: code };
|
||||
|
||||
// Monkey patch visitor keys in order to be able to traverse the estree nodes
|
||||
t.VISITOR_KEYS.Property = t.VISITOR_KEYS.ObjectProperty;
|
||||
t.VISITOR_KEYS.MethodDefinition = [
|
||||
"key",
|
||||
"value",
|
||||
"decorators",
|
||||
"returnType",
|
||||
"typeParameters",
|
||||
];
|
||||
|
||||
traverse(ast, astTransformVisitor, null, state);
|
||||
|
||||
delete t.VISITOR_KEYS.Property;
|
||||
delete t.VISITOR_KEYS.MethodDefinition;
|
||||
};
|
||||
|
||||
var astTransformVisitor = {
|
||||
noScope: true,
|
||||
enter(path) {
|
||||
var node = path.node;
|
||||
|
||||
// private var to track original node type
|
||||
node._babelType = node.type;
|
||||
|
||||
if (node.innerComments) {
|
||||
node.trailingComments = node.innerComments;
|
||||
delete node.innerComments;
|
||||
}
|
||||
|
||||
if (node.trailingComments) {
|
||||
convertComments(node.trailingComments);
|
||||
}
|
||||
|
||||
if (node.leadingComments) {
|
||||
convertComments(node.leadingComments);
|
||||
}
|
||||
},
|
||||
exit(path) {
|
||||
var node = path.node;
|
||||
|
||||
if (path.isJSXText()) {
|
||||
node.type = "Literal";
|
||||
}
|
||||
|
||||
if (
|
||||
path.isRestElement() &&
|
||||
path.parent &&
|
||||
path.parent.type === "ObjectPattern"
|
||||
) {
|
||||
node.type = "ExperimentalRestProperty";
|
||||
}
|
||||
|
||||
if (
|
||||
path.isSpreadElement() &&
|
||||
path.parent &&
|
||||
path.parent.type === "ObjectExpression"
|
||||
) {
|
||||
node.type = "ExperimentalSpreadProperty";
|
||||
}
|
||||
|
||||
if (path.isTypeParameter()) {
|
||||
node.type = "Identifier";
|
||||
node.typeAnnotation = node.bound;
|
||||
delete node.bound;
|
||||
}
|
||||
|
||||
// flow: prevent "no-undef"
|
||||
// for "Component" in: "let x: React.Component"
|
||||
if (path.isQualifiedTypeIdentifier()) {
|
||||
delete node.id;
|
||||
}
|
||||
// for "b" in: "var a: { b: Foo }"
|
||||
if (path.isObjectTypeProperty()) {
|
||||
delete node.key;
|
||||
}
|
||||
// for "indexer" in: "var a: {[indexer: string]: number}"
|
||||
if (path.isObjectTypeIndexer()) {
|
||||
delete node.id;
|
||||
}
|
||||
// for "param" in: "var a: { func(param: Foo): Bar };"
|
||||
if (path.isFunctionTypeParam()) {
|
||||
delete node.name;
|
||||
}
|
||||
|
||||
// modules
|
||||
|
||||
if (path.isImportDeclaration()) {
|
||||
delete node.isType;
|
||||
}
|
||||
|
||||
// template string range fixes
|
||||
if (path.isTemplateLiteral()) {
|
||||
for (var j = 0; j < node.quasis.length; j++) {
|
||||
var q = node.quasis[j];
|
||||
q.range[0] -= 1;
|
||||
if (q.tail) {
|
||||
q.range[1] += 1;
|
||||
} else {
|
||||
q.range[1] += 2;
|
||||
}
|
||||
q.loc.start.column -= 1;
|
||||
if (q.tail) {
|
||||
q.loc.end.column += 1;
|
||||
} else {
|
||||
q.loc.end.column += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
84
web/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js
generated
vendored
Normal file
84
web/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js
generated
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function(token, tt, source) {
|
||||
var type = token.type;
|
||||
token.range = [token.start, token.end];
|
||||
|
||||
if (type === tt.name) {
|
||||
token.type = "Identifier";
|
||||
} else if (
|
||||
type === tt.semi ||
|
||||
type === tt.comma ||
|
||||
type === tt.parenL ||
|
||||
type === tt.parenR ||
|
||||
type === tt.braceL ||
|
||||
type === tt.braceR ||
|
||||
type === tt.slash ||
|
||||
type === tt.dot ||
|
||||
type === tt.bracketL ||
|
||||
type === tt.bracketR ||
|
||||
type === tt.ellipsis ||
|
||||
type === tt.arrow ||
|
||||
type === tt.pipeline ||
|
||||
type === tt.star ||
|
||||
type === tt.incDec ||
|
||||
type === tt.colon ||
|
||||
type === tt.question ||
|
||||
type === tt.questionDot ||
|
||||
type === tt.template ||
|
||||
type === tt.backQuote ||
|
||||
type === tt.dollarBraceL ||
|
||||
type === tt.at ||
|
||||
type === tt.logicalOR ||
|
||||
type === tt.logicalAND ||
|
||||
type === tt.nullishCoalescing ||
|
||||
type === tt.bitwiseOR ||
|
||||
type === tt.bitwiseXOR ||
|
||||
type === tt.bitwiseAND ||
|
||||
type === tt.equality ||
|
||||
type === tt.relational ||
|
||||
type === tt.bitShift ||
|
||||
type === tt.plusMin ||
|
||||
type === tt.modulo ||
|
||||
type === tt.exponent ||
|
||||
type === tt.bang ||
|
||||
type === tt.tilde ||
|
||||
type === tt.doubleColon ||
|
||||
type.isAssign
|
||||
) {
|
||||
token.type = "Punctuator";
|
||||
if (!token.value) token.value = type.label;
|
||||
} else if (type === tt.jsxTagStart) {
|
||||
token.type = "Punctuator";
|
||||
token.value = "<";
|
||||
} else if (type === tt.jsxTagEnd) {
|
||||
token.type = "Punctuator";
|
||||
token.value = ">";
|
||||
} else if (type === tt.jsxName) {
|
||||
token.type = "JSXIdentifier";
|
||||
} else if (type === tt.jsxText) {
|
||||
token.type = "JSXText";
|
||||
} else if (type.keyword === "null") {
|
||||
token.type = "Null";
|
||||
} else if (type.keyword === "false" || type.keyword === "true") {
|
||||
token.type = "Boolean";
|
||||
} else if (type.keyword) {
|
||||
token.type = "Keyword";
|
||||
} else if (type === tt.num) {
|
||||
token.type = "Numeric";
|
||||
token.value = source.slice(token.start, token.end);
|
||||
} else if (type === tt.string) {
|
||||
token.type = "String";
|
||||
token.value = source.slice(token.start, token.end);
|
||||
} else if (type === tt.regexp) {
|
||||
token.type = "RegularExpression";
|
||||
var value = token.value;
|
||||
token.regex = {
|
||||
pattern: value.pattern,
|
||||
flags: value.flags,
|
||||
};
|
||||
token.value = `/${value.pattern}/${value.flags}`;
|
||||
}
|
||||
|
||||
return token;
|
||||
};
|
10
web/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js
generated
vendored
Normal file
10
web/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
var convertTemplateType = require("./convertTemplateType");
|
||||
var toToken = require("./toToken");
|
||||
|
||||
module.exports = function(tokens, tt, code) {
|
||||
return convertTemplateType(tokens, tt)
|
||||
.filter(t => t.type !== "CommentLine" && t.type !== "CommentBlock")
|
||||
.map(t => toToken(t, tt, code));
|
||||
};
|
19
web/node_modules/babel-eslint/lib/index.js
generated
vendored
Normal file
19
web/node_modules/babel-eslint/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
exports.parse = function(code, options) {
|
||||
return exports.parseForESLint(code, options).ast;
|
||||
};
|
||||
|
||||
exports.parseForESLint = function(code, options) {
|
||||
options = options || {};
|
||||
options.ecmaVersion = options.ecmaVersion || 2018;
|
||||
options.sourceType = options.sourceType || "module";
|
||||
options.allowImportExportEverywhere =
|
||||
options.allowImportExportEverywhere || false;
|
||||
|
||||
return require("./parse-with-scope")(code, options);
|
||||
};
|
||||
|
||||
exports.parseNoPatch = function(code, options) {
|
||||
return require("./parse")(code, options);
|
||||
};
|
12
web/node_modules/babel-eslint/lib/parse-with-scope.js
generated
vendored
Normal file
12
web/node_modules/babel-eslint/lib/parse-with-scope.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
const visitorKeys = require("./visitor-keys");
|
||||
const analyzeScope = require("./analyze-scope");
|
||||
const parse = require("./parse");
|
||||
|
||||
module.exports = function(code, options) {
|
||||
const ast = parse(code, options);
|
||||
const scopeManager = analyzeScope(ast, options);
|
||||
|
||||
return { ast, scopeManager, visitorKeys };
|
||||
};
|
93
web/node_modules/babel-eslint/lib/parse.js
generated
vendored
Normal file
93
web/node_modules/babel-eslint/lib/parse.js
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
"use strict";
|
||||
|
||||
var babylonToEspree = require("./babylon-to-espree");
|
||||
var parse = require("@babel/parser").parse;
|
||||
var tt = require("@babel/parser").tokTypes;
|
||||
var traverse = require("@babel/traverse").default;
|
||||
var codeFrameColumns = require("@babel/code-frame").codeFrameColumns;
|
||||
|
||||
module.exports = function(code, options) {
|
||||
const legacyDecorators =
|
||||
options.ecmaFeatures && options.ecmaFeatures.legacyDecorators;
|
||||
|
||||
var opts = {
|
||||
codeFrame: options.hasOwnProperty("codeFrame") ? options.codeFrame : true,
|
||||
sourceType: options.sourceType,
|
||||
allowImportExportEverywhere: options.allowImportExportEverywhere, // consistent with espree
|
||||
allowReturnOutsideFunction: true,
|
||||
allowSuperOutsideMethod: true,
|
||||
ranges: true,
|
||||
tokens: true,
|
||||
plugins: [
|
||||
["flow", { all: true, enums: true }],
|
||||
"jsx",
|
||||
"estree",
|
||||
"asyncFunctions",
|
||||
"asyncGenerators",
|
||||
"classConstructorCall",
|
||||
"classProperties",
|
||||
legacyDecorators
|
||||
? "decorators-legacy"
|
||||
: ["decorators", { decoratorsBeforeExport: false }],
|
||||
"doExpressions",
|
||||
"exponentiationOperator",
|
||||
"exportDefaultFrom",
|
||||
"exportNamespaceFrom",
|
||||
"functionBind",
|
||||
"functionSent",
|
||||
"objectRestSpread",
|
||||
"trailingFunctionCommas",
|
||||
"dynamicImport",
|
||||
"numericSeparator",
|
||||
"optionalChaining",
|
||||
"importMeta",
|
||||
"classPrivateProperties",
|
||||
"bigInt",
|
||||
"optionalCatchBinding",
|
||||
"throwExpressions",
|
||||
["pipelineOperator", { proposal: "minimal" }],
|
||||
"nullishCoalescingOperator",
|
||||
"logicalAssignment",
|
||||
],
|
||||
};
|
||||
|
||||
var ast;
|
||||
try {
|
||||
ast = parse(code, opts);
|
||||
} catch (err) {
|
||||
if (err instanceof SyntaxError) {
|
||||
err.lineNumber = err.loc.line;
|
||||
err.column = err.loc.column;
|
||||
|
||||
if (opts.codeFrame) {
|
||||
err.lineNumber = err.loc.line;
|
||||
err.column = err.loc.column + 1;
|
||||
|
||||
// remove trailing "(LINE:COLUMN)" acorn message and add in esprima syntax error message start
|
||||
err.message =
|
||||
"Line " +
|
||||
err.lineNumber +
|
||||
": " +
|
||||
err.message.replace(/ \((\d+):(\d+)\)$/, "") +
|
||||
// add codeframe
|
||||
"\n\n" +
|
||||
codeFrameColumns(
|
||||
code,
|
||||
{
|
||||
start: {
|
||||
line: err.lineNumber,
|
||||
column: err.column,
|
||||
},
|
||||
},
|
||||
{ highlightCode: true }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
|
||||
babylonToEspree(ast, traverse, tt, code);
|
||||
|
||||
return ast;
|
||||
};
|
9
web/node_modules/babel-eslint/lib/require-from-eslint.js
generated
vendored
Normal file
9
web/node_modules/babel-eslint/lib/require-from-eslint.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
const resolve = require("resolve");
|
||||
const eslintBase = require.resolve("eslint");
|
||||
|
||||
module.exports = function requireFromESLint(id) {
|
||||
const path = resolve.sync(id, { basedir: eslintBase });
|
||||
return require(path);
|
||||
};
|
15
web/node_modules/babel-eslint/lib/visitor-keys.js
generated
vendored
Normal file
15
web/node_modules/babel-eslint/lib/visitor-keys.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
const BABEL_VISITOR_KEYS = require("@babel/types").VISITOR_KEYS;
|
||||
const ESLINT_VISITOR_KEYS = require("eslint-visitor-keys").KEYS;
|
||||
|
||||
module.exports = Object.assign(
|
||||
{
|
||||
Literal: ESLINT_VISITOR_KEYS.Literal,
|
||||
MethodDefinition: ["decorators"].concat(
|
||||
ESLINT_VISITOR_KEYS.MethodDefinition
|
||||
),
|
||||
Property: ["decorators"].concat(ESLINT_VISITOR_KEYS.Property),
|
||||
},
|
||||
BABEL_VISITOR_KEYS
|
||||
);
|
25
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/CHANGELOG.md
generated
vendored
Normal file
25
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
v1.3.0 - June 19, 2020
|
||||
|
||||
* [`c92dd7f`](https://github.com/eslint/eslint-visitor-keys/commit/c92dd7ff96f0044dba12d681406a025b92b4c437) Update: add `ChainExpression` node (#12) (Toru Nagashima)
|
||||
|
||||
v1.2.0 - June 4, 2020
|
||||
|
||||
* [`21f28bf`](https://github.com/eslint/eslint-visitor-keys/commit/21f28bf11be5329d740a8bf6bdbcd0ef13bbf1a2) Update: added exported in exportAllDeclaration key (#10) (Anix)
|
||||
|
||||
v1.1.0 - August 13, 2019
|
||||
|
||||
* [`9331cc0`](https://github.com/eslint/eslint-visitor-keys/commit/9331cc09e756e65b9044c9186445a474b037fac6) Update: add ImportExpression (#8) (Toru Nagashima)
|
||||
* [`5967f58`](https://github.com/eslint/eslint-visitor-keys/commit/5967f583b04f17fba9226aaa394e45d476d2b8af) Chore: add supported Node.js versions to CI (#7) (Kai Cataldo)
|
||||
* [`6f7c60f`](https://github.com/eslint/eslint-visitor-keys/commit/6f7c60fef2ceec9f6323202df718321cec45cab0) Upgrade: eslint-release@1.0.0 (#5) (Teddy Katz)
|
||||
|
||||
v1.0.0 - December 18, 2017
|
||||
|
||||
* 1f6bd38 Breaking: update keys (#4) (Toru Nagashima)
|
||||
|
||||
v0.1.0 - November 17, 2017
|
||||
|
||||
* 17b4a88 Chore: update `repository` field in package.json (#3) (Toru Nagashima)
|
||||
* a5a026b New: eslint-visitor-keys (#1) (Toru Nagashima)
|
||||
* a1a48b8 Update: Change license to Apache 2 (#2) (Ilya Volodin)
|
||||
* 2204715 Initial commit (Toru Nagashima)
|
||||
|
201
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/LICENSE
generated
vendored
Normal file
201
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright contributors
|
||||
|
||||
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.
|
98
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/README.md
generated
vendored
Normal file
98
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/README.md
generated
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
# eslint-visitor-keys
|
||||
|
||||
[](https://www.npmjs.com/package/eslint-visitor-keys)
|
||||
[](http://www.npmtrends.com/eslint-visitor-keys)
|
||||
[](https://travis-ci.org/eslint/eslint-visitor-keys)
|
||||
[](https://david-dm.org/eslint/eslint-visitor-keys)
|
||||
|
||||
Constants and utilities about visitor keys to traverse AST.
|
||||
|
||||
## 💿 Installation
|
||||
|
||||
Use [npm] to install.
|
||||
|
||||
```bash
|
||||
$ npm install eslint-visitor-keys
|
||||
```
|
||||
|
||||
### Requirements
|
||||
|
||||
- [Node.js] 4.0.0 or later.
|
||||
|
||||
## 📖 Usage
|
||||
|
||||
```js
|
||||
const evk = require("eslint-visitor-keys")
|
||||
```
|
||||
|
||||
### evk.KEYS
|
||||
|
||||
> type: `{ [type: string]: string[] | undefined }`
|
||||
|
||||
Visitor keys. This keys are frozen.
|
||||
|
||||
This is an object. Keys are the type of [ESTree] nodes. Their values are an array of property names which have child nodes.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"]
|
||||
```
|
||||
|
||||
### evk.getKeys(node)
|
||||
|
||||
> type: `(node: object) => string[]`
|
||||
|
||||
Get the visitor keys of a given AST node.
|
||||
|
||||
This is similar to `Object.keys(node)` of ES Standard, but some keys are excluded: `parent`, `leadingComments`, `trailingComments`, and names which start with `_`.
|
||||
|
||||
This will be used to traverse unknown nodes.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
const node = {
|
||||
type: "AssignmentExpression",
|
||||
left: { type: "Identifier", name: "foo" },
|
||||
right: { type: "Literal", value: 0 }
|
||||
}
|
||||
console.log(evk.getKeys(node)) // → ["type", "left", "right"]
|
||||
```
|
||||
|
||||
### evk.unionWith(additionalKeys)
|
||||
|
||||
> type: `(additionalKeys: object) => { [type: string]: string[] | undefined }`
|
||||
|
||||
Make the union set with `evk.KEYS` and the given keys.
|
||||
|
||||
- The order of keys is, `additionalKeys` is at first, then `evk.KEYS` is concatenated after that.
|
||||
- It removes duplicated keys as keeping the first one.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
console.log(evk.unionWith({
|
||||
MethodDefinition: ["decorators"]
|
||||
})) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... }
|
||||
```
|
||||
|
||||
## 📰 Change log
|
||||
|
||||
See [GitHub releases](https://github.com/eslint/eslint-visitor-keys/releases).
|
||||
|
||||
## 🍻 Contributing
|
||||
|
||||
Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer-guide/contributing/).
|
||||
|
||||
### Development commands
|
||||
|
||||
- `npm test` runs tests and measures code coverage.
|
||||
- `npm run lint` checks source codes with ESLint.
|
||||
- `npm run coverage` opens the code coverage report of the previous test with your default browser.
|
||||
- `npm run release` publishes this package to [npm] registory.
|
||||
|
||||
|
||||
[npm]: https://www.npmjs.com/
|
||||
[Node.js]: https://nodejs.org/en/
|
||||
[ESTree]: https://github.com/estree/estree
|
81
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/index.js
generated
vendored
Normal file
81
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
/**
|
||||
* @author Toru Nagashima <https://github.com/mysticatea>
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
const KEYS = require("./visitor-keys.json");
|
||||
|
||||
// Types.
|
||||
const NODE_TYPES = Object.freeze(Object.keys(KEYS));
|
||||
|
||||
// Freeze the keys.
|
||||
for (const type of NODE_TYPES) {
|
||||
Object.freeze(KEYS[type]);
|
||||
}
|
||||
Object.freeze(KEYS);
|
||||
|
||||
// List to ignore keys.
|
||||
const KEY_BLACKLIST = new Set([
|
||||
"parent",
|
||||
"leadingComments",
|
||||
"trailingComments"
|
||||
]);
|
||||
|
||||
/**
|
||||
* Check whether a given key should be used or not.
|
||||
* @param {string} key The key to check.
|
||||
* @returns {boolean} `true` if the key should be used.
|
||||
*/
|
||||
function filterKey(key) {
|
||||
return !KEY_BLACKLIST.has(key) && key[0] !== "_";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Public interfaces
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
module.exports = Object.freeze({
|
||||
|
||||
/**
|
||||
* Visitor keys.
|
||||
* @type {{ [type: string]: string[] | undefined }}
|
||||
*/
|
||||
KEYS,
|
||||
|
||||
/**
|
||||
* Get visitor keys of a given node.
|
||||
* @param {Object} node The AST node to get keys.
|
||||
* @returns {string[]} Visitor keys of the node.
|
||||
*/
|
||||
getKeys(node) {
|
||||
return Object.keys(node).filter(filterKey);
|
||||
},
|
||||
|
||||
// Disable valid-jsdoc rule because it reports syntax error on the type of @returns.
|
||||
// eslint-disable-next-line valid-jsdoc
|
||||
/**
|
||||
* Make the union set with `KEYS` and given keys.
|
||||
* @param {Object} additionalKeys The additional keys.
|
||||
* @returns {{ [type: string]: string[] | undefined }} The union set.
|
||||
*/
|
||||
unionWith(additionalKeys) {
|
||||
const retv = Object.assign({}, KEYS);
|
||||
|
||||
for (const type of Object.keys(additionalKeys)) {
|
||||
if (retv.hasOwnProperty(type)) {
|
||||
const keys = new Set(additionalKeys[type]);
|
||||
|
||||
for (const key of retv[type]) {
|
||||
keys.add(key);
|
||||
}
|
||||
|
||||
retv[type] = Object.freeze(Array.from(keys));
|
||||
} else {
|
||||
retv[type] = Object.freeze(Array.from(additionalKeys[type]));
|
||||
}
|
||||
}
|
||||
|
||||
return Object.freeze(retv);
|
||||
}
|
||||
});
|
284
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json
generated
vendored
Normal file
284
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json
generated
vendored
Normal file
|
@ -0,0 +1,284 @@
|
|||
{
|
||||
"AssignmentExpression": [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"AssignmentPattern": [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"ArrayExpression": [
|
||||
"elements"
|
||||
],
|
||||
"ArrayPattern": [
|
||||
"elements"
|
||||
],
|
||||
"ArrowFunctionExpression": [
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
"AwaitExpression": [
|
||||
"argument"
|
||||
],
|
||||
"BlockStatement": [
|
||||
"body"
|
||||
],
|
||||
"BinaryExpression": [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"BreakStatement": [
|
||||
"label"
|
||||
],
|
||||
"CallExpression": [
|
||||
"callee",
|
||||
"arguments"
|
||||
],
|
||||
"CatchClause": [
|
||||
"param",
|
||||
"body"
|
||||
],
|
||||
"ChainExpression": [
|
||||
"expression"
|
||||
],
|
||||
"ClassBody": [
|
||||
"body"
|
||||
],
|
||||
"ClassDeclaration": [
|
||||
"id",
|
||||
"superClass",
|
||||
"body"
|
||||
],
|
||||
"ClassExpression": [
|
||||
"id",
|
||||
"superClass",
|
||||
"body"
|
||||
],
|
||||
"ConditionalExpression": [
|
||||
"test",
|
||||
"consequent",
|
||||
"alternate"
|
||||
],
|
||||
"ContinueStatement": [
|
||||
"label"
|
||||
],
|
||||
"DebuggerStatement": [],
|
||||
"DoWhileStatement": [
|
||||
"body",
|
||||
"test"
|
||||
],
|
||||
"EmptyStatement": [],
|
||||
"ExportAllDeclaration": [
|
||||
"exported",
|
||||
"source"
|
||||
],
|
||||
"ExportDefaultDeclaration": [
|
||||
"declaration"
|
||||
],
|
||||
"ExportNamedDeclaration": [
|
||||
"declaration",
|
||||
"specifiers",
|
||||
"source"
|
||||
],
|
||||
"ExportSpecifier": [
|
||||
"exported",
|
||||
"local"
|
||||
],
|
||||
"ExpressionStatement": [
|
||||
"expression"
|
||||
],
|
||||
"ExperimentalRestProperty": [
|
||||
"argument"
|
||||
],
|
||||
"ExperimentalSpreadProperty": [
|
||||
"argument"
|
||||
],
|
||||
"ForStatement": [
|
||||
"init",
|
||||
"test",
|
||||
"update",
|
||||
"body"
|
||||
],
|
||||
"ForInStatement": [
|
||||
"left",
|
||||
"right",
|
||||
"body"
|
||||
],
|
||||
"ForOfStatement": [
|
||||
"left",
|
||||
"right",
|
||||
"body"
|
||||
],
|
||||
"FunctionDeclaration": [
|
||||
"id",
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
"FunctionExpression": [
|
||||
"id",
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
"Identifier": [],
|
||||
"IfStatement": [
|
||||
"test",
|
||||
"consequent",
|
||||
"alternate"
|
||||
],
|
||||
"ImportDeclaration": [
|
||||
"specifiers",
|
||||
"source"
|
||||
],
|
||||
"ImportDefaultSpecifier": [
|
||||
"local"
|
||||
],
|
||||
"ImportExpression": [
|
||||
"source"
|
||||
],
|
||||
"ImportNamespaceSpecifier": [
|
||||
"local"
|
||||
],
|
||||
"ImportSpecifier": [
|
||||
"imported",
|
||||
"local"
|
||||
],
|
||||
"JSXAttribute": [
|
||||
"name",
|
||||
"value"
|
||||
],
|
||||
"JSXClosingElement": [
|
||||
"name"
|
||||
],
|
||||
"JSXElement": [
|
||||
"openingElement",
|
||||
"children",
|
||||
"closingElement"
|
||||
],
|
||||
"JSXEmptyExpression": [],
|
||||
"JSXExpressionContainer": [
|
||||
"expression"
|
||||
],
|
||||
"JSXIdentifier": [],
|
||||
"JSXMemberExpression": [
|
||||
"object",
|
||||
"property"
|
||||
],
|
||||
"JSXNamespacedName": [
|
||||
"namespace",
|
||||
"name"
|
||||
],
|
||||
"JSXOpeningElement": [
|
||||
"name",
|
||||
"attributes"
|
||||
],
|
||||
"JSXSpreadAttribute": [
|
||||
"argument"
|
||||
],
|
||||
"JSXText": [],
|
||||
"JSXFragment": [
|
||||
"openingFragment",
|
||||
"children",
|
||||
"closingFragment"
|
||||
],
|
||||
"Literal": [],
|
||||
"LabeledStatement": [
|
||||
"label",
|
||||
"body"
|
||||
],
|
||||
"LogicalExpression": [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"MemberExpression": [
|
||||
"object",
|
||||
"property"
|
||||
],
|
||||
"MetaProperty": [
|
||||
"meta",
|
||||
"property"
|
||||
],
|
||||
"MethodDefinition": [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
"NewExpression": [
|
||||
"callee",
|
||||
"arguments"
|
||||
],
|
||||
"ObjectExpression": [
|
||||
"properties"
|
||||
],
|
||||
"ObjectPattern": [
|
||||
"properties"
|
||||
],
|
||||
"Program": [
|
||||
"body"
|
||||
],
|
||||
"Property": [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
"RestElement": [
|
||||
"argument"
|
||||
],
|
||||
"ReturnStatement": [
|
||||
"argument"
|
||||
],
|
||||
"SequenceExpression": [
|
||||
"expressions"
|
||||
],
|
||||
"SpreadElement": [
|
||||
"argument"
|
||||
],
|
||||
"Super": [],
|
||||
"SwitchStatement": [
|
||||
"discriminant",
|
||||
"cases"
|
||||
],
|
||||
"SwitchCase": [
|
||||
"test",
|
||||
"consequent"
|
||||
],
|
||||
"TaggedTemplateExpression": [
|
||||
"tag",
|
||||
"quasi"
|
||||
],
|
||||
"TemplateElement": [],
|
||||
"TemplateLiteral": [
|
||||
"quasis",
|
||||
"expressions"
|
||||
],
|
||||
"ThisExpression": [],
|
||||
"ThrowStatement": [
|
||||
"argument"
|
||||
],
|
||||
"TryStatement": [
|
||||
"block",
|
||||
"handler",
|
||||
"finalizer"
|
||||
],
|
||||
"UnaryExpression": [
|
||||
"argument"
|
||||
],
|
||||
"UpdateExpression": [
|
||||
"argument"
|
||||
],
|
||||
"VariableDeclaration": [
|
||||
"declarations"
|
||||
],
|
||||
"VariableDeclarator": [
|
||||
"id",
|
||||
"init"
|
||||
],
|
||||
"WhileStatement": [
|
||||
"test",
|
||||
"body"
|
||||
],
|
||||
"WithStatement": [
|
||||
"object",
|
||||
"body"
|
||||
],
|
||||
"YieldExpression": [
|
||||
"argument"
|
||||
]
|
||||
}
|
40
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json
generated
vendored
Normal file
40
web/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "eslint-visitor-keys",
|
||||
"version": "1.3.0",
|
||||
"description": "Constants and utilities about visitor keys to traverse AST.",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"eslint": "^4.7.2",
|
||||
"eslint-config-eslint": "^4.0.0",
|
||||
"eslint-release": "^1.0.0",
|
||||
"mocha": "^3.5.3",
|
||||
"nyc": "^11.2.1",
|
||||
"opener": "^1.4.3"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint lib tests/lib",
|
||||
"pretest": "npm run -s lint",
|
||||
"test": "nyc mocha tests/lib",
|
||||
"coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
|
||||
"generate-release": "eslint-generate-release",
|
||||
"generate-alpharelease": "eslint-generate-prerelease alpha",
|
||||
"generate-betarelease": "eslint-generate-prerelease beta",
|
||||
"generate-rcrelease": "eslint-generate-prerelease rc",
|
||||
"publish-release": "eslint-publish-release"
|
||||
},
|
||||
"repository": "eslint/eslint-visitor-keys",
|
||||
"keywords": [],
|
||||
"author": "Toru Nagashima (https://github.com/mysticatea)",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/eslint/eslint-visitor-keys/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eslint/eslint-visitor-keys#readme"
|
||||
}
|
62
web/node_modules/babel-eslint/package.json
generated
vendored
Normal file
62
web/node_modules/babel-eslint/package.json
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"name": "babel-eslint",
|
||||
"version": "10.1.0",
|
||||
"description": "Custom parser for ESLint",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel-eslint.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"@babel/parser": "^7.7.0",
|
||||
"@babel/traverse": "^7.7.0",
|
||||
"@babel/types": "^7.7.0",
|
||||
"eslint-visitor-keys": "^1.0.0",
|
||||
"resolve": "^1.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run lint && npm run test-only",
|
||||
"test-only": "mocha && mocha --require test/fixtures/preprocess-to-patch.js",
|
||||
"lint": "eslint lib test",
|
||||
"fix": "eslint lib test --fix",
|
||||
"precommit": "lint-staged",
|
||||
"preversion": "npm test",
|
||||
"changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'"
|
||||
},
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel-eslint/issues"
|
||||
},
|
||||
"homepage": "https://github.com/babel/babel-eslint",
|
||||
"peerDependencies": {
|
||||
"eslint": ">= 4.12.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^8.2.6",
|
||||
"dedent": "^0.7.0",
|
||||
"eslint": "^5.6.0",
|
||||
"eslint-config-babel": "^7.0.1",
|
||||
"eslint-plugin-flowtype": "^2.30.3",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-prettier": "^2.1.2",
|
||||
"espree": "^3.5.2",
|
||||
"husky": "^1.0.0-rc.13",
|
||||
"lint-staged": "^7.2.2",
|
||||
"mocha": "^5.0.1",
|
||||
"prettier": "^1.4.4"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"eslint --format=codeframe --fix",
|
||||
"git add"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue