@spot-meetings/code-style

0.6.2 • Public • Published

@spot-meetings/eslint-config

Spot's Code Style configs (ESLint, Prettier).

Supports Node.js, TypeScript and React.

Installation

npm i -D @spot-meetings/code-style

yarn add -D @spot-meetings/code-style

Configuration

For JavaScript

/.eslintrc

{
  "extends": "@spot-meetings/eslint-config/javascript"
}

/.prettierrc.js

module.exports = require('@spot-meetings/code-style/prettier')

For TypeScript

/.eslintrc

{
  "extends": "@spot-meetings/eslint-config/typescript"
}

/.prettierrc.js

module.exports = require('@spot-meetings/code-style/prettier')

Project Setup

After installation, you can run the setup script with:

$(yarn bin)/spot-setup-code-style

$(npm bin)/spot-setup-code-style

With TypeScript, you may have to update the project configuration to the parser options section of the ESLint config to point to the correct ./tsconfig.json file:

{
  "extends": "@spot-meetings/code-style/typescript",
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}

VSCode

Add the ESLint and Prettier extensions and configure your formatter to use Prettier as default.

Package Sidebar

Install

npm i @spot-meetings/code-style

Weekly Downloads

56

Version

0.6.2

License

MIT

Unpacked Size

5.66 kB

Total Files

7

Last publish

Collaborators

  • hpeikemo
  • walker_pablo