Skip to content

Commit

Permalink
update eslint-config, fixes, add commands (babel#4721)
Browse files Browse the repository at this point in the history
* update eslint-config, fixes, add commands

* switch plugin
  • Loading branch information
hzoo authored and panagosg7 committed Jan 17, 2017
1 parent e59ded9 commit 5bb1f8c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -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
Expand All @@ -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*
Expand Down
8 changes: 5 additions & 3 deletions package.json
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-cli/src/babel-doctor/rules/deduped.js
@@ -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 = {};
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-cli/src/babel-doctor/rules/has-config.js
@@ -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);

Expand Down
Expand Up @@ -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);
Expand All @@ -37,7 +37,7 @@ export default function buildConfigChain(opts: Object = {}, log?: Logger) {
alias: "base",
dirname: filename && path.dirname(filename)
});

return builder.configs;
}

Expand Down
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-es2015/src/index.js
Expand Up @@ -52,7 +52,7 @@ function preset(context, opts = {}) {

// be DRY
const optsLoose = { loose };

return {
plugins: [
[transformES2015TemplateLiterals, { loose, spec }],
Expand Down

0 comments on commit 5bb1f8c

Please sign in to comment.