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
This is to enforce a style of snake_case in your project, rather than just disabling camelcase.
16
11
17
12
## Features
18
13
*[✓] Easy to use
14
+
*[✓] MIT License
19
15
*[✓] Compatible with last version of ESLint
20
16
*[✓] Compatible with CamelCase (Class name or similar)
17
+
*[✓] Whitelist array for methods or variables with camelCase syntax from other libraries/npm package.
21
18
22
19
## Fast setup
23
20
1. Add dependencies on `package.json`
@@ -26,7 +23,7 @@ This is to enforce a style of snake_case in your project, rather than just disab
26
23
"eslint": "^4.19.1",
27
24
},
28
25
"devDependencies": {
29
-
"eslint-plugin-snakecasejs": "^1.0.0",
26
+
"eslint-plugin-snakecasejs": "^1.1.0",
30
27
}
31
28
```
32
29
2. Create `.eslintrc.json` file with:
@@ -37,19 +34,25 @@ This is to enforce a style of snake_case in your project, rather than just disab
37
34
],
38
35
"rules":
39
36
{
40
-
"snakecasejs/snakecasejs": "error"
37
+
"snakecasejs/snakecasejs": "error",
38
+
"snakecasejs/whitelist": []
41
39
}
42
40
}
43
41
```
44
-
3. If work add star :star: at this project :heart:
45
-
4. If you want help me: <b><ahref="http://paypal.ptkdev.io"></b>donate on paypal</a> or become a <b><ahref="http://patreon.ptkdev.io">backer on patreon</a></b>.
42
+
3. If it works add a star :star: at this project :heart:
43
+
4. If you want to help me: **[donate on paypal](http://paypal.ptkdev.io)**or become a **[backer on patreon](http://patreon.ptkdev.io)**.
46
44
47
45
NOTE: switch `error` to `warn` if you don't need snake_case as mandatory rules.
48
46
49
47
For advanced configuration see [INSTALL.md](https://github.com/ptkdev/eslint-plugin-snakecasejs/blob/master/INSTALL.md).
50
48
51
-
<h1>License</h1>
49
+
## Ignore words, variables, methods, class name (whitelist)
50
+
Add rules: `"snakecasejs/whitelist": []` with array of variables or method with camelCase syntax.
51
+
52
+
Plugin ignore check on this words. Example: `"snakecasejs/whitelist": ["externalPath","setNumber"]`
0 commit comments