0.6.2 • Published 2 years ago

@spot-meetings/code-style v0.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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.

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago