@ntnyq/eslint-config 7.0.0-beta.21 → 7.0.0-beta.22

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.d.mts CHANGED
@@ -5047,6 +5047,11 @@ interface RuleOptions {
5047
5047
  * @see https://eslint-plugin.ntnyq.com/rules/no-only-tests.html
5048
5048
  */
5049
5049
  'ntnyq/no-only-tests'?: Linter.RuleEntry<NtnyqNoOnlyTests>;
5050
+ /**
5051
+ * disallow specified binding names in selected regions and scopes
5052
+ * @see https://eslint-plugin.ntnyq.com/rules/no-restricted-bindings.html
5053
+ */
5054
+ 'ntnyq/no-restricted-bindings'?: Linter.RuleEntry<NtnyqNoRestrictedBindings>;
5050
5055
  /**
5051
5056
  * require a newline after file header
5052
5057
  * @see https://eslint-plugin.ntnyq.com/rules/prefer-newline-after-file-header.html
@@ -8799,6 +8804,21 @@ interface RuleOptions {
8799
8804
  * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/callback-style.md
8800
8805
  */
8801
8806
  'vue-perfectionist/callback-style'?: Linter.RuleEntry<VuePerfectionistCallbackStyle>;
8807
+ /**
8808
+ * enforce configured prop value types at Vue component usage sites.
8809
+ * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/component-prop-types.md
8810
+ */
8811
+ 'vue-perfectionist/component-prop-types'?: Linter.RuleEntry<VuePerfectionistComponentPropTypes>;
8812
+ /**
8813
+ * enforce configured prop value constraints at Vue component usage sites.
8814
+ * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/component-prop-values.md
8815
+ */
8816
+ 'vue-perfectionist/component-prop-values'?: Linter.RuleEntry<VuePerfectionistComponentPropValues>;
8817
+ /**
8818
+ * require template ref variable names to match their keys.
8819
+ * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/consistent-template-ref-name.md
8820
+ */
8821
+ 'vue-perfectionist/consistent-template-ref-name'?: Linter.RuleEntry<[]>;
8802
8822
  /**
8803
8823
  * require multiline inline declarations in Vue compiler macros.
8804
8824
  * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/define-macros-newline.md
@@ -8809,6 +8829,11 @@ interface RuleOptions {
8809
8829
  * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/prefer-ref-pattern.md
8810
8830
  */
8811
8831
  'vue-perfectionist/prefer-ref-pattern'?: Linter.RuleEntry<VuePerfectionistPreferRefPattern>;
8832
+ /**
8833
+ * require configured props at Vue component usage sites.
8834
+ * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/require-component-props.md
8835
+ */
8836
+ 'vue-perfectionist/require-component-props'?: Linter.RuleEntry<VuePerfectionistRequireComponentProps>;
8812
8837
  /**
8813
8838
  * enforce consistent ordering of Vue 3 script setup statements.
8814
8839
  * @see https://github.com/ntnyq/eslint-plugin-vue-perfectionist/blob/main/docs/rules/sort-script-setup.md
@@ -14251,6 +14276,16 @@ type NtnyqNoOnlyTests = [] | [{
14251
14276
  functions?: string[];
14252
14277
  fix?: boolean;
14253
14278
  }];
14279
+ // ----- ntnyq/no-restricted-bindings -----
14280
+ type NtnyqNoRestrictedBindings = [] | [{
14281
+ restrictions: {
14282
+ names: [string, ...(string)[]];
14283
+ regions?: [("script" | "vue-script" | "vue-script-setup"), ...(("script" | "vue-script" | "vue-script-setup"))[]];
14284
+ scope?: ("top-level" | "nested" | "all");
14285
+ except?: ("catch-parameter")[];
14286
+ message?: string;
14287
+ }[];
14288
+ }];
14254
14289
  // ----- ntnyq/prefer-newline-after-file-header -----
14255
14290
  type NtnyqPreferNewlineAfterFileHeader = [] | [{
14256
14291
  tags?: string[];
@@ -19077,6 +19112,37 @@ type VuePerfectionistCallbackStyle = [] | [{
19077
19112
  callbackIndices: [number, ...(number)[]];
19078
19113
  }[];
19079
19114
  }];
19115
+ // ----- vue-perfectionist/component-prop-types -----
19116
+ type VuePerfectionistComponentPropTypes = [] | [{
19117
+ targets?: {
19118
+ components: [string, ...(string)[]];
19119
+ props: {
19120
+ [k: string]: ((("string" | "number" | "boolean" | "array" | "object" | "function" | "bigint" | "symbol" | "null" | "undefined") | [("string" | "number" | "boolean" | "array" | "object" | "function" | "bigint" | "symbol" | "null" | "undefined"), ...(("string" | "number" | "boolean" | "array" | "object" | "function" | "bigint" | "symbol" | "null" | "undefined"))[]]) | {
19121
+ type: (("string" | "number" | "boolean" | "array" | "object" | "function" | "bigint" | "symbol" | "null" | "undefined") | [("string" | "number" | "boolean" | "array" | "object" | "function" | "bigint" | "symbol" | "null" | "undefined"), ...(("string" | "number" | "boolean" | "array" | "object" | "function" | "bigint" | "symbol" | "null" | "undefined"))[]]);
19122
+ booleanCasting?: boolean;
19123
+ }) | undefined;
19124
+ };
19125
+ }[];
19126
+ unknownValues?: ("ignore" | "report");
19127
+ }];
19128
+ // ----- vue-perfectionist/component-prop-values -----
19129
+ type VuePerfectionistComponentPropValues = [] | [{
19130
+ targets?: {
19131
+ components: [string, ...(string)[]];
19132
+ props: {
19133
+ [k: string]: {
19134
+ maximum?: number;
19135
+ minimum?: number;
19136
+ enum?: [(string | number | boolean | null), ...((string | number | boolean | null))[]];
19137
+ maxLength?: number;
19138
+ minLength?: number;
19139
+ multipleOf?: number;
19140
+ pattern?: string;
19141
+ } | undefined;
19142
+ };
19143
+ }[];
19144
+ unknownValues?: ("ignore" | "report");
19145
+ }];
19080
19146
  // ----- vue-perfectionist/define-macros-newline -----
19081
19147
  type VuePerfectionistDefineMacrosNewline = [] | [{
19082
19148
  macros?: ("defineProps" | "defineEmits" | "defineSlots" | "defineExpose" | "defineOptions")[];
@@ -19086,6 +19152,14 @@ type VuePerfectionistPreferRefPattern = [] | [{
19086
19152
  pattern?: string;
19087
19153
  targets?: ("template" | "useTemplateRef" | "render")[];
19088
19154
  }];
19155
+ // ----- vue-perfectionist/require-component-props -----
19156
+ type VuePerfectionistRequireComponentProps = [] | [{
19157
+ targets?: {
19158
+ components: [string, ...(string)[]];
19159
+ props: [string, ...(string)[]];
19160
+ }[];
19161
+ unknownBindings?: ("report" | "ignore");
19162
+ }];
19089
19163
  // ----- vue-perfectionist/sort-script-setup -----
19090
19164
  type VuePerfectionistSortScriptSetup = [] | [{
19091
19165
  newlinesInside?: ((number | "ignore") | "newlinesBetween");
package/dist/index.mjs CHANGED
@@ -639,6 +639,7 @@ const configVue = (options = {}) => {
639
639
  plugins: { "vue-perfectionist": pluginVuePerfectionist },
640
640
  rules: {
641
641
  "vue-perfectionist/callback-style": "error",
642
+ "vue-perfectionist/consistent-template-ref-name": "error",
642
643
  "vue-perfectionist/define-macros-newline": "error",
643
644
  "vue-perfectionist/prefer-ref-pattern": "error",
644
645
  "vue-perfectionist/sort-script-setup": ["error", { groups: [
@@ -1667,6 +1668,17 @@ const configNtnyq = (options = {}) => [{
1667
1668
  rules: {
1668
1669
  "ntnyq/no-duplicate-exports": "error",
1669
1670
  "ntnyq/no-explicit-void-return-type": "error",
1671
+ "ntnyq/no-restricted-bindings": ["error", { restrictions: [{
1672
+ message: "Use a domain name such as requestError; reserve error for catch parameters.",
1673
+ names: ["error"],
1674
+ except: ["catch-parameter"],
1675
+ regions: [
1676
+ "script",
1677
+ "vue-script",
1678
+ "vue-script-setup"
1679
+ ],
1680
+ scope: "top-level"
1681
+ }] }],
1670
1682
  "ntnyq/prefer-newline-after-file-header": "error",
1671
1683
  "ntnyq/prefer-object-method-syntax": ["error", {
1672
1684
  allowArrowFunctions: "singleLineOnly",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "7.0.0-beta.21",
4
+ "version": "7.0.0-beta.22",
5
5
  "description": "An opinionated ESLint config preset of ntnyq",
6
6
  "keywords": [
7
7
  "eslint",
@@ -107,7 +107,7 @@
107
107
  "eslint-plugin-jsonc": "^3.4.2",
108
108
  "eslint-plugin-n": "^18.3.0",
109
109
  "eslint-plugin-no-only-tests": "^3.4.0",
110
- "eslint-plugin-ntnyq": "^0.17.0",
110
+ "eslint-plugin-ntnyq": "^0.18.1",
111
111
  "eslint-plugin-oxfmt": "^0.25.0",
112
112
  "eslint-plugin-perfectionist": "^5.12.0",
113
113
  "eslint-plugin-pinia": "^0.4.2",
@@ -116,8 +116,8 @@
116
116
  "eslint-plugin-svgo": "^0.14.0",
117
117
  "eslint-plugin-toml": "^1.5.0",
118
118
  "eslint-plugin-unicorn": "^76.0.0",
119
- "eslint-plugin-vue": "^10.11.0",
120
- "eslint-plugin-vue-perfectionist": "^0.2.0",
119
+ "eslint-plugin-vue": "^10.11.1",
120
+ "eslint-plugin-vue-perfectionist": "^0.3.0",
121
121
  "eslint-plugin-yml": "^3.8.1",
122
122
  "eslint-processor-vue-blocks": "^2.0.0",
123
123
  "globals": "^17.12.0",
@@ -141,7 +141,7 @@
141
141
  "nano-staged": "^1.0.2",
142
142
  "npm-run-all2": "^9.0.3",
143
143
  "oxfmt": "^0.70.0",
144
- "prettier": "^3.9.8",
144
+ "prettier": "^3.9.9",
145
145
  "tinyglobby": "^0.2.17",
146
146
  "tsdown": "^0.23.0",
147
147
  "tsx": "^4.23.15",