@markof/eslint-plugin-no-chinese 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -4
- package/lib/index.js +0 -3
- package/package.json +1 -1
- package/tests/index.js +2 -2
package/README.md
CHANGED
@@ -11,7 +11,7 @@ Add '@markof/eslint-plugin-no-chinese' to plugins in .eslintrc file.
|
|
11
11
|
```javascript
|
12
12
|
{
|
13
13
|
"plugins": [
|
14
|
-
"@markof/
|
14
|
+
"@markof/no-chinese"
|
15
15
|
]
|
16
16
|
}
|
17
17
|
```
|
@@ -20,9 +20,9 @@ Config rules in .eslintrc file.
|
|
20
20
|
```javascript
|
21
21
|
{
|
22
22
|
"rules": {
|
23
|
-
"@markof/
|
24
|
-
"@markof/
|
25
|
-
"@markof/
|
23
|
+
"@markof/no-chinese/no-chinese-code": "error",
|
24
|
+
"@markof/no-chinese/no-chinese-comment": "error",
|
25
|
+
"@markof/no-chinese/no-chinese-console": "error",
|
26
26
|
}
|
27
27
|
}
|
28
28
|
```
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
package/tests/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
const RuleTester = require("eslint").RuleTester
|
2
2
|
var ruleTester = new RuleTester()
|
3
3
|
const ruleNoChineseCode = require("../lib/rules/no-chinese-code")
|
4
|
-
const ruleNoChineseComments = require("../lib/rules/no-chinese-
|
4
|
+
const ruleNoChineseComments = require("../lib/rules/no-chinese-comment")
|
5
5
|
const ruleNoChineseConsole = require("../lib/rules/no-chinese-console")
|
6
6
|
|
7
7
|
ruleTester.run("no-chinese-code", ruleNoChineseCode, {
|
@@ -34,7 +34,7 @@ ruleTester.run("no-chinese-console", ruleNoChineseConsole, {
|
|
34
34
|
],
|
35
35
|
})
|
36
36
|
|
37
|
-
ruleTester.run("no-chinese-
|
37
|
+
ruleTester.run("no-chinese-comment", ruleNoChineseComments, {
|
38
38
|
valid: [`// this is a comment`, `/* this is a comment */`],
|
39
39
|
invalid: [
|
40
40
|
{
|