diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:38:50 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:40:43 +0200 |
commit | 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 (patch) | |
tree | 6de9a1aebd150a23b7f8c273ec657a5d0a18fe3e /node_modules/@ava/babel-preset-transform-test-files | |
parent | 963b7a41feb29cc4be090a2446bdfe0c1f1bcd81 (diff) | |
download | wallet-core-7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027.tar.xz |
add linting (and some initial fixes)
Diffstat (limited to 'node_modules/@ava/babel-preset-transform-test-files')
5 files changed, 127 insertions, 0 deletions
diff --git a/node_modules/@ava/babel-preset-transform-test-files/espower-patterns.json b/node_modules/@ava/babel-preset-transform-test-files/espower-patterns.json new file mode 100644 index 000000000..832309a5f --- /dev/null +++ b/node_modules/@ava/babel-preset-transform-test-files/espower-patterns.json @@ -0,0 +1,8 @@ +[ + "t.truthy(value, [message])", + "t.falsy(value, [message])", + "t.true(value, [message])", + "t.false(value, [message])", + "t.regex(contents, regex, [message])", + "t.notRegex(contents, regex, [message])" +] diff --git a/node_modules/@ava/babel-preset-transform-test-files/index.js b/node_modules/@ava/babel-preset-transform-test-files/index.js new file mode 100644 index 000000000..7af76c7e1 --- /dev/null +++ b/node_modules/@ava/babel-preset-transform-test-files/index.js @@ -0,0 +1,17 @@ +'use strict'; +const ESPOWER_PATTERNS = require('./espower-patterns.json'); + +module.exports = (context, options) => { + const plugins = []; + + if (!options || options.powerAssert !== false) { + plugins.push(require('babel-plugin-espower/create')(context, { + embedAst: true, + patterns: ESPOWER_PATTERNS + })); + } + + plugins.push(require('@ava/babel-plugin-throws-helper')); + + return {plugins}; +}; diff --git a/node_modules/@ava/babel-preset-transform-test-files/license b/node_modules/@ava/babel-preset-transform-test-files/license new file mode 100644 index 000000000..060edd7f2 --- /dev/null +++ b/node_modules/@ava/babel-preset-transform-test-files/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Mark Wubben <mark@novemberborn.net> (novemberborn.net) + +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. diff --git a/node_modules/@ava/babel-preset-transform-test-files/package.json b/node_modules/@ava/babel-preset-transform-test-files/package.json new file mode 100644 index 000000000..6ce914164 --- /dev/null +++ b/node_modules/@ava/babel-preset-transform-test-files/package.json @@ -0,0 +1,47 @@ +{ + "name": "@ava/babel-preset-transform-test-files", + "version": "3.0.0", + "description": "Babel preset for use with AVA test files", + "license": "MIT", + "repository": "avajs/babel-preset-transform-test-files", + "author": "Mark Wubben (https://novemberborn.net)", + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=4" + }, + "scripts": { + "test": "xo && ava", + "posttest": "xo", + "coverage": "nyc npm test" + }, + "files": [ + "index.js", + "espower-patterns.json", + "package-hash.js" + ], + "keywords": [ + "ava", + "babel-preset" + ], + "dependencies": { + "@ava/babel-plugin-throws-helper": "^2.0.0", + "babel-plugin-espower": "^2.3.2" + }, + "devDependencies": { + "ava": "^0.18.2", + "babel-core": "^6.21.0", + "coveralls": "^2.11.15", + "empower-core": "^0.6.1", + "nyc": "^10.1.2", + "xo": "^0.18.1" + }, + "nyc": { + "reporter": [ + "html", + "lcov", + "text" + ] + } +} diff --git a/node_modules/@ava/babel-preset-transform-test-files/readme.md b/node_modules/@ava/babel-preset-transform-test-files/readme.md new file mode 100644 index 000000000..eba6dc701 --- /dev/null +++ b/node_modules/@ava/babel-preset-transform-test-files/readme.md @@ -0,0 +1,34 @@ +# @ava/babel-preset-transform-test-files [![Build Status](https://travis-ci.org/avajs/babel-preset-transform-test-files.svg?branch=master)](https://travis-ci.org/avajs/babel-preset-transform-test-files) + +> [Babel] preset for use with [AVA] test files + +Currently contains: + +- [`babel-plugin-espower`](https://github.com/power-assert-js/babel-plugin-espower) and the patterns that should be enhanced +- [`@ava/babel-plugin-throws-helper`](https://github.com/avajs/babel-plugin-throws-helper/) + + +## Install + +```console +$ npm install --save @ava/babel-preset-transform-test-files +``` + + +## Usage + +Add `@ava/transform-test-files` to your [Babel] presets. You can disable `babel-plugin-espower` by setting the `powerAssert` option to `false`: + +```json +{ + "presets": [ + ["@ava/transform-test-files", {"powerAsssert": false}] + ] +} +``` + +Require `@ava/babel-preset-transform-test-files/package-hash` to get a combined hash for the installed version of the preset, as well as the plugins used. + + +[AVA]: https://ava.li +[Babel]: https://babeljs.io |