Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/es6 first tests #1152

Merged
merged 10 commits into from Nov 27, 2017
22 changes: 22 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
"extends": "airbnb-base",
"plugins": [],
"rules": {
"curly": [
"error",
"all"
],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": false
}
],
"quotes": [
"error",
"single",
Expand All @@ -16,7 +27,17 @@
"allowTemplateLiterals": true
}
],
"no-plusplus": "off",
"no-underscore-dangle": "off",
"newline-before-return": "error",
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "all",
"argsIgnorePattern": "^_"
}
],
"no-multiple-empty-lines": [
"error",
{
Expand Down Expand Up @@ -52,6 +73,7 @@
{
"devDependencies": [
"gulpfile.babel.js",
"test/**/*.js",
"gulp/**/*.js"
]
}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ node_modules
.idea/
.npm/
/packages/**/lib/*
.vscode/
/.nyc_output
package-lock.json

3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ install:
- npm install
script:
- npm run build
- npm run test-coveralls
- npm run test
- npm run coverage
5 changes: 3 additions & 2 deletions gulp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default {
lintableFiles: [
scripts,
'./*.js',
'./gulp/**/*.js',
'./test/**/*.js'
'./gulp/**/*.js'
// Disable linting tests until we've finished converting them to ES6
// './test/**/*.js'
]
};
4 changes: 2 additions & 2 deletions gulp/transpile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ function transpile() {
dest: config.PACKAGES_DIR,
map: swapSrcWithLib
}))
.pipe(through.obj((file, enc, callback) => {
.pipe(through.obj((file, _enc, callback) => {
gutil.log('Compiling', `'${chalk.cyan(file.relative)}'...`);
callback(null, file);
}))
.pipe(babel())
.pipe(through.obj((file, enc, callback) => {
.pipe(through.obj((file, _enc, callback) => {
// Passing 'file.relative' for consistency with newer() above
// eslint-disable-next-line no-param-reassign
file.path = path.resolve(file.base, swapSrcWithLib(file.relative));
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"watch": "gulp watch",
"docs": "cd docs; make html;",
"lint": "gulp lint",
"test": "mocha; gulp lint",
"test-coveralls": "istanbul cover _mocha -- -R spec && cat coverage/lcov.info | coveralls --verbose"
"test": "nyc --reporter=html --reporter=text mocha",
"coverage": "nyc report --reporter=text-lcov | coveralls --verbose"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -91,10 +91,10 @@
"gulp-plumber": "^1.1.0",
"gulp-replace": "^0.6.1",
"gulp-util": "^3.0.8",
"istanbul": "^0.4.5",
"lerna": "^2.4.0",
"lodash": "^4.17.4",
"mocha": "^4.0.1",
"nyc": "^11.2.1",
"rollup": "^0.50.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.4",
Expand Down
20 changes: 0 additions & 20 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
{
"root": true,
"env": {
"node": true,
"mocha": true
},
"rules": {
"no-bitwise": 2,
"camelcase": 2,
"eqeqeq": 2,
"no-extend-native": 2,
"block-scoped-var": 0,
"complexity": [
2,
10
],
"max-depth": [
2,
4
],
"no-new": 0,
"no-unused-vars": 0,
"no-undef": 0
}
}
Loading