@textkernel/eslint-config
v1.1.0
Published
ESLint shareable config for Textkernel style guide
Downloads
3
Readme
@textkernel/eslint-config
ESLint shareable config for Textkernel style guide
@textkernel/eslint-config is a shareable configuration package for eslint built on top of eslint-airbnb-config and modified to meet Textkernel's own standards.
Installation
- Install all peer dependencies
npx install-peerdeps --dev @textkernel/eslint-config
- Install @textkernel/eslint-config as a development dependency of your project:
npm install @textkernel/eslint-config --save-dev
- Install yarn @textkernel/eslint-config:
yarn add --dev @textkernel/eslint-config
Available ESLint configs
@textkernel/eslint-config/base
The base export contains common rules that are not specific to any framework or environment.
// eslintrc.js
module.exports = {
extends: ['@textkernel/eslint-config/base'],
};
@textkernel/eslint-config
The default export that extends @textkernel/eslint-config
adding Typescript rules.
// eslintrc.js
module.exports = {
extends: ['@textkernel/eslint-config'],
};
@textkernel/eslint-config/react
Extends @textkernel/eslint-config
adding specific rules to React.
// eslintrc.js
module.exports = {
extends: ['@textkernel/eslint-config/react'],
};
VSCode integration
We recommend turning on VSCode settings to automatically run eslint --fix
on save.
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
}
This will automatically format your code once you save. You don't need VSCode prettier extension enabled or running on save as eslint will automatically run prettier
for you.
Repease and Publishing
- Bump the
version
inpackage.json
in your branch. - Merge your branch into the
master
branch. - Switch to the master branch and pull all changes:
git checkout master
git pull
- Log in to the npm registry:
npm login
- Publish the library to npm:
npm publish --access public