Skip to main content

Introduction

Requirements

  • NPM_TOKEN with read access. Ask a maintainer how to get a token.
  • Node.js version >= 12 LTS. We use nvm to manage node versions.

Peer Dependencies

  • eslint >=6
  • prettier >=2

Installation

yarn add --dev @youversion/eslint-config eslint@6.8.0 prettier to install the package and peer dependencies.

Automatic Setup

Run the script node_modules/.bin/yv-eslint-setup to set up configuration.

Manual Setup

node_modules/.bin/yv-eslint-setup will do these steps for you, but for more control it can also be done manually.

ESLint

.eslintrc.js

module.exports = {
extends: ['@youversion']
}

Yarn 2 Support

ESlint needs a patch for module resolution in order to support Yarn 2. This requires using an .eslintrc.js file.

// .eslintrc.js
require('@youversion/eslint-config/patch/modern-module-resolution')

module.exports = {
extends: ['@youversion']
}

Prettier

.prettierrc.js

module.exports = {
...require('@youversion/eslint-config/prettier')
}

VSCode

Copy @youversion/eslint-config/.vscode into your project root

Contributors

Bryson Hotopp

Bryson Hotopp

🐛👑📖💻🚀