From 5de0277871438ea60eb5909e0a4f7a325a3bd4f3 Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Mon, 27 Feb 2017 15:05:28 +0000 Subject: [PATCH] chore: use babel-preset-env --- .babelrc | 19 ++++++++++----- package.json | 69 ++++++++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/.babelrc b/.babelrc index d43233e2..784c1564 100644 --- a/.babelrc +++ b/.babelrc @@ -1,9 +1,16 @@ { - "presets": [ - "es2015", - "stage-0" - ], - "plugins": [ - "add-module-exports" + "plugins": [ + "transform-object-rest-spread", + "add-module-exports" + ], + "presets": [ + [ + "env", + { + "targets": { + "node": 4 + } + } ] + ] } diff --git a/package.json b/package.json index f204e6de..9e613946 100644 --- a/package.json +++ b/package.json @@ -1,56 +1,55 @@ { - "name": "eslint-plugin-flowtype", - "description": "Flowtype linting rules for ESLint.", - "version": "2.30.0", - "main": "./dist/index.js", - "repository": { - "type": "git", - "url": "https://github.com/gajus/eslint-plugin-flowtype" - }, - "keywords": [ - "eslint", - "plugin", - "flowtype" - ], "author": { - "name": "Gajus Kuizinas", "email": "gajus@gajus.com", + "name": "Gajus Kuizinas", "url": "http://gajus.com" }, - "license": "BSD-3-Clause", - "peerDependencies": { - "eslint": ">=2.0.0" - }, "dependencies": { "lodash": "^4.15.0" }, - "scripts": { - "lint": "eslint ./src ./tests", - "test": "mocha --compilers js:babel-register ./tests/rules/index.js", - "build": "babel ./src --out-dir ./dist --copy-files", - "documentation-add-assertions": "babel-node ./bin/readmeAssertions", - "documentation": "gitdown ./.README/README.md --output-file ./README.md; npm run documentation-add-assertions", - "create-index": "create-index ./src --update-index", - "precommit": "npm run lint && npm run test && npm run format-json", - "format-json": "jsonlint --sort-keys --in-place --indent ' ' ./src/configs/recommended.json && echo '' >> ./src/configs/recommended.json" - }, + "description": "Flowtype linting rules for ESLint.", "devDependencies": { "babel-cli": "^6.14.0", "babel-eslint": "^6.1.2", "babel-plugin-add-module-exports": "^0.2.1", - "babel-preset-es2015": "^6.14.0", - "babel-preset-stage-0": "^6.5.0", + "babel-plugin-transform-object-rest-spread": "^6.23.0", + "babel-preset-env": "^1.1.10", "babel-register": "^6.14.0", "chai": "^3.5.0", - "create-index": "^0.1.3", "eslint": "^3.16.0", "eslint-config-canonical": "1.8.1", "gitdown": "^2.5.0", "husky": "^0.11.7", "jsonlint": "^1.6.2", "mocha": "^3.0.2", - "semantic-release": "^6.3.2", - "standard-version": "^2.4.0", - "travis-after-all": "^1.4.4" - } + "semantic-release": "^6.3.2" + }, + "engines": { + "node": ">6.0.0" + }, + "keywords": [ + "eslint", + "plugin", + "flowtype" + ], + "license": "BSD-3-Clause", + "main": "./dist/index.js", + "name": "eslint-plugin-flowtype", + "peerDependencies": { + "eslint": ">=2.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/gajus/eslint-plugin-flowtype" + }, + "scripts": { + "build": "babel ./src --out-dir ./dist --copy-files", + "documentation": "gitdown ./.README/README.md --output-file ./README.md; npm run documentation-add-assertions", + "documentation-add-assertions": "babel-node ./bin/readmeAssertions", + "format-json": "jsonlint --sort-keys --in-place --indent ' ' ./src/configs/recommended.json && echo '' >> ./src/configs/recommended.json", + "lint": "eslint ./src ./tests", + "precommit": "npm run lint && npm run test && npm run format-json", + "test": "mocha --compilers js:babel-register ./tests/rules/index.js" + }, + "version": "2.30.0" }