diff --git a/eslint/README.md b/eslint/README.md index 246966f..8504a04 100644 --- a/eslint/README.md +++ b/eslint/README.md @@ -4,15 +4,15 @@ GrowFlow's shared [ESLint](https://eslint.org/) configuration to apply styling a ## Usage -Install as dev dependency: +Install as a dev dependency. ESLint plugins used by this config must also be installed within your project. This is a [current limitation of ESLint](https://github.com/eslint/rfcs/pull/5). You can easily install this package and all of its peer dependencies with [install-peerdeps](https://www.npmjs.com/package/install-peerdeps): ``` -yarn add @growflow/eslint-config eslint prettier -D +npx install-peerdeps --dev -a @growflow/eslint-config ``` -> Note: that you'll need a `.npmrc` file with Growflow's `NPM_TOKEN`. +> Note: that you'll need a `.npmrc` file with Growflow's `NPM_TOKEN` and you'll also need to pass that token to the `install-peerdeps` CLI (since it doesn't look at the `.npmrc` for some reason). -You'll need to create a `.eslintrc.js` file with content similar to the following: +You can then create a `.eslintrc.js` file with content similar to the following: ```js module.exports = { diff --git a/eslint/package.json b/eslint/package.json index 9c8cc7c..e64c217 100644 --- a/eslint/package.json +++ b/eslint/package.json @@ -14,7 +14,10 @@ "@typescript-eslint/eslint-plugin": "^4.11.0", "eslint-config-airbnb": "^18.2.1", "eslint-config-airbnb-typescript": "^12.0.0", - "eslint-config-prettier": "^7.1.0", + "eslint-config-prettier": "^7.1.0" + }, + "peerDependencies": { + "eslint": "^7.16.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^24.1.3", @@ -26,11 +29,9 @@ "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-security": "^1.4.0", "eslint-plugin-simple-import-sort": "^7.0.0", - "eslint-plugin-unicorn": "^24.0.0" - }, - "peerDependencies": { - "eslint": "7.x", - "typescript": "4.x" + "eslint-plugin-unicorn": "^24.0.0", + "typescript": "^4.1.3", + "prettier": "^2.2.1" }, "devDependencies": { "audit-ci": "^2.5.1" diff --git a/prettier/package.json b/prettier/package.json index d8bd94e..99191d6 100644 --- a/prettier/package.json +++ b/prettier/package.json @@ -1,6 +1,6 @@ { "name": "@growflow/prettier-config", - "version": "1.0.0", + "version": "1.0.1", "description": "Common prettier config for Growflow Org.", "main": "index.json", "scripts": { @@ -11,6 +11,6 @@ "files": [ "README.md" ], "license": "MIT", "peerDependencies": { - "prettier": "2.x" + "prettier": "^2.2.1" } }