-
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
f9d1b06
commit c7bbba9
Showing
6 changed files
with
9,315 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,57 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"plugins": [ | ||
], | ||
"extends": [ | ||
"eslint:recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-prototype-builtins": 0, | ||
"no-var": 1, | ||
"no-trailing-spaces": 1 | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": [ "*.spec.js" ], | ||
|
||
"env": { "mocha": true }, | ||
"plugins": [ | ||
"mocha", | ||
"chai-expect" | ||
], | ||
"rules": { | ||
"mocha/no-sibling-hooks": "off", | ||
"mocha/max-top-level-suites": "off" | ||
}, | ||
"extends": [ | ||
"plugin:mocha/recommended", | ||
"plugin:chai-expect/recommended" | ||
], | ||
"globals": { | ||
"describe": "readonly", | ||
"context": "readonly", | ||
"before": "readonly", | ||
"beforeEach": "readonly", | ||
"after": "readonly", | ||
"afterEach": "readonly", | ||
"it": "readonly", | ||
"expect": "readonly" | ||
} | ||
}, | ||
{ | ||
"files": [ "*.peg" ], | ||
|
||
"plugins": [ "@peggyjs" ], | ||
"extends": ["plugin:@peggyjs/recommended"] | ||
} | ||
|
||
] | ||
} |
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,6 @@ | ||
module.exports = { | ||
extension: '.spec.js', | ||
loader: 'esmock', | ||
colors: true, | ||
require: 'mocha.conf.js' | ||
} |
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,24 @@ | ||
import gulp from 'gulp'; | ||
import tap from 'gulp-tap'; | ||
import rename from 'gulp-rename'; | ||
import peggy from 'peggy'; | ||
|
||
const buildParser = function() { | ||
return gulp.src('selector.peg') | ||
.pipe(tap(function(file) { | ||
file.contents = new Buffer(peggy.generate(file.contents.toString('utf-8'), { | ||
output: 'source', | ||
format: 'es' | ||
})); | ||
})) | ||
.pipe(rename(function(path) { | ||
path.extname = '.js'; | ||
})) | ||
.pipe(gulp.dest('.')); | ||
} | ||
buildParser.displayName = 'build-parser'; | ||
|
||
gulp.task(buildParser); | ||
gulp.task(function watch() { | ||
gulp.watch(['*.peg'], { usePolling: process.env.GULP_WATCH_POLLING }, buildParser); | ||
}); |
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,5 @@ | ||
import chai from 'chai'; | ||
import sinonChai from 'sinon-chai'; | ||
|
||
global.expect = chai.expect; | ||
chai.use(sinonChai); |
Oops, something went wrong.