-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0863404
commit 40ab92a
Showing
7 changed files
with
191,992 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2019-2020 Luca Cappa | ||
// Released under the term specified in file LICENSE.txt | ||
// SPDX short identifier: MIT | ||
|
||
module.exports = { | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
project: './tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
}, | ||
rules: { | ||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs | ||
// e.g. "@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-floating-promises": ["error"], | ||
"@typescript-eslint/no-explicit-any": ["off"], | ||
"@typescript-eslint/no-unused-vars": ["off"] | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if (!yy.ast) { | ||
yy.ast = _ast; | ||
_ast.initialize(); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
var _ast = { | ||
|
||
initialize: function() { | ||
this._nodes = []; | ||
this._node = {}; | ||
this._stash = []; | ||
}, | ||
|
||
set: function(props) { | ||
for (var k in props) this._node[k] = props[k]; | ||
return this._node; | ||
}, | ||
|
||
node: function(obj) { | ||
if (arguments.length) this._node = obj; | ||
return this._node; | ||
}, | ||
|
||
push: function() { | ||
this._nodes.push(this._node); | ||
this._node = {}; | ||
}, | ||
|
||
unshift: function() { | ||
this._nodes.unshift(this._node); | ||
this._node = {}; | ||
}, | ||
|
||
yield: function() { | ||
var _nodes = this._nodes; | ||
this.initialize(); | ||
return _nodes; | ||
} | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
clearMocks: true, | ||
restoreMocks: true, | ||
moduleFileExtensions: ['js', 'ts'], | ||
testEnvironment: 'node', | ||
testMatch: ['**/*.test.ts'], | ||
testRunner: 'jest-circus/runner', | ||
transform: { | ||
'^.+\\.ts$': 'ts-jest' | ||
}, | ||
verbose: true, | ||
silent: false, | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: './tsconfig.json', | ||
}, | ||
}, | ||
collectCoverage: true, | ||
coveragePathIgnorePatterns: [ | ||
"<rootDir>/build/", "<rootDir>/node_modules/", "<rootDir>/__tests__", "__tests__" | ||
], | ||
collectCoverageFrom: [ | ||
"src/*.ts", | ||
"!**/node_modules/**", | ||
"!**/build/**", | ||
"!**/dist/**" | ||
] | ||
} |