You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: move content on how to contribute to a separate file
* feat: link the contributing file in the readme
---------
Co-authored-by: Clément Dours <clementdo@bam.tech>
This project is an ESLint plugin that gathers all the rules, plugins and parsers that should be used in any new BAM project. Here is the documentation on how to contribute to this plugin
4
+
5
+
## How to improve?
6
+
7
+
If you find a useful rule that you feel every project at BAM should use, feel free to open a PR.
8
+
9
+
Use the documentation on how to create a shareable configuration [here](https://eslint.org/docs/latest/developer-guide/shareable-configs).
10
+
11
+
Here is a small summary:
12
+
13
+
### Adding new rules
14
+
15
+
Adding new rules is quite simple, you just have to modify `index.js` and add your rule to the `rules` object:
16
+
17
+
```js
18
+
module.exports= {
19
+
...
20
+
rules: {
21
+
...
22
+
"my-new-rule":"error",
23
+
},
24
+
...
25
+
}
26
+
```
27
+
28
+
### Extending new shareable configurations
29
+
30
+
Extending new shareable configurations is quite simple, you just have to modify `index.js` and add your shareable configuration to the `extends` array (the order of configurations is important):
31
+
32
+
```js
33
+
module.exports= {
34
+
...
35
+
extends: [
36
+
...
37
+
"@some-scope/eslint-config",
38
+
],
39
+
...
40
+
}
41
+
```
42
+
43
+
The package containing your shareable configuration should be added as a dependency by running `yarn add your-package`.
44
+
45
+
### Adding a plugin
46
+
47
+
Adding a plugin is quite simple, you just have to modify `index.js` and add your plugin to the `plugins` array:
48
+
49
+
```js
50
+
module.exports= {
51
+
...
52
+
plugins: [
53
+
...
54
+
"your-plugin",
55
+
],
56
+
...
57
+
}
58
+
```
59
+
60
+
The package containing your plugin should be added as a [peer dependency](https://classic.yarnpkg.com/en/docs/dependency-types/) by running `yarn add --peer your-plugin`.
Copy file name to clipboardExpand all lines: packages/eslint-plugin/README.md
+1-56Lines changed: 1 addition & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,59 +40,4 @@ In your `.eslintrc` config file, extend the exported recommended configuration (
40
40
41
41
You can still customize your ESLint config by adding configurations, plugins and rules to your `.eslintrc` config file.
42
42
43
-
## How to improve?
44
-
45
-
If you find a useful rule that you feel every project at BAM should use, feel free to open a PR.
46
-
47
-
Use the documentation on how to create a shareable configuration [here](https://eslint.org/docs/latest/developer-guide/shareable-configs).
48
-
49
-
Here is a small summary:
50
-
51
-
### Adding new rules
52
-
53
-
Adding new rules is quite simple, you just have to modify `index.js` and add your rule to the `rules` object:
54
-
55
-
```js
56
-
module.exports= {
57
-
...
58
-
rules: {
59
-
...
60
-
"my-new-rule":"error",
61
-
},
62
-
...
63
-
}
64
-
```
65
-
66
-
### Extending new shareable configurations
67
-
68
-
Extending new shareable configurations is quite simple, you just have to modify `index.js` and add your shareable configuration to the `extends` array (the order of configurations is important):
69
-
70
-
```js
71
-
module.exports= {
72
-
...
73
-
extends: [
74
-
...
75
-
"@some-scope/eslint-config",
76
-
],
77
-
...
78
-
}
79
-
```
80
-
81
-
The package containing your shareable configuration should be added as a dependency by running `yarn add your-package`.
82
-
83
-
### Adding a plugin
84
-
85
-
Adding a plugin is quite simple, you just have to modify `index.js` and add your plugin to the `plugins` array:
86
-
87
-
```js
88
-
module.exports= {
89
-
...
90
-
plugins: [
91
-
...
92
-
"your-plugin",
93
-
],
94
-
...
95
-
}
96
-
```
97
-
98
-
The package containing your plugin should be added as a [peer dependency](https://classic.yarnpkg.com/en/docs/dependency-types/) by running `yarn add --peer your-plugin`.
43
+
If you find a useful rule that you feel every project at BAM should use, feel free to contribute, [here is a link](./CONTRIBUTING.md) where you'll find explanations on how to do so.
0 commit comments