|
1 |
| -# eslint-config-web-scrobbler [![NPM][npm-badge]][npm] [![Test][workflow-badge]][workflow] |
2 |
| - |
3 |
| -ESLint configuration file for Web Scrobbler projects. |
4 |
| - |
5 |
| -## Usage |
6 |
| - |
7 |
| -You can install `eslint-config-web-scrobbler` by a following way: |
8 |
| - |
9 |
| -```sh |
10 |
| -> npm install --save-dev eslint-config-web-scrobbler |
11 |
| -``` |
12 |
| - |
13 |
| -### JavaScript |
14 |
| - |
15 |
| -Add `web-scrobbler` to the `extends` array in your `.eslintrc.*` file: |
16 |
| - |
17 |
| -```json |
18 |
| -{ |
19 |
| - "extends": ["some-other-config-you-use", "web-scrobbler"] |
20 |
| -} |
21 |
| -``` |
22 |
| - |
23 |
| -### TypeScript |
24 |
| - |
25 |
| -Install peer dependencies first: |
26 |
| - |
27 |
| -```sh |
28 |
| -> npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser |
29 |
| -``` |
30 |
| - |
31 |
| -Then, add `web-scrobbler/typescript` to the `extends` array in your `.eslintrc.*` file: |
32 |
| - |
33 |
| -```json |
34 |
| -{ |
35 |
| - "extends": ["some-other-config-you-use", "web-scrobbler/typescript"] |
36 |
| -} |
37 |
| -``` |
38 |
| - |
39 |
| -You don't need to include `web-scrobbler` config - `web-scrobbler/typescript` handles both JS and TS files. |
40 |
| - |
41 |
| -### Vue |
42 |
| - |
43 |
| -Install peer dependencies first: |
44 |
| - |
45 |
| -```sh |
46 |
| -> npm install --save-dev eslint-plugin-vue |
47 |
| -``` |
48 |
| - |
49 |
| -Then, add `web-scrobbler/vue` cto the `extends` array in your `.eslintrc.*` file: |
50 |
| - |
51 |
| -```json |
52 |
| -{ |
53 |
| - "extends": [ |
54 |
| - "some-other-config-you-use", |
55 |
| - "web-scrobbler", |
56 |
| - "web-scrobbler/vue" |
57 |
| - ] |
58 |
| -} |
59 |
| -``` |
60 |
| - |
61 |
| -`web-scrobbler/vue` config is applied to Vue SFCs only, so you should add `web-scrobbler` (or `web-scrobbler/typescript`) and `web-scrobbler/vue` configs to the `extends` array. |
62 |
| - |
63 |
| -## License |
64 |
| - |
65 |
| -Licensed under the [MIT License](./LICENSE). |
66 |
| - |
67 |
| -<!-- Badges --> |
68 |
| - |
69 |
| -[npm-badge]: https://img.shields.io/npm/v/eslint-config-web-scrobbler |
70 |
| -[workflow-badge]: https://github.com/web-scrobbler/eslint-config-web-scrobbler/workflows/Lint/badge.svg |
71 |
| - |
72 |
| -<!-- Related pages --> |
73 |
| - |
74 |
| -[npm]: https://www.npmjs.com/package/eslint-config-web-scrobbler |
75 |
| -[workflow]: https://github.com/web-scrobbler/eslint-config-web-scrobbler/actions?query=workflow%3ALint |
| 1 | +# eslint-config-web-scrobbler [![NPM][npm-badge]][npm] [![Test][workflow-badge]][workflow] |
| 2 | + |
| 3 | +ESLint configuration file for Web Scrobbler projects. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +You can install `eslint-config-web-scrobbler` by a following way: |
| 8 | + |
| 9 | +```sh |
| 10 | +> npm install --save-dev eslint-config-web-scrobbler |
| 11 | +``` |
| 12 | + |
| 13 | +### JavaScript |
| 14 | + |
| 15 | +Add `web-scrobbler` to the `extends` array in your `.eslintrc.*` file: |
| 16 | + |
| 17 | +```json |
| 18 | +{ |
| 19 | + "extends": ["some-other-config-you-use", "web-scrobbler"] |
| 20 | +} |
| 21 | +``` |
| 22 | + |
| 23 | +### TypeScript |
| 24 | + |
| 25 | +Install peer dependencies first: |
| 26 | + |
| 27 | +```sh |
| 28 | +> npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser |
| 29 | +``` |
| 30 | + |
| 31 | +Then, add `web-scrobbler/typescript` to the `extends` array in your `.eslintrc.*` file: |
| 32 | + |
| 33 | +```json |
| 34 | +{ |
| 35 | + "extends": ["some-other-config-you-use", "web-scrobbler/typescript"] |
| 36 | +} |
| 37 | +``` |
| 38 | + |
| 39 | +You don't need to include `web-scrobbler` config - `web-scrobbler/typescript` handles both JS and TS files. |
| 40 | + |
| 41 | +### Vue |
| 42 | + |
| 43 | +Install peer dependencies first: |
| 44 | + |
| 45 | +```sh |
| 46 | +> npm install --save-dev eslint-plugin-vue |
| 47 | +``` |
| 48 | + |
| 49 | +Then, add `web-scrobbler/vue` cto the `extends` array in your `.eslintrc.*` file: |
| 50 | + |
| 51 | +```json |
| 52 | +{ |
| 53 | + "extends": [ |
| 54 | + "some-other-config-you-use", |
| 55 | + "web-scrobbler", |
| 56 | + "web-scrobbler/vue" |
| 57 | + ] |
| 58 | +} |
| 59 | +``` |
| 60 | + |
| 61 | +`web-scrobbler/vue` config is applied to Vue SFCs only, so you should add `web-scrobbler` (or `web-scrobbler/typescript`) and `web-scrobbler/vue` configs to the `extends` array. |
| 62 | + |
| 63 | +## License |
| 64 | + |
| 65 | +Licensed under the [MIT License](./LICENSE). |
| 66 | + |
| 67 | +<!-- Badges --> |
| 68 | + |
| 69 | +[npm-badge]: https://img.shields.io/npm/v/eslint-config-web-scrobbler |
| 70 | +[workflow-badge]: https://github.com/web-scrobbler/eslint-config-web-scrobbler/workflows/Lint/badge.svg |
| 71 | + |
| 72 | +<!-- Related pages --> |
| 73 | + |
| 74 | +[npm]: https://www.npmjs.com/package/eslint-config-web-scrobbler |
| 75 | +[workflow]: https://github.com/web-scrobbler/eslint-config-web-scrobbler/actions?query=workflow%3ALint |
0 commit comments