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
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ Here are some useful commands:
30
30
- rename the directory of a package: `mv package-my-config new-directory-name && yarn lerna bootstrap`,
31
31
- run a script `do-something` that exists in at least one package: `yarn lerna run do-something` (this will try to run the script in all packages in which it is defined).
This document provides information about how to test the eslint-plugin after adding or removing rules.
6
+
7
+
## Example-app
8
+
9
+
The example-app folder is located at the root of `react-native-project-config`.
10
+
The goal of each file of example-app is to simulate the behavior of a rule or a set of rules, so that you can visually check it or by running the `yarn lint` command.
11
+
When you add or remove a rule from the recommended config, please modify (or add/remove) the corresponding file in the example-app folder.
12
+
13
+
## Real example testing
14
+
15
+
In order to test that your rule will be properly deployed, use another project, in which you install the eslint-plugin from your local files.
16
+
Use the command `yarn remove @bam.tech/eslint-plugin; yarn add --dev file:/project_address/react-native-project-config/packages/eslint-plugin; yarn; yarn lint` to remove the plugin from installed dependencies, and add it again.
17
+
If not done already, add the plugin to your `.eslintrc` configuration :
18
+
19
+
```json
20
+
// .eslintrc
21
+
{
22
+
"extends": "plugin:@bam.tech/recommended",
23
+
"overrides": [
24
+
{
25
+
"files": ["*.test.tsx", "*.test.ts"],
26
+
"extends": "plugin:@bam.tech/tests"
27
+
}
28
+
]
29
+
}
30
+
```
31
+
32
+
You should be able to test your rules from the plugin.
0 commit comments