aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 2eec63c890a8c3d312eb3591852bc7735753be67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<p align="center">
	<img height="60px" width="60px" src="https://eslint.org/assets/img/favicon.512x512.png" />
	<h1 align="center">Personal ESLint configuration</h1>
</p>

<p align="center">
	<a href="https://www.npmjs.com/package/@valentineus/eslint-config">
		<img src="https://flat.badgen.net/npm/v/@valentineus/eslint-config" />
	</a>
	<a href="https://www.npmjs.com/package/@valentineus/eslint-config">
		<img src="https://flat.badgen.net/packagephobia/install/@valentineus/eslint-config" />
	</a>
	<a href="https://github.com/valentineus/eslint-config">
		<img src="https://flat.badgen.net/github/last-commit/valentineus/eslint-config" />
	</a>
</p>

## Configurations

* `javascript`
* `typescript`
* `vue-javascript`
* `vue-typescript`

## Example

* Install dependencies:

```shell script
npm install --save-dev @typescript-eslint/eslint-plugin @typescript-eslint/parser         \
                       @valentineus/eslint-config eslint eslint-plugin-eslint-comments    \
                       eslint-plugin-import eslint-plugin-security eslint-plugin-sonarjs  \
                       eslint-plugin-unicorn eslint-plugin-vue
 
# or
yarn add --dev @typescript-eslint/eslint-plugin @typescript-eslint/parser         \
               @valentineus/eslint-config eslint eslint-plugin-eslint-comments    \
               eslint-plugin-import eslint-plugin-security eslint-plugin-sonarjs  \
               eslint-plugin-unicorn eslint-plugin-vue
```

* Create config file:

```json
{
  "env": {
    "browser": true,
    "es6": true
  },
  "extends": [
    "@valentineus/eslint-config/vue-typescript"
  ],
  "globals": {
    "Atomics": "readonly",
    "SharedArrayBuffer": "readonly"
  },
  "parserOptions": {
    "createDefaultProgram": true,
    "ecmaVersion": 2020,
    "project": "tsconfig.json",
    "sourceType": "module",
    "tsconfigRootDir": "."
  },
  "rules": {}
}
```

## License

[Apache-2.0](LICENSE.txt).
Copyright (c) [Valentin Popov](mailto:info@valentineus.link).