eslint-plugin-turmag-special-rules 0.0.6 → 1.0.1

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Pavel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -27,12 +27,12 @@ pnpm add eslint-plugin-turmag-special-rules --save-dev
27
27
  In your [configuration file](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file), import the plugin `eslint-plugin-turmag-special-rules` and add `turmagEslintSpecialRules` to the `plugins` key:
28
28
 
29
29
  ```js
30
- import turmagEslintSpecialRules from "eslint-plugin-turmag-special-rules";
30
+ import turmagSpecialRules from "eslint-plugin-turmag-special-rules";
31
31
 
32
32
  export default [
33
33
  {
34
34
  plugins: {
35
- turmagEslintSpecialRules
35
+ 'turmag-special-rules': turmagSpecialRules
36
36
  }
37
37
  }
38
38
  ];
@@ -42,15 +42,15 @@ export default [
42
42
  Then configure the rules you want to use under the `rules` key.
43
43
 
44
44
  ```js
45
- import turmagEslintSpecialRules from "eslint-plugin-turmag-special-rules";
45
+ import turmagSpecialRules from "eslint-plugin-turmag-special-rules";
46
46
 
47
47
  export default [
48
48
  {
49
49
  plugins: {
50
- turmagEslintSpecialRules
50
+ 'turmag-special-rules': turmagSpecialRules
51
51
  },
52
52
  rules: {
53
- "turmagEslintSpecialRules/rule-name": "warn"
53
+ "turmag-special-rules/rule-name": "warn"
54
54
  }
55
55
  }
56
56
  ];
@@ -68,18 +68,20 @@ TODO: Run eslint-doc-generator to generate the configs list (or delete this sect
68
68
 
69
69
  ## Rules
70
70
 
71
- <!-- begin auto-generated rules list -->
72
-
73
- 🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
74
-
71
+ <!-- begin auto-generated rules list -->
72
+
73
+ 🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
74
+
75
75
  | Name                              | Description | 🔧 |
76
76
  | :----------------------------------------------------------------------------------- | :------------------------------------------------------------- | :- |
77
77
  | [add-vue-extension](docs/rules/add-vue-extension.md) | Require .vue in vue files | 🔧 |
78
78
  | [import-entities-by-column-or-line](docs/rules/import-entities-by-column-or-line.md) | Prefered column or line import | 🔧 |
79
79
  | [import-right-order](docs/rules/import-right-order.md) | Prefered right import order | 🔧 |
80
80
  | [prefer-true-attribute-shorthand](docs/rules/prefer-true-attribute-shorthand.md) | Require shorthand form attribute when `v-bind` value is `true` | 🔧 |
81
- | [use-shortest-alias](docs/rules/use-shortest-alias.md) | There are can be used shortest alias | 🔧 |
82
-
81
+ | [use-shortest-alias](docs/rules/use-shortest-alias.md) | There are can be used shortest alias | 🔧 |
82
+
83
83
  <!-- end auto-generated rules list -->
84
84
 
85
85
 
86
+ # License
87
+ This code is licensed under the [MIT](https://github.com/Turmag/turmag-eslint-special-rules/blob/main/LICENSE) License.
@@ -29,7 +29,7 @@ module.exports = {
29
29
 
30
30
  if (option !== 'always') return;
31
31
 
32
- if (node.directive && node.key.name !== 'bind' && node.value?.expression.value && node.value.expression.value === Boolean(node.value.expression.value)) {
32
+ if (node.directive && node.key.name !== 'bind' && node.value?.expression?.value && node.value.expression.value === Boolean(node.value.expression.value)) {
33
33
  const { argument } = node.key;
34
34
  if (!argument) return;
35
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-turmag-special-rules",
3
- "version": "0.0.6",
3
+ "version": "1.0.1",
4
4
  "description": "Special eslint rules for your awesome projects",
5
5
  "keywords": [
6
6
  "eslint",