From d385b3b29fde491a3ac8a16e6a00000665e0925f Mon Sep 17 00:00:00 2001 From: Joseph Junker Date: Wed, 19 Jul 2017 14:22:55 -0700 Subject: [PATCH] removes non-react flow config --- README.md | 2 - package.json | 10 ++-- packages/eslint-config-godaddy-flow/.eslintrc | 3 - packages/eslint-config-godaddy-flow/README.md | 55 ------------------- .../bin/eslint-godaddy-flow | 4 -- .../eslint-config-godaddy-flow/extends.js | 17 ------ packages/eslint-config-godaddy-flow/index.js | 23 -------- .../eslint-config-godaddy-flow/package.json | 48 ---------------- 8 files changed, 4 insertions(+), 158 deletions(-) delete mode 100644 packages/eslint-config-godaddy-flow/.eslintrc delete mode 100644 packages/eslint-config-godaddy-flow/README.md delete mode 100755 packages/eslint-config-godaddy-flow/bin/eslint-godaddy-flow delete mode 100644 packages/eslint-config-godaddy-flow/extends.js delete mode 100644 packages/eslint-config-godaddy-flow/index.js delete mode 100644 packages/eslint-config-godaddy-flow/package.json diff --git a/README.md b/README.md index 41b89b9..c95f5b2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ Official GoDaddy JavaScript styleguide. It includes `eslint` packages for three - [`eslint-config-godaddy-react`]: Configuration for ES6 React JavaScript applications - [`eslint-config-godaddy-es5`]: Configuration for React _and_ non-React ES5 JavaScript applications - [`eslint-config-godaddy-react-flow`]: Configuration for ES6 React JavaScript applications using Flow -- [`eslint-config-godaddy-flow`]: Configuration for _non-React_, ES6 JavaScript applications using Flow There are many useful features: @@ -141,4 +140,3 @@ No problem. Reach out to us by [opening an issue] [`eslint-config-godaddy-react`]: /packages/eslint-config-godaddy-react [`eslint-config-godaddy-es5`]: /packages/eslint-config-godaddy-es5 [`eslint-config-godaddy-react-flow`]: /packages/eslint-config-godaddy-react-flow -[`eslint-config-godaddy-flow`]: /packages/eslint-config-godaddy-flow diff --git a/package.json b/package.json index 2a760ef..8c915fc 100644 --- a/package.json +++ b/package.json @@ -4,18 +4,16 @@ "description": "The approach to JavaScript at GoDaddy. We think it's pretty decent.", "scripts": { "lint": "eslint -c .eslintrc.js packages/**/*.js", - "postinstall": "run-p install:config install:config:es5 install:config:react install:config:react-flow install:config:flow", + "postinstall": "run-p install:config install:config:es5 install:config:react install:config:react-flow", "install:config": "cd packages/eslint-config-godaddy && npm install", "install:config:es5": "cd packages/eslint-config-godaddy-es5 && npm install", "install:config:react": "cd packages/eslint-config-godaddy-react && npm install", "install:config:react-flow": "cd packages/eslint-config-godaddy-react-flow && npm install", - "install:config:flow": "cd packages/eslint-config-godaddy-flow && npm install", - "test": "run-p lint test:config test:config:es5 test:config:react test:config:react-flow test:config:flow", + "test": "run-p lint test:config test:config:es5 test:config:react test:config:react-flow", "test:config": "cd packages/eslint-config-godaddy && npm test", "test:config:es5": "cd packages/eslint-config-godaddy-es5 && npm test", "test:config:react": "cd packages/eslint-config-godaddy-react && npm test", - "test:config:react-flow": "cd packages/eslint-config-godaddy-react-flow && npm test", - "test:config:flow": "cd packages/eslint-config-godaddy-flow && npm test" + "test:config:react-flow": "cd packages/eslint-config-godaddy-react-flow && npm test" }, "repository": { "type": "git", @@ -51,7 +49,7 @@ "eslint-plugin-json": "^1.2.0", "eslint-plugin-mocha": "^4.8.0", "eslint-plugin-react": "^6.9.0", - "eslint-plugin-flowtype": "^6.9.0" + "eslint-plugin-flowtype": "^2.30.4" }, "dependencies": { "npm-run-all": "^4.0.2" diff --git a/packages/eslint-config-godaddy-flow/.eslintrc b/packages/eslint-config-godaddy-flow/.eslintrc deleted file mode 100644 index d811f40..0000000 --- a/packages/eslint-config-godaddy-flow/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./index.js" -} diff --git a/packages/eslint-config-godaddy-flow/README.md b/packages/eslint-config-godaddy-flow/README.md deleted file mode 100644 index 692be87..0000000 --- a/packages/eslint-config-godaddy-flow/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# eslint-config-godaddy-flow - -Configuration for _non-React_, ES6 JavaScript applications officially used at GoDaddy. There are many useful features: - -- **Standard. No configuration.** – Stop worrying about style and focus on your work. -- **Modern** – Uses modern linting tools like `eslint`. -- **Auto-fix** – Auto-fix is enabled by-default through in `eslint`. Many rules will fix themselves! - -This styleguide is used by dozens of product teams at GoDaddy. Have a question or comment? [Open an issue!](https://github.com/godaddy/javascript/issues/new) - -## Installation - -``` sh -# Default with ES6 -npm i eslint-config-godaddy-flow --save-dev -``` - -## Usage - -There are two ways to use this styleguide depending on your own tooling preference: directly using pre-included binaries or running `eslint` yourself with a custom `.eslintrc` config. - -##### 1. Use the pre-included binaries. - -These use _exactly_ the configuration defined in this package (`eslint-config-godaddy-flow`) **with auto-fix enabled automatically.** - -``` js -{ - "scripts": { - "lint": eslint-godaddy-flow files/ you/ want-to/ lint/" - } -} -``` - -##### 2. Define your local `.eslintrc` and run `eslint` yourself: - -``` js -module.exports = { - extends: 'godaddy-flow', - rules: { - // - // Put any rules you wish to override here. - // - } -} -``` - -The `--fix` option in `eslint` is [**only** available as a CLI option](https://github.com/eslint/eslint/issues/8041). Auto-fix will *NOT be enabled* unless you run `eslint --fix` in your `package.json`. - -``` js -{ - "scripts": { - "lint": "eslint --fix files/ you/ want-to/ lint/" - } -} -``` diff --git a/packages/eslint-config-godaddy-flow/bin/eslint-godaddy-flow b/packages/eslint-config-godaddy-flow/bin/eslint-godaddy-flow deleted file mode 100755 index 4a88752..0000000 --- a/packages/eslint-config-godaddy-flow/bin/eslint-godaddy-flow +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -require('eslint-config-godaddy/cli')( - require('path').join(__dirname, '..', 'index') -); diff --git a/packages/eslint-config-godaddy-flow/extends.js b/packages/eslint-config-godaddy-flow/extends.js deleted file mode 100644 index d24cbcb..0000000 --- a/packages/eslint-config-godaddy-flow/extends.js +++ /dev/null @@ -1,17 +0,0 @@ -const path = require('path'); - -/** - * Helper function that attempts to resolve the specify named `config` - * locally before attempting to resolve it from `node_modules`. This - * tricks TravisCI into resolving correctly. - * - * @param {string} config Named `eslint-config-*` module - * @returns {string} Full path resolved locally or from `node_modules`. - */ -module.exports = function resolveLocal(config) { - try { - return require.resolve(path.resolve(__dirname, '..', config)); - } catch (ex) { - return require.resolve(config); - } -}; diff --git a/packages/eslint-config-godaddy-flow/index.js b/packages/eslint-config-godaddy-flow/index.js deleted file mode 100644 index d62d41b..0000000 --- a/packages/eslint-config-godaddy-flow/index.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - extends: [ - require('./extends')('eslint-config-godaddy') - ], - plugins: ['flowtype', 'babel'], - parser: 'babel-eslint', - parserOptions: { - ecmaFeatures: { - experimentalObjectRestSpread: true - } - }, - rules: { - 'flowtype/define-flow-type': 2, - 'flowtype/space-after-type-colon': [ 2, 'always' ], - 'flowtype/type-id-match': [ 2, '^([A-Z][A-Za-z0-9]*)$' ], - 'flowtype/use-flow-type': 2 - }, - 'settings': { - 'flowtype': { - 'onlyFilesWithFlowAnnotation': true - } - } -}; diff --git a/packages/eslint-config-godaddy-flow/package.json b/packages/eslint-config-godaddy-flow/package.json deleted file mode 100644 index f08f3f3..0000000 --- a/packages/eslint-config-godaddy-flow/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "eslint-config-godaddy-flow", - "version": "1.1.0", - "description": "ESLint config for consistent style in ES6 projects using Flow at GoDaddy.", - "scripts": { - "lint": "eslint .", - "pretest": "npm run --silent lint", - "test": "echo ok", - "unused": "eslint-find-rules --unused ./index.js || echo ''" - }, - "repository": { - "type": "git", - "url": "git@github.com:godaddy/javascript.git" - }, - "keywords": [ - "godaddy", - "javascript", - "styleguide", - "style-guide", - "eslint", - "es6", - "flow" - ], - "bin": { - "eslint-godaddy-flow": "bin/eslint-godaddy-flow" - }, - "dependencies": { - "eslint-config-godaddy": "^1.0.0" - }, - "peerDependencies": { - "eslint": "^3.15.0", - "babel-eslint": "^7.2.1", - "eslint-plugin-babel": "^4.0.1", - "eslint-plugin-flowtype": "^2.30.4", - "eslint-plugin-json": "^1.2.0", - "eslint-plugin-mocha": "^4.8.0" - }, - "license": "MIT", - "devDependencies": { - "eslint": "^3.15.0", - "babel-eslint": "^7.2.1", - "eslint-plugin-babel": "^4.0.1", - "eslint-plugin-flowtype": "^2.30.4", - "eslint-find-rules": "^1.14.3", - "eslint-plugin-json": "^1.2.0", - "eslint-plugin-mocha": "^4.8.0" - } -}