@vandebron/eslint-config-base
v4.3.0
Published
Vandebron's base eslint config that integrates with typescript and prettier
Downloads
739
Readme
Vandebron's base eslint config, integrated with typescript and prettier.
Installation
- Make sure you have all the peer-dependencies installed:
@typescript-eslint/eslint-plugin
@typescript-eslint/parser
eslint-config-prettier
eslint-plugin-import
eslint-plugin-jsx-a11y
eslint-plugin-prettier
eslint-plugin-react-hooks
eslint-plugin-react
eslint
prettier
- Install the package:
yarn add -D @vandebron/eslint-config-base
Configuration
- In your
eslintrc
, add@vandebron/eslint-config-base
to theextends
array:
{
extends: [..., '@vandebron/eslint-config-base'],
}
You can still add your own custom rules to your eslintrc
and overwrite the ones in this config.
- Tell eslint where to find your
tsconfig
(needed to enable rules that require type information):
{
parserOptions: {
project: require('path').resolve(__dirname, './tsconfig.json'),
}
}
- (Optional) Use the included
.prettierrc.js
:
Create or edit your own existing prettier config, and have it look like this:
module.exports = {
...require('@vandebron/eslint-config-base/.prettierrc.js'),
};
- (Local development) Install the
peerDependencies
If you wish to use this package locally, for example with yarn link
, then you will need to install the peerDependencies
.
Run yarn
from the root of this project to do so.
Publishing
To publish a new version, make sure you're logged into npm with an account that is part of the vandebron organisation. Then run the following commands:
# Use the appropriate version bump. See https://semver.org/ for details
npm version (major|minor|patch)
npm publish
git push && git push --tags
Alpha or Beta channels
If you want to deploy an Alpha or Beta version do the following:
npm version prerelease --preid=(alpha|beta)
npm publish --tag (alpha|beta)
For example, if you want to bump the version from 3.2.0 to an alpha release of the next patch version (i.e. 3.2.1), you would do the following:
npm version prerelease --preid=alpha
npm publish --tag alpha