@frabbit/eslint-config 1.2.0 → 1.3.0
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/dist/index.cjs +185 -14
- package/dist/index.js +185 -14
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -800,9 +800,12 @@ var unicorn = [
|
|
|
800
800
|
rules: {
|
|
801
801
|
"unicorn/better-regex": "error",
|
|
802
802
|
"unicorn/catch-error-name": "error",
|
|
803
|
-
"unicorn/
|
|
803
|
+
"unicorn/consistent-function-scoping": "off",
|
|
804
|
+
"unicorn/custom-error-definition": "off",
|
|
805
|
+
// 'unicorn/custom-error-definition': 'error',
|
|
804
806
|
"unicorn/error-message": "error",
|
|
805
807
|
"unicorn/escape-case": "error",
|
|
808
|
+
"unicorn/expiring-todo-comments": "error",
|
|
806
809
|
"unicorn/explicit-length-check": "error",
|
|
807
810
|
"unicorn/filename-case": [
|
|
808
811
|
"error",
|
|
@@ -811,53 +814,91 @@ var unicorn = [
|
|
|
811
814
|
ignore: [/^[A-Z]+\..*$/]
|
|
812
815
|
}
|
|
813
816
|
],
|
|
814
|
-
"unicorn/
|
|
817
|
+
"unicorn/import-index": "warn",
|
|
818
|
+
"unicorn/new-for-builtins": "off",
|
|
819
|
+
// 'unicorn/new-for-builtins': 'error',
|
|
820
|
+
"unicorn/no-abusive-eslint-disable": "error",
|
|
815
821
|
"unicorn/no-array-callback-reference": "error",
|
|
816
822
|
"unicorn/no-array-method-this-argument": "error",
|
|
817
823
|
"unicorn/no-array-push-push": "error",
|
|
818
824
|
"unicorn/no-console-spaces": "error",
|
|
819
|
-
"unicorn/no-
|
|
820
|
-
"unicorn/no-
|
|
825
|
+
"unicorn/no-fn-reference-in-iterator": "off",
|
|
826
|
+
"unicorn/no-for-loop": "warn",
|
|
827
|
+
// 'unicorn/no-for-loop': 'error',
|
|
828
|
+
"unicorn/no-hex-escape": "warn",
|
|
829
|
+
// 'unicorn/no-hex-escape': 'error',
|
|
821
830
|
"unicorn/no-instanceof-array": "error",
|
|
822
831
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
832
|
+
"unicorn/no-keyword-prefix": "warn",
|
|
823
833
|
"unicorn/no-lonely-if": "error",
|
|
834
|
+
"unicorn/no-nested-ternary": "warn",
|
|
824
835
|
"unicorn/no-new-array": "error",
|
|
825
836
|
"unicorn/no-new-buffer": "error",
|
|
837
|
+
"unicorn/no-null": "warn",
|
|
838
|
+
"unicorn/no-object-as-default-parameter": "warn",
|
|
839
|
+
"unicorn/no-process-exit": "error",
|
|
840
|
+
"unicorn/no-reduce": "off",
|
|
826
841
|
"unicorn/no-static-only-class": "error",
|
|
827
842
|
"unicorn/no-unnecessary-await": "error",
|
|
828
|
-
"unicorn/no-
|
|
829
|
-
"unicorn/
|
|
843
|
+
"unicorn/no-unreadable-array-destructuring": "off",
|
|
844
|
+
"unicorn/no-unsafe-regex": "warn",
|
|
845
|
+
"unicorn/no-unused-properties": "off",
|
|
846
|
+
"unicorn/no-useless-undefined": "warn",
|
|
847
|
+
"unicorn/no-zero-fractions": "warn",
|
|
848
|
+
// 'unicorn/no-zero-fractions': `error`,
|
|
849
|
+
"unicorn/number-literal-case": "error",
|
|
850
|
+
"unicorn/prefer-add-event-listener": "warn",
|
|
851
|
+
// 'unicorn/prefer-add-event-listener': 'error',
|
|
830
852
|
"unicorn/prefer-array-find": "error",
|
|
853
|
+
// 'unicorn/prefer-array-find': 'error',
|
|
831
854
|
"unicorn/prefer-array-flat-map": "error",
|
|
832
855
|
"unicorn/prefer-array-index-of": "error",
|
|
833
856
|
"unicorn/prefer-array-some": "error",
|
|
834
857
|
"unicorn/prefer-at": "error",
|
|
835
858
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
859
|
+
"unicorn/prefer-dataset": "warn",
|
|
836
860
|
"unicorn/prefer-date-now": "error",
|
|
837
861
|
"unicorn/prefer-dom-node-append": "error",
|
|
838
862
|
"unicorn/prefer-dom-node-dataset": "error",
|
|
839
863
|
"unicorn/prefer-dom-node-remove": "error",
|
|
840
864
|
"unicorn/prefer-dom-node-text-content": "error",
|
|
865
|
+
"unicorn/prefer-event-key": "off",
|
|
866
|
+
"unicorn/prefer-flat-map": "error",
|
|
841
867
|
"unicorn/prefer-includes": "error",
|
|
842
868
|
"unicorn/prefer-keyboard-event-key": "error",
|
|
843
869
|
"unicorn/prefer-math-trunc": "error",
|
|
844
|
-
"unicorn/prefer-modern-dom-apis": "
|
|
870
|
+
"unicorn/prefer-modern-dom-apis": "warn",
|
|
871
|
+
// 'unicorn/prefer-modern-dom-apis': 'error',
|
|
845
872
|
"unicorn/prefer-modern-math-apis": "error",
|
|
846
873
|
"unicorn/prefer-negative-index": "error",
|
|
874
|
+
"unicorn/prefer-node-append": "warn",
|
|
847
875
|
"unicorn/prefer-node-protocol": "error",
|
|
876
|
+
"unicorn/prefer-node-remove": "warn",
|
|
848
877
|
"unicorn/prefer-number-properties": "error",
|
|
849
|
-
"unicorn/prefer-optional-catch-binding": "
|
|
878
|
+
"unicorn/prefer-optional-catch-binding": "warn",
|
|
879
|
+
// 'unicorn/prefer-optional-catch-binding': 'error',
|
|
850
880
|
"unicorn/prefer-prototype-methods": "error",
|
|
851
|
-
"unicorn/prefer-query-selector": "
|
|
881
|
+
"unicorn/prefer-query-selector": "warn",
|
|
882
|
+
// 'unicorn/prefer-query-selector': 'error',
|
|
852
883
|
"unicorn/prefer-reflect-apply": "error",
|
|
853
884
|
"unicorn/prefer-regexp-test": "error",
|
|
885
|
+
"unicorn/prefer-replace-all": "warn",
|
|
886
|
+
"unicorn/prefer-set-has": "warn",
|
|
887
|
+
"unicorn/prefer-spread": "error",
|
|
888
|
+
"unicorn/prefer-starts-ends-with": "error",
|
|
854
889
|
"unicorn/prefer-string-replace-all": "error",
|
|
855
|
-
"unicorn/prefer-string-slice": "
|
|
890
|
+
"unicorn/prefer-string-slice": "warn",
|
|
891
|
+
// 'unicorn/prefer-string-slice': 'error',
|
|
856
892
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
857
893
|
"unicorn/prefer-string-trim-start-end": "error",
|
|
858
894
|
"unicorn/prefer-top-level-await": "error",
|
|
895
|
+
"unicorn/prefer-trim-start-end": "error",
|
|
859
896
|
"unicorn/prefer-type-error": "error",
|
|
860
|
-
"unicorn/
|
|
897
|
+
"unicorn/prevent-abbreviations": "off",
|
|
898
|
+
"unicorn/string-content": "off",
|
|
899
|
+
"unicorn/throw-new-error": "warn"
|
|
900
|
+
// 'unicorn/throw-new-error': 'error',
|
|
901
|
+
// 'unicorn/catch-error-name': 0,
|
|
861
902
|
}
|
|
862
903
|
}
|
|
863
904
|
];
|
|
@@ -907,7 +948,42 @@ var reactivityTransform = [
|
|
|
907
948
|
}
|
|
908
949
|
];
|
|
909
950
|
var vueCustomRules = {
|
|
951
|
+
"vue/attributes-order": [
|
|
952
|
+
"warn",
|
|
953
|
+
{
|
|
954
|
+
alphabetical: false,
|
|
955
|
+
order: [
|
|
956
|
+
"DEFINITION",
|
|
957
|
+
"LIST_RENDERING",
|
|
958
|
+
"CONDITIONALS",
|
|
959
|
+
"RENDER_MODIFIERS",
|
|
960
|
+
"GLOBAL",
|
|
961
|
+
"UNIQUE",
|
|
962
|
+
"TWO_WAY_BINDING",
|
|
963
|
+
"OTHER_DIRECTIVES",
|
|
964
|
+
"OTHER_ATTR",
|
|
965
|
+
"EVENTS",
|
|
966
|
+
"CONTENT"
|
|
967
|
+
]
|
|
968
|
+
}
|
|
969
|
+
],
|
|
910
970
|
"vue/block-order": ["error", { order: ["script", "template", "style"] }],
|
|
971
|
+
"vue/component-definition-name-casing": ["error", "PascalCase"],
|
|
972
|
+
"vue/component-name-in-template-casing": [
|
|
973
|
+
"error",
|
|
974
|
+
"kebab-case",
|
|
975
|
+
{
|
|
976
|
+
ignores: [],
|
|
977
|
+
registeredComponentsOnly: false
|
|
978
|
+
}
|
|
979
|
+
],
|
|
980
|
+
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
981
|
+
"vue/component-tags-order": [
|
|
982
|
+
"error",
|
|
983
|
+
{
|
|
984
|
+
order: ["docs", "template", "script", "style"]
|
|
985
|
+
}
|
|
986
|
+
],
|
|
911
987
|
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
912
988
|
"vue/eqeqeq": ["error", "smart"],
|
|
913
989
|
"vue/html-self-closing": [
|
|
@@ -922,14 +998,83 @@ var vueCustomRules = {
|
|
|
922
998
|
svg: "always"
|
|
923
999
|
}
|
|
924
1000
|
],
|
|
1001
|
+
"vue/match-component-import-name": "warn",
|
|
925
1002
|
"vue/max-attributes-per-line": "off",
|
|
926
1003
|
"vue/multi-word-component-names": "off",
|
|
1004
|
+
"vue/no-boolean-default": ["error", "default-false"],
|
|
927
1005
|
"vue/no-constant-condition": "warn",
|
|
1006
|
+
"vue/no-duplicate-attr-inheritance": "warn",
|
|
928
1007
|
"vue/no-empty-pattern": "error",
|
|
1008
|
+
"vue/no-irregular-whitespace": "error",
|
|
929
1009
|
"vue/no-loss-of-precision": "error",
|
|
1010
|
+
"vue/no-multiple-objects-in-class": "error",
|
|
1011
|
+
"vue/no-potential-component-option-typo": [
|
|
1012
|
+
"error",
|
|
1013
|
+
{
|
|
1014
|
+
presets: ["vue", "nuxt"],
|
|
1015
|
+
threshold: 5
|
|
1016
|
+
}
|
|
1017
|
+
],
|
|
1018
|
+
"vue/no-reserved-component-names": "error",
|
|
1019
|
+
"vue/no-static-inline-styles": [
|
|
1020
|
+
"error",
|
|
1021
|
+
{
|
|
1022
|
+
allowBinding: false
|
|
1023
|
+
}
|
|
1024
|
+
],
|
|
1025
|
+
"vue/no-this-in-before-route-enter": "error",
|
|
1026
|
+
// 'vue/no-restricted-static-attribute': [
|
|
1027
|
+
// 'error',
|
|
1028
|
+
// {
|
|
1029
|
+
// key: 'stlye',
|
|
1030
|
+
// message: 'Using "stlye" is not allowed. Use "style" instead.',
|
|
1031
|
+
// },
|
|
1032
|
+
// ],
|
|
1033
|
+
// 'vue/no-template-target-blank': [
|
|
1034
|
+
// 'error',
|
|
1035
|
+
// {
|
|
1036
|
+
// allowReferrer: true,
|
|
1037
|
+
// enforceDynamicLinks: 'always',
|
|
1038
|
+
// },
|
|
1039
|
+
// ],
|
|
1040
|
+
"vue/no-undef-components": [
|
|
1041
|
+
"error",
|
|
1042
|
+
{
|
|
1043
|
+
ignorePatterns: ["lazy-hydrate", "no-ssr", "client-only"]
|
|
1044
|
+
}
|
|
1045
|
+
],
|
|
1046
|
+
"vue/no-unsupported-features": [
|
|
1047
|
+
"error",
|
|
1048
|
+
{
|
|
1049
|
+
ignores: [],
|
|
1050
|
+
version: "^2.7.14"
|
|
1051
|
+
}
|
|
1052
|
+
],
|
|
1053
|
+
"vue/no-unused-properties": [
|
|
1054
|
+
"error",
|
|
1055
|
+
{
|
|
1056
|
+
groups: ["props", "data", "computed", "methods", "setup"],
|
|
1057
|
+
ignorePublicMembers: true
|
|
1058
|
+
}
|
|
1059
|
+
],
|
|
930
1060
|
"vue/no-unused-refs": "error",
|
|
931
|
-
"vue/no-useless-
|
|
1061
|
+
"vue/no-useless-concat": "warn",
|
|
1062
|
+
"vue/no-useless-mustaches": [
|
|
1063
|
+
"warn",
|
|
1064
|
+
{
|
|
1065
|
+
ignoreIncludesComment: true,
|
|
1066
|
+
ignoreStringEscape: true
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
"vue/no-useless-v-bind": [
|
|
1070
|
+
"warn",
|
|
1071
|
+
{
|
|
1072
|
+
ignoreIncludesComment: true,
|
|
1073
|
+
ignoreStringEscape: true
|
|
1074
|
+
}
|
|
1075
|
+
],
|
|
932
1076
|
"vue/no-v-html": "off",
|
|
1077
|
+
"vue/object-curly-spacing": "error",
|
|
933
1078
|
"vue/object-shorthand": [
|
|
934
1079
|
"error",
|
|
935
1080
|
"always",
|
|
@@ -939,9 +1084,35 @@ var vueCustomRules = {
|
|
|
939
1084
|
}
|
|
940
1085
|
],
|
|
941
1086
|
"vue/padding-line-between-blocks": ["error", "always"],
|
|
1087
|
+
"vue/prefer-prop-type-boolean-first": "error",
|
|
1088
|
+
"vue/prefer-separate-static-class": "error",
|
|
942
1089
|
"vue/prefer-template": "error",
|
|
943
|
-
"vue/
|
|
944
|
-
"vue/
|
|
1090
|
+
"vue/prefer-true-attribute-shorthand": "warn",
|
|
1091
|
+
"vue/prop-name-casing": ["error", "camelCase"],
|
|
1092
|
+
"vue/require-default-prop": "error",
|
|
1093
|
+
"vue/require-prop-types": "error",
|
|
1094
|
+
// TODO: отступы в <script>
|
|
1095
|
+
"vue/script-indent": [
|
|
1096
|
+
"error",
|
|
1097
|
+
2,
|
|
1098
|
+
{
|
|
1099
|
+
baseIndent: 1,
|
|
1100
|
+
ignores: [],
|
|
1101
|
+
switchCase: 1
|
|
1102
|
+
}
|
|
1103
|
+
],
|
|
1104
|
+
"vue/space-in-parens": "error",
|
|
1105
|
+
"vue/static-class-names-order": "off",
|
|
1106
|
+
"vue/v-on-handler-style": [
|
|
1107
|
+
"error",
|
|
1108
|
+
["method", "inline-function"],
|
|
1109
|
+
// ["method", "inline-function"] | ["method", "inline"] | "inline-function" | "inline"
|
|
1110
|
+
{
|
|
1111
|
+
ignoreIncludesComment: true
|
|
1112
|
+
}
|
|
1113
|
+
],
|
|
1114
|
+
"vue/valid-v-bind-sync": "error",
|
|
1115
|
+
"vue/valid-v-slot": "error"
|
|
945
1116
|
};
|
|
946
1117
|
var vue3Rules = {
|
|
947
1118
|
...pluginVue.configs.base.rules,
|
package/dist/index.js
CHANGED
|
@@ -701,9 +701,12 @@ var unicorn = [
|
|
|
701
701
|
rules: {
|
|
702
702
|
"unicorn/better-regex": "error",
|
|
703
703
|
"unicorn/catch-error-name": "error",
|
|
704
|
-
"unicorn/
|
|
704
|
+
"unicorn/consistent-function-scoping": "off",
|
|
705
|
+
"unicorn/custom-error-definition": "off",
|
|
706
|
+
// 'unicorn/custom-error-definition': 'error',
|
|
705
707
|
"unicorn/error-message": "error",
|
|
706
708
|
"unicorn/escape-case": "error",
|
|
709
|
+
"unicorn/expiring-todo-comments": "error",
|
|
707
710
|
"unicorn/explicit-length-check": "error",
|
|
708
711
|
"unicorn/filename-case": [
|
|
709
712
|
"error",
|
|
@@ -712,53 +715,91 @@ var unicorn = [
|
|
|
712
715
|
ignore: [/^[A-Z]+\..*$/]
|
|
713
716
|
}
|
|
714
717
|
],
|
|
715
|
-
"unicorn/
|
|
718
|
+
"unicorn/import-index": "warn",
|
|
719
|
+
"unicorn/new-for-builtins": "off",
|
|
720
|
+
// 'unicorn/new-for-builtins': 'error',
|
|
721
|
+
"unicorn/no-abusive-eslint-disable": "error",
|
|
716
722
|
"unicorn/no-array-callback-reference": "error",
|
|
717
723
|
"unicorn/no-array-method-this-argument": "error",
|
|
718
724
|
"unicorn/no-array-push-push": "error",
|
|
719
725
|
"unicorn/no-console-spaces": "error",
|
|
720
|
-
"unicorn/no-
|
|
721
|
-
"unicorn/no-
|
|
726
|
+
"unicorn/no-fn-reference-in-iterator": "off",
|
|
727
|
+
"unicorn/no-for-loop": "warn",
|
|
728
|
+
// 'unicorn/no-for-loop': 'error',
|
|
729
|
+
"unicorn/no-hex-escape": "warn",
|
|
730
|
+
// 'unicorn/no-hex-escape': 'error',
|
|
722
731
|
"unicorn/no-instanceof-array": "error",
|
|
723
732
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
733
|
+
"unicorn/no-keyword-prefix": "warn",
|
|
724
734
|
"unicorn/no-lonely-if": "error",
|
|
735
|
+
"unicorn/no-nested-ternary": "warn",
|
|
725
736
|
"unicorn/no-new-array": "error",
|
|
726
737
|
"unicorn/no-new-buffer": "error",
|
|
738
|
+
"unicorn/no-null": "warn",
|
|
739
|
+
"unicorn/no-object-as-default-parameter": "warn",
|
|
740
|
+
"unicorn/no-process-exit": "error",
|
|
741
|
+
"unicorn/no-reduce": "off",
|
|
727
742
|
"unicorn/no-static-only-class": "error",
|
|
728
743
|
"unicorn/no-unnecessary-await": "error",
|
|
729
|
-
"unicorn/no-
|
|
730
|
-
"unicorn/
|
|
744
|
+
"unicorn/no-unreadable-array-destructuring": "off",
|
|
745
|
+
"unicorn/no-unsafe-regex": "warn",
|
|
746
|
+
"unicorn/no-unused-properties": "off",
|
|
747
|
+
"unicorn/no-useless-undefined": "warn",
|
|
748
|
+
"unicorn/no-zero-fractions": "warn",
|
|
749
|
+
// 'unicorn/no-zero-fractions': `error`,
|
|
750
|
+
"unicorn/number-literal-case": "error",
|
|
751
|
+
"unicorn/prefer-add-event-listener": "warn",
|
|
752
|
+
// 'unicorn/prefer-add-event-listener': 'error',
|
|
731
753
|
"unicorn/prefer-array-find": "error",
|
|
754
|
+
// 'unicorn/prefer-array-find': 'error',
|
|
732
755
|
"unicorn/prefer-array-flat-map": "error",
|
|
733
756
|
"unicorn/prefer-array-index-of": "error",
|
|
734
757
|
"unicorn/prefer-array-some": "error",
|
|
735
758
|
"unicorn/prefer-at": "error",
|
|
736
759
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
760
|
+
"unicorn/prefer-dataset": "warn",
|
|
737
761
|
"unicorn/prefer-date-now": "error",
|
|
738
762
|
"unicorn/prefer-dom-node-append": "error",
|
|
739
763
|
"unicorn/prefer-dom-node-dataset": "error",
|
|
740
764
|
"unicorn/prefer-dom-node-remove": "error",
|
|
741
765
|
"unicorn/prefer-dom-node-text-content": "error",
|
|
766
|
+
"unicorn/prefer-event-key": "off",
|
|
767
|
+
"unicorn/prefer-flat-map": "error",
|
|
742
768
|
"unicorn/prefer-includes": "error",
|
|
743
769
|
"unicorn/prefer-keyboard-event-key": "error",
|
|
744
770
|
"unicorn/prefer-math-trunc": "error",
|
|
745
|
-
"unicorn/prefer-modern-dom-apis": "
|
|
771
|
+
"unicorn/prefer-modern-dom-apis": "warn",
|
|
772
|
+
// 'unicorn/prefer-modern-dom-apis': 'error',
|
|
746
773
|
"unicorn/prefer-modern-math-apis": "error",
|
|
747
774
|
"unicorn/prefer-negative-index": "error",
|
|
775
|
+
"unicorn/prefer-node-append": "warn",
|
|
748
776
|
"unicorn/prefer-node-protocol": "error",
|
|
777
|
+
"unicorn/prefer-node-remove": "warn",
|
|
749
778
|
"unicorn/prefer-number-properties": "error",
|
|
750
|
-
"unicorn/prefer-optional-catch-binding": "
|
|
779
|
+
"unicorn/prefer-optional-catch-binding": "warn",
|
|
780
|
+
// 'unicorn/prefer-optional-catch-binding': 'error',
|
|
751
781
|
"unicorn/prefer-prototype-methods": "error",
|
|
752
|
-
"unicorn/prefer-query-selector": "
|
|
782
|
+
"unicorn/prefer-query-selector": "warn",
|
|
783
|
+
// 'unicorn/prefer-query-selector': 'error',
|
|
753
784
|
"unicorn/prefer-reflect-apply": "error",
|
|
754
785
|
"unicorn/prefer-regexp-test": "error",
|
|
786
|
+
"unicorn/prefer-replace-all": "warn",
|
|
787
|
+
"unicorn/prefer-set-has": "warn",
|
|
788
|
+
"unicorn/prefer-spread": "error",
|
|
789
|
+
"unicorn/prefer-starts-ends-with": "error",
|
|
755
790
|
"unicorn/prefer-string-replace-all": "error",
|
|
756
|
-
"unicorn/prefer-string-slice": "
|
|
791
|
+
"unicorn/prefer-string-slice": "warn",
|
|
792
|
+
// 'unicorn/prefer-string-slice': 'error',
|
|
757
793
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
758
794
|
"unicorn/prefer-string-trim-start-end": "error",
|
|
759
795
|
"unicorn/prefer-top-level-await": "error",
|
|
796
|
+
"unicorn/prefer-trim-start-end": "error",
|
|
760
797
|
"unicorn/prefer-type-error": "error",
|
|
761
|
-
"unicorn/
|
|
798
|
+
"unicorn/prevent-abbreviations": "off",
|
|
799
|
+
"unicorn/string-content": "off",
|
|
800
|
+
"unicorn/throw-new-error": "warn"
|
|
801
|
+
// 'unicorn/throw-new-error': 'error',
|
|
802
|
+
// 'unicorn/catch-error-name': 0,
|
|
762
803
|
}
|
|
763
804
|
}
|
|
764
805
|
];
|
|
@@ -808,7 +849,42 @@ var reactivityTransform = [
|
|
|
808
849
|
}
|
|
809
850
|
];
|
|
810
851
|
var vueCustomRules = {
|
|
852
|
+
"vue/attributes-order": [
|
|
853
|
+
"warn",
|
|
854
|
+
{
|
|
855
|
+
alphabetical: false,
|
|
856
|
+
order: [
|
|
857
|
+
"DEFINITION",
|
|
858
|
+
"LIST_RENDERING",
|
|
859
|
+
"CONDITIONALS",
|
|
860
|
+
"RENDER_MODIFIERS",
|
|
861
|
+
"GLOBAL",
|
|
862
|
+
"UNIQUE",
|
|
863
|
+
"TWO_WAY_BINDING",
|
|
864
|
+
"OTHER_DIRECTIVES",
|
|
865
|
+
"OTHER_ATTR",
|
|
866
|
+
"EVENTS",
|
|
867
|
+
"CONTENT"
|
|
868
|
+
]
|
|
869
|
+
}
|
|
870
|
+
],
|
|
811
871
|
"vue/block-order": ["error", { order: ["script", "template", "style"] }],
|
|
872
|
+
"vue/component-definition-name-casing": ["error", "PascalCase"],
|
|
873
|
+
"vue/component-name-in-template-casing": [
|
|
874
|
+
"error",
|
|
875
|
+
"kebab-case",
|
|
876
|
+
{
|
|
877
|
+
ignores: [],
|
|
878
|
+
registeredComponentsOnly: false
|
|
879
|
+
}
|
|
880
|
+
],
|
|
881
|
+
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
882
|
+
"vue/component-tags-order": [
|
|
883
|
+
"error",
|
|
884
|
+
{
|
|
885
|
+
order: ["docs", "template", "script", "style"]
|
|
886
|
+
}
|
|
887
|
+
],
|
|
812
888
|
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
813
889
|
"vue/eqeqeq": ["error", "smart"],
|
|
814
890
|
"vue/html-self-closing": [
|
|
@@ -823,14 +899,83 @@ var vueCustomRules = {
|
|
|
823
899
|
svg: "always"
|
|
824
900
|
}
|
|
825
901
|
],
|
|
902
|
+
"vue/match-component-import-name": "warn",
|
|
826
903
|
"vue/max-attributes-per-line": "off",
|
|
827
904
|
"vue/multi-word-component-names": "off",
|
|
905
|
+
"vue/no-boolean-default": ["error", "default-false"],
|
|
828
906
|
"vue/no-constant-condition": "warn",
|
|
907
|
+
"vue/no-duplicate-attr-inheritance": "warn",
|
|
829
908
|
"vue/no-empty-pattern": "error",
|
|
909
|
+
"vue/no-irregular-whitespace": "error",
|
|
830
910
|
"vue/no-loss-of-precision": "error",
|
|
911
|
+
"vue/no-multiple-objects-in-class": "error",
|
|
912
|
+
"vue/no-potential-component-option-typo": [
|
|
913
|
+
"error",
|
|
914
|
+
{
|
|
915
|
+
presets: ["vue", "nuxt"],
|
|
916
|
+
threshold: 5
|
|
917
|
+
}
|
|
918
|
+
],
|
|
919
|
+
"vue/no-reserved-component-names": "error",
|
|
920
|
+
"vue/no-static-inline-styles": [
|
|
921
|
+
"error",
|
|
922
|
+
{
|
|
923
|
+
allowBinding: false
|
|
924
|
+
}
|
|
925
|
+
],
|
|
926
|
+
"vue/no-this-in-before-route-enter": "error",
|
|
927
|
+
// 'vue/no-restricted-static-attribute': [
|
|
928
|
+
// 'error',
|
|
929
|
+
// {
|
|
930
|
+
// key: 'stlye',
|
|
931
|
+
// message: 'Using "stlye" is not allowed. Use "style" instead.',
|
|
932
|
+
// },
|
|
933
|
+
// ],
|
|
934
|
+
// 'vue/no-template-target-blank': [
|
|
935
|
+
// 'error',
|
|
936
|
+
// {
|
|
937
|
+
// allowReferrer: true,
|
|
938
|
+
// enforceDynamicLinks: 'always',
|
|
939
|
+
// },
|
|
940
|
+
// ],
|
|
941
|
+
"vue/no-undef-components": [
|
|
942
|
+
"error",
|
|
943
|
+
{
|
|
944
|
+
ignorePatterns: ["lazy-hydrate", "no-ssr", "client-only"]
|
|
945
|
+
}
|
|
946
|
+
],
|
|
947
|
+
"vue/no-unsupported-features": [
|
|
948
|
+
"error",
|
|
949
|
+
{
|
|
950
|
+
ignores: [],
|
|
951
|
+
version: "^2.7.14"
|
|
952
|
+
}
|
|
953
|
+
],
|
|
954
|
+
"vue/no-unused-properties": [
|
|
955
|
+
"error",
|
|
956
|
+
{
|
|
957
|
+
groups: ["props", "data", "computed", "methods", "setup"],
|
|
958
|
+
ignorePublicMembers: true
|
|
959
|
+
}
|
|
960
|
+
],
|
|
831
961
|
"vue/no-unused-refs": "error",
|
|
832
|
-
"vue/no-useless-
|
|
962
|
+
"vue/no-useless-concat": "warn",
|
|
963
|
+
"vue/no-useless-mustaches": [
|
|
964
|
+
"warn",
|
|
965
|
+
{
|
|
966
|
+
ignoreIncludesComment: true,
|
|
967
|
+
ignoreStringEscape: true
|
|
968
|
+
}
|
|
969
|
+
],
|
|
970
|
+
"vue/no-useless-v-bind": [
|
|
971
|
+
"warn",
|
|
972
|
+
{
|
|
973
|
+
ignoreIncludesComment: true,
|
|
974
|
+
ignoreStringEscape: true
|
|
975
|
+
}
|
|
976
|
+
],
|
|
833
977
|
"vue/no-v-html": "off",
|
|
978
|
+
"vue/object-curly-spacing": "error",
|
|
834
979
|
"vue/object-shorthand": [
|
|
835
980
|
"error",
|
|
836
981
|
"always",
|
|
@@ -840,9 +985,35 @@ var vueCustomRules = {
|
|
|
840
985
|
}
|
|
841
986
|
],
|
|
842
987
|
"vue/padding-line-between-blocks": ["error", "always"],
|
|
988
|
+
"vue/prefer-prop-type-boolean-first": "error",
|
|
989
|
+
"vue/prefer-separate-static-class": "error",
|
|
843
990
|
"vue/prefer-template": "error",
|
|
844
|
-
"vue/
|
|
845
|
-
"vue/
|
|
991
|
+
"vue/prefer-true-attribute-shorthand": "warn",
|
|
992
|
+
"vue/prop-name-casing": ["error", "camelCase"],
|
|
993
|
+
"vue/require-default-prop": "error",
|
|
994
|
+
"vue/require-prop-types": "error",
|
|
995
|
+
// TODO: отступы в <script>
|
|
996
|
+
"vue/script-indent": [
|
|
997
|
+
"error",
|
|
998
|
+
2,
|
|
999
|
+
{
|
|
1000
|
+
baseIndent: 1,
|
|
1001
|
+
ignores: [],
|
|
1002
|
+
switchCase: 1
|
|
1003
|
+
}
|
|
1004
|
+
],
|
|
1005
|
+
"vue/space-in-parens": "error",
|
|
1006
|
+
"vue/static-class-names-order": "off",
|
|
1007
|
+
"vue/v-on-handler-style": [
|
|
1008
|
+
"error",
|
|
1009
|
+
["method", "inline-function"],
|
|
1010
|
+
// ["method", "inline-function"] | ["method", "inline"] | "inline-function" | "inline"
|
|
1011
|
+
{
|
|
1012
|
+
ignoreIncludesComment: true
|
|
1013
|
+
}
|
|
1014
|
+
],
|
|
1015
|
+
"vue/valid-v-bind-sync": "error",
|
|
1016
|
+
"vue/valid-v-slot": "error"
|
|
846
1017
|
};
|
|
847
1018
|
var vue3Rules = {
|
|
848
1019
|
...pluginVue.configs.base.rules,
|