update eslint-config, fixes, add commands (#4721)

* update eslint-config, fixes, add commands

* switch plugin
This commit is contained in:
Henry Zhu 2016-10-13 15:37:07 -04:00 committed by Daniel Tschinder
parent 09f135f9a1
commit 71790aace0
7 changed files with 15 additions and 10 deletions

View File

@ -2,7 +2,7 @@ MAKEFLAGS = -j1
export NODE_ENV = test export NODE_ENV = test
.PHONY: build build-dist watch lint clean test-clean test-only test test-cov test-ci publish bootstrap .PHONY: build build-dist watch lint fix clean test-clean test-only test test-cov test-ci publish bootstrap
build: clean build: clean
./node_modules/.bin/gulp build ./node_modules/.bin/gulp build
@ -20,6 +20,9 @@ watch: clean
lint: lint:
./node_modules/.bin/eslint packages/*/src ./node_modules/.bin/eslint packages/*/src
fix:
./node_modules/.bin/eslint packages/*/src --fix
clean: test-clean clean: test-clean
rm -rf packages/*/lib rm -rf packages/*/lib
rm -rf packages/babel-polyfill/browser* rm -rf packages/babel-polyfill/browser*

View File

@ -3,7 +3,9 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "make test", "test": "make test",
"build": "make build" "build": "make build",
"lint": "make lint",
"fix": "make fix"
}, },
"devDependencies": { "devDependencies": {
"async": "^1.5.0", "async": "^1.5.0",
@ -23,9 +25,9 @@
"codecov.io": "^0.1.6", "codecov.io": "^0.1.6",
"derequire": "^2.0.2", "derequire": "^2.0.2",
"eslint": "^3.7.1", "eslint": "^3.7.1",
"eslint-config-babel": "^1.0.1", "eslint-config-babel": "^2.0.1",
"eslint-plugin-babel": "^3.3.0", "eslint-plugin-babel": "^3.3.0",
"eslint-plugin-flow-vars": "^0.5.0", "eslint-plugin-flowtype": "^2.20.0",
"flow-bin": "^0.33.0", "flow-bin": "^0.33.0",
"gulp": "^3.9.0", "gulp": "^3.9.0",
"gulp-babel": "^6.0.0", "gulp-babel": "^6.0.0",

View File

@ -1,4 +1,4 @@
export default async function (packages) { // eslint-disable-line require-yield export default async function (packages) {
let foundDeps = {}; let foundDeps = {};
let foundDuplicated = false; let foundDuplicated = false;
let duplicatedPackages = {}; let duplicatedPackages = {};

View File

@ -1,7 +1,7 @@
import path from "path"; import path from "path";
import fs from "fs"; import fs from "fs";
export default async function () { // eslint-disable-line require-yield export default async function () {
let cwd = process.cwd(); let cwd = process.cwd();
let parts = cwd.split(path.sep); let parts = cwd.split(path.sep);

View File

@ -26,7 +26,7 @@ function exists(filename) {
export default function buildConfigChain(opts: Object = {}, log?: Logger) { export default function buildConfigChain(opts: Object = {}, log?: Logger) {
let filename = opts.filename; let filename = opts.filename;
let builder = new ConfigChainBuilder(log); let builder = new ConfigChainBuilder(log);
// resolve all .babelrc files // resolve all .babelrc files
if (opts.babelrc !== false) { if (opts.babelrc !== false) {
builder.findConfigs(filename); builder.findConfigs(filename);
@ -37,7 +37,7 @@ export default function buildConfigChain(opts: Object = {}, log?: Logger) {
alias: "base", alias: "base",
dirname: filename && path.dirname(filename) dirname: filename && path.dirname(filename)
}); });
return builder.configs; return builder.configs;
} }

View File

@ -174,7 +174,7 @@ export default function ({ types: t }) {
beforeBody.push(buildExportCall(name, node.id)); beforeBody.push(buildExportCall(name, node.id));
removedPaths.push(path); removedPaths.push(path);
} else { } else {
bindingIdentifiers = { [name]: node.id }; bindingIdentifiers = { [name]: node.id };
} }
} else { } else {
bindingIdentifiers = declar.getBindingIdentifiers(); bindingIdentifiers = declar.getBindingIdentifiers();

View File

@ -52,7 +52,7 @@ function preset(context, opts = {}) {
// be DRY // be DRY
const optsLoose = { loose }; const optsLoose = { loose };
return { return {
plugins: [ plugins: [
[transformES2015TemplateLiterals, { loose, spec }], [transformES2015TemplateLiterals, { loose, spec }],