@markof/eslint-plugin-no-chinese 1.0.6 → 1.0.8

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.
Files changed (2) hide show
  1. package/lib/index.js +24 -18
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,25 +1,31 @@
1
1
  const pkg = require('../package.json')
2
2
 
3
3
  const plugin = {
4
- meta: {
5
- name: pkg.name,
6
- version: pkg.version,
7
- },
8
- rules: {
9
- "no-chinese-code": require('./rules/no-chinese-code.js'),
10
- "no-chinese-comment": require('./rules/no-chinese-comment.js'),
11
- "no-chinese-console": require('./rules/no-chinese-console.js'),
12
- },
13
- configs: {
14
- recommended: {
15
- rules: {
16
- [pkg.name + '/no-chinese-code']: 'error',
17
- [pkg.name + '/no-chinese-comment']: 'error',
18
- [pkg.name + '/no-chinese-console']: 'error',
19
- },
4
+ meta: {
5
+ name: `@markof/no-chinese`,
6
+ version: pkg.version,
20
7
  },
21
- }
8
+ rules: {
9
+ "no-chinese-code": require('./rules/no-chinese-code.js'),
10
+ "no-chinese-comment": require('./rules/no-chinese-comment.js'),
11
+ "no-chinese-console": require('./rules/no-chinese-console.js'),
12
+ }
13
+ }
14
+
15
+ const configs = {
16
+
17
+ recommended: {
18
+ plugins: {'@markof/no-chinese': plugin},
19
+ rules: {
20
+ '@markof/no-chinese/no-chinese-code': 'error',
21
+ '@markof/no-chinese/no-chinese-comment': 'error',
22
+ '@markof/no-chinese/no-chinese-console': 'error',
23
+ },
24
+ },
22
25
  }
23
26
 
24
27
  // OR for CommonJS
25
- module.exports = plugin;
28
+ module.exports = {
29
+ plugin,
30
+ configs
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markof/eslint-plugin-no-chinese",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "eslint plugin to forbid chinese",
5
5
  "keywords": [
6
6
  "eslint",