UNPKG

2.99 kBMarkdownView Raw
1# eslint-config [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]
2
3#### An ESLint [Shareable Config][shareable-configs-url]
4
5## Installation
6
7```sh
8npm install @3fs/eslint-config [eslint@6.5.0]
9```
10
11## Usage
12
13Shareable configs are designed to work with the `extends` feature of `.eslintrc` files.
14You can learn more about
15[Shareable Configs][shareable-configs-url] on the
16official ESLint website.
17
18To use this shareable config, first run this:
19
20```sh
21npm install --save-dev eslint@6.5.0 @3fs/eslint-config
22```
23
24Then, add this to your .eslintrc(.js|.json|.yml) file:
25
26```json
27{
28 "extends": "@3fs"
29}
30```
31
32*Note: We omitted the `/eslint-config` sufix since it is automatically assumed by ESLint. Only works for esnext since its specified as default*
33
34You can override settings from the shareable config by adding them directly into your
35`.eslintrc` file.
36
37### All available configs
38
39* `@3fs` or `@3fs/eslint-config/configs/esnext` - ES6+ config; Requires [babel-eslint@10.0.3][babel-eslint]
40* `@3fs/eslint-config/configs/es5` - ES5 config
41* `@3fs/eslint-config/configs/node` - ES6+ NodeJS config; Requires [babel-eslint@10.0.3][babel-eslint]
42* `@3fs/eslint-config/configs/node-es5` - ES5 NodeJS config
43* `@3fs/eslint-config/configs/ng` - AngularJS config; Requires [eslint-plugin-angular@4.0.1][eslint-plugin-angular]
44* `@3fs/eslint-config/configs/react` - React config; Requires [babel-eslint@10.0.3][babel-eslint], [eslint-plugin-react@7.14.3][eslint-plugin-react], [eslint-plugin-jsx-a11y@6.2.3][eslint-plugin-jsx-a11y]
45* `@3fs/eslint-config/configs/react-native` - React Native config; Requires [babel-eslint@10.0.3][babel-eslint], [eslint-plugin-react@7.14.3][eslint-plugin-react], [eslint-plugin-jsx-a11y@6.2.3][eslint-plugin-jsx-a11y] and [eslint-plugin-react-native@3.7.0][eslint-plugin-react-native]
46* `@3fs/eslint-config/configs/ts` - TypeScript config; Requires [@typescript-eslint/eslint-plugin@2.3.1][@typescript-eslint/eslint-plugin] and [@typescript-eslint/parser@2.3.1][@typescript-eslint/parser]
47
48
49
50[//]: # (URLs)
51
52[//]: # (main)
53
54[npm-image]: https://img.shields.io/npm/v/@3fs/eslint-config.svg
55[npm-url]: https://npmjs.org/package/@3fs/eslint-config
56[downloads-image]: https://img.shields.io/npm/dm/@3fs/eslint-config.svg
57[downloads-url]: https://npmjs.org/package/@3fs/eslint-config
58[shareable-configs-url]: http://eslint.org/docs/developer-guide/shareable-configs
59
60[//]: # (other)
61
62[babel-eslint]: https://www.npmjs.com/package/babel-eslint
63[eslint-plugin-angular]: https://www.npmjs.com/package/eslint-plugin-angular
64[eslint-plugin-react]: https://www.npmjs.com/package/eslint-plugin-react
65[eslint-plugin-jsx-a11y]: https://www.npmjs.com/package/eslint-plugin-jsx-a11y
66[@typescript-eslint/parser]: https://www.npmjs.com/package/@typescript-eslint/parser
67[@typescript-eslint/eslint-plugin]: https://www.npmjs.com/package/@typescript-eslint/eslint-plugin
68[eslint-plugin-react-native]: https://www.npmjs.com/package/eslint-plugin-react-native
69