@shrpne/eslint-plugin-vue-extra 0.1.1 → 0.1.2

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 (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +23 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -96,7 +96,7 @@ When not to use:
96
96
 
97
97
  Generally `vue/no-boolean-default: "error"` is recommended to remove all boolean defaults. But if you want to keep `default: true` cases, this rule will help remove `false` defaults.
98
98
 
99
- Also, if you use `vueExtra.configs.recommended` preset, this case will be already covered:
99
+ Also, if you already use `prefer-optional-boolean-prop` with `no-falsy-default-with-optional-prop`, then this case will be already covered:
100
100
  - `prefer-optional-boolean-prop` - makes boolean prop optional
101
101
  - `no-falsy-default-with-optional-prop` - removes falsy defaults for this optional prop
102
102
 
package/index.js CHANGED
@@ -6,7 +6,6 @@ import preferOptionalBooleanProp from './rules/prefer-optional-boolean-prop.js';
6
6
  const plugin = {
7
7
  meta: {
8
8
  name: '@shrpne/eslint-plugin-vue-extra',
9
- version: '0.1.0',
10
9
  },
11
10
  rules: {
12
11
  'no-falsy-default-with-optional-prop': noFalsyDefaultWithOptionalProp,
@@ -19,6 +18,18 @@ const plugin = {
19
18
 
20
19
  Object.assign(plugin.configs, {
21
20
  recommended: {
21
+ plugins: {
22
+ 'vue-extra': plugin,
23
+ },
24
+ rules: {
25
+ 'vue/require-default-prop': 'off',
26
+ 'vue-extra/no-falsy-default-with-optional-prop': 'error',
27
+ 'no-boolean-default-false': 'error',
28
+ 'vue-extra/no-empty-defaults': 'error',
29
+ },
30
+ },
31
+ // Recommended to use with vue-extra/prefer-optional-boolean-prop
32
+ "recommended-optional-boolean": {
22
33
  plugins: {
23
34
  'vue-extra': plugin,
24
35
  },
@@ -29,6 +40,17 @@ Object.assign(plugin.configs, {
29
40
  'vue-extra/no-empty-defaults': 'error',
30
41
  },
31
42
  },
43
+ // Recommended to use with vue/no-boolean-default
44
+ "recommended-no-boolean-default ": {
45
+ plugins: {
46
+ 'vue-extra': plugin,
47
+ },
48
+ rules: {
49
+ 'vue/require-default-prop': 'off',
50
+ 'vue-extra/no-falsy-default-with-optional-prop': 'error',
51
+ 'vue-extra/no-empty-defaults': 'error',
52
+ },
53
+ },
32
54
  });
33
55
 
34
56
  export default plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shrpne/eslint-plugin-vue-extra",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Extra ESLint rules for Vue projects",
5
5
  "license": "MIT",
6
6
  "keywords": [