Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/textkernel/eslint-config-textkernel
ESLint shareable config for Textkernel style guide
https://github.com/textkernel/eslint-config-textkernel
Last synced: 7 days ago
JSON representation
ESLint shareable config for Textkernel style guide
- Host: GitHub
- URL: https://github.com/textkernel/eslint-config-textkernel
- Owner: textkernel
- Created: 2021-10-17T21:42:30.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-25T11:33:48.000Z (8 months ago)
- Last Synced: 2024-04-26T21:47:41.423Z (7 months ago)
- Language: JavaScript
- Size: 88.9 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @textkernel/eslint-config
ESLint shareable config for Textkernel style guide[@textkernel/eslint-config](https://github.com/textkernel/eslint-config-textkernel) is a shareable configuration package for [eslint](http://eslint.org) built on top of [eslint-airbnb-config](https://github.com/airbnb/javascript) and modified to meet Textkernel's own standards.
## Installation
1. Install all peer dependencies
```sh
npx install-peerdeps --dev @textkernel/eslint-config
```2. Install [@textkernel/eslint-config](https://github.com/textkernel/eslint-config-textkernel) as a development dependency of your project:
```sh
npm install @textkernel/eslint-config --save-dev
```3. Install yarn [@textkernel/eslint-config](https://github.com/textkernel/eslint-config-textkernel):
```sh
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.
```js
// eslintrc.js
module.exports = {
extends: ['@textkernel/eslint-config/base'],
};
```### @textkernel/eslint-config
The default export that extends `@textkernel/eslint-config` adding Typescript rules.
```js
// eslintrc.js
module.exports = {
extends: ['@textkernel/eslint-config'],
};
```### @textkernel/eslint-config/react
Extends `@textkernel/eslint-config` adding specific rules to React.
```js
// eslintrc.js
module.exports = {
extends: ['@textkernel/eslint-config/react'],
};
```## VSCode integration
We recommend turning on VSCode settings to automatically run `eslint --fix` on save.
```json
"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
1. Bump the `version` in `package.json` in your branch.
2. Merge your branch into the `master` branch.
3. Switch to the master branch and pull all changes:
```sh
git checkout master
git pull
```
4. Log in to the npm registry:
```sh
npm login
```
5. Publish the library to npm:
```sh
npm publish --access public
```