@aliexme/eslint-config 0.4.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,95 +4,94 @@ Rule set for ESLint
4
4
 
5
5
  ## Installation
6
6
 
7
- ```
8
- npm i --save-dev eslint @aliexme/eslint-config eslint-plugin-import
7
+ ```sh
8
+ npm i --save-dev eslint @aliexme/eslint-config
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
13
  Extend your ESLint config file:
14
14
 
15
- ```
16
- {
17
- "extends": [
18
- "@aliexme/eslint-config",
19
- ],
20
- }
15
+ ```js
16
+ import eslintConfigRecommended from '@aliexme/eslint-config'
17
+
18
+ export default [
19
+ ...eslintConfigRecommended, // <--
20
+ ]
21
21
  ```
22
22
 
23
- ### Typescript
23
+ ### React
24
24
 
25
- To check ts-files, install additional packages:
25
+ Install additional packages:
26
26
 
27
- ```
28
- npm i --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
27
+ ```sh
28
+ npm i --save-dev eslint-plugin-react eslint-plugin-react-hooks
29
29
  ```
30
30
 
31
31
  And add the following lines to your ESLint config file:
32
32
 
33
- ```
34
- {
35
- "extends": [
36
- "@aliexme/eslint-config",
37
- "@aliexme/eslint-config/typescript",
38
- ],
39
- }
33
+ ```js
34
+ import eslintConfigReact from '@aliexme/eslint-config/react'
35
+
36
+ export default [
37
+ ...eslintConfigRecommended,
38
+ ...eslintConfigReact, // <--
39
+ ]
40
40
  ```
41
41
 
42
- ### React
42
+ ### React Native
43
43
 
44
44
  Install additional packages:
45
45
 
46
- ```
47
- npm i --save-dev eslint-plugin-react eslint-plugin-react-hooks
46
+ ```sh
47
+ npm i --save-dev eslint-plugin-react-native
48
48
  ```
49
49
 
50
50
  And add the following lines to your ESLint config file:
51
51
 
52
- ```
53
- {
54
- "extends": [
55
- "@aliexme/eslint-config",
56
- "@aliexme/eslint-config/react",
57
- "plugin:react-hooks/recommended",
58
- ],
59
- }
52
+ ```js
53
+ import eslintConfigReactNative from '@aliexme/eslint-config/react-native'
54
+
55
+ export default [
56
+ ...eslintConfigRecommended,
57
+ ...eslintConfigReactNative, // <--
58
+ ]
60
59
  ```
61
60
 
62
- ### React Native
61
+ ### Vue
63
62
 
64
63
  Install additional packages:
65
64
 
66
- ```
67
- npm i --save-dev eslint-plugin-react-native
65
+ ```sh
66
+ npm i --save-dev eslint-plugin-vue
68
67
  ```
69
68
 
70
69
  And add the following lines to your ESLint config file:
71
70
 
72
- ```
73
- {
74
- "extends": [
75
- "@aliexme/eslint-config",
76
- "@aliexme/eslint-config/react-native",
77
- ],
78
- }
71
+ ```js
72
+ import eslintConfigVue from '@aliexme/eslint-config/vue'
73
+
74
+ export default [
75
+ ...eslintConfigRecommended,
76
+ ...eslintConfigVue, // <--
77
+ ]
79
78
  ```
80
79
 
81
80
  ### Prettier
82
81
 
83
82
  Install additional packages:
84
83
 
85
- ```
84
+ ```sh
86
85
  npm i --save-dev prettier eslint-plugin-prettier eslint-config-prettier
87
86
  ```
88
87
 
89
88
  And add the following lines to your ESLint config file:
90
89
 
91
- ```
92
- {
93
- "extends": [
94
- "@aliexme/eslint-config",
95
- "@aliexme/eslint-config/prettier",
96
- ],
97
- }
90
+ ```js
91
+ import eslintConfigPrettier from '@aliexme/eslint-config/prettier'
92
+
93
+ export default [
94
+ ...eslintConfigRecommended,
95
+ ...eslintConfigPrettier, // <--
96
+ ]
98
97
  ```