update eslint-config, fixes, add commands (#4721)
* update eslint-config, fixes, add commands * switch plugin
This commit is contained in:
parent
09f135f9a1
commit
71790aace0
5
Makefile
5
Makefile
@ -2,7 +2,7 @@ MAKEFLAGS = -j1
|
||||
|
||||
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
|
||||
./node_modules/.bin/gulp build
|
||||
@ -20,6 +20,9 @@ watch: clean
|
||||
lint:
|
||||
./node_modules/.bin/eslint packages/*/src
|
||||
|
||||
fix:
|
||||
./node_modules/.bin/eslint packages/*/src --fix
|
||||
|
||||
clean: test-clean
|
||||
rm -rf packages/*/lib
|
||||
rm -rf packages/babel-polyfill/browser*
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "make test",
|
||||
"build": "make build"
|
||||
"build": "make build",
|
||||
"lint": "make lint",
|
||||
"fix": "make fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"async": "^1.5.0",
|
||||
@ -23,9 +25,9 @@
|
||||
"codecov.io": "^0.1.6",
|
||||
"derequire": "^2.0.2",
|
||||
"eslint": "^3.7.1",
|
||||
"eslint-config-babel": "^1.0.1",
|
||||
"eslint-config-babel": "^2.0.1",
|
||||
"eslint-plugin-babel": "^3.3.0",
|
||||
"eslint-plugin-flow-vars": "^0.5.0",
|
||||
"eslint-plugin-flowtype": "^2.20.0",
|
||||
"flow-bin": "^0.33.0",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-babel": "^6.0.0",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export default async function (packages) { // eslint-disable-line require-yield
|
||||
export default async function (packages) {
|
||||
let foundDeps = {};
|
||||
let foundDuplicated = false;
|
||||
let duplicatedPackages = {};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
|
||||
export default async function () { // eslint-disable-line require-yield
|
||||
export default async function () {
|
||||
let cwd = process.cwd();
|
||||
let parts = cwd.split(path.sep);
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ function exists(filename) {
|
||||
export default function buildConfigChain(opts: Object = {}, log?: Logger) {
|
||||
let filename = opts.filename;
|
||||
let builder = new ConfigChainBuilder(log);
|
||||
|
||||
|
||||
// resolve all .babelrc files
|
||||
if (opts.babelrc !== false) {
|
||||
builder.findConfigs(filename);
|
||||
@ -37,7 +37,7 @@ export default function buildConfigChain(opts: Object = {}, log?: Logger) {
|
||||
alias: "base",
|
||||
dirname: filename && path.dirname(filename)
|
||||
});
|
||||
|
||||
|
||||
return builder.configs;
|
||||
}
|
||||
|
||||
|
||||
@ -174,7 +174,7 @@ export default function ({ types: t }) {
|
||||
beforeBody.push(buildExportCall(name, node.id));
|
||||
removedPaths.push(path);
|
||||
} else {
|
||||
bindingIdentifiers = { [name]: node.id };
|
||||
bindingIdentifiers = { [name]: node.id };
|
||||
}
|
||||
} else {
|
||||
bindingIdentifiers = declar.getBindingIdentifiers();
|
||||
|
||||
@ -52,7 +52,7 @@ function preset(context, opts = {}) {
|
||||
|
||||
// be DRY
|
||||
const optsLoose = { loose };
|
||||
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
[transformES2015TemplateLiterals, { loose, spec }],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user