https://github.com/awkward/eslint-config-awkward
https://github.com/awkward/eslint-config-awkward
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/awkward/eslint-config-awkward
- Owner: awkward
- Created: 2017-02-26T22:57:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T12:22:19.000Z (almost 9 years ago)
- Last Synced: 2025-08-08T13:53:38.505Z (10 months ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-config-awkward
This package contains linting configuration that we use for our JavaScript projects at Awkward. The configuration is based on [JavaScript Standard Style](https://github.com/feross/standard).
## Installation
**1. Install the shareable config**
```bash
npm install @awkward/eslint-config --save-dev
```
**2. Install correct versions of peer dependencies**
List peer dependencies:
```bash
npm info "@awkward/eslint-config@latest" peerDependencies
```
macOS/Linux users can run the following command to install all peer dependencies at once:
```bash
(
export PKG=@awkward/eslint-config;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
```
Windows users can either install all the peer dependencies manually, or use the [install-peerdeps](https://github.com/nathanhleung/install-peerdeps) cli tool.
```bash
npm install -g install-peerdeps
install-peerdeps --dev @awkward/eslint-config
```
## Usage
Shareable configs are designed to work with the `extends` feature of `.eslintrc` files.
You can learn more about [Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) on the official ESLint website.
This package includes the following configurations:
- [`@awkward`](configurations/base.js) − The base configuration used for all projects.
- [`@awkward/react`](configurations/react.js) − To be used in addition to `@awkward` configuration for projects that use [React](https://facebook.github.io/react/).
An example of what to put in your `.eslintrc.json` file:
```json
{
"extends": [
"@awkward",
"@awkward/eslint-config/react",
... // additional configs to extend from
]
}
```
## TODO
- Leveraging ESLint in your project (lint-staged, auto fix) w/ examples (package.json)