motleyagency / eslint-config-motley

Motley (https://motley.fi) JavaScript/Typescript guidelines as ESLint rules with Prettier autoformatting
https://motley.fi
MIT License
6 stars 0 forks source link

Install fails when lint-staged already exists (v10.0.1) #55

Closed bostrom closed 6 years ago

bostrom commented 6 years ago
yarn install v1.3.2
(node:31331) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
[2/2] ⠐ eslint-config-motley
[-/2] ⠐ waiting...
[-/2] ⠐ waiting...
[-/2] ⠐ waiting...
error /Users/.../node_modules/eslint-config-motley: Command failed.
Exit code: 1
Command: lib/postinstall.js
Arguments:
Directory: /Users/.../node_modules/eslint-config-motley
Output:
⚠️  .eslintrc.js already exists;
Make sure that it includes the following for 'eslint-config-motley'
to work as it should:

module.exports = {
  extends: 'motley',
  env: {
    browser: true,
    node: true,
    jest: true,
  }
};

⚠️  .prettierrc already exists;
Make sure that it includes the following for 'eslint-config-motley'
to work as it should:

{
  "singleQuote": true,
  "trailingComma": "all"
}
⚠️  A 'lint-staged' configuration already exists in package.json.
We won't overwrite it since it may include some of your own customizations.
We would have added the following rules, so check your configuration and modify it if needed:

{
  "*.{js,json,graphql,md,css,scss,less,ts}": [
    "prettier --write",
    "git add"
  ]
}
/Users/.../node_modules/eslint-config-motley/lib/postinstall.js:69
  return resolve();
  ^
bostrom commented 6 years ago

@petetnt what's the idea here? https://github.com/motleyagency/eslint-config-motley/blob/master/lib/postinstall.js#L115