Package Exports
- @spot-meetings/code-style/prettier
- @spot-meetings/code-style/prettier.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@spot-meetings/code-style) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@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.