mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
feat(linter): mark vue 3 rules as recommended (#27717)
<sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
This commit is contained in:
1 parent
ba38c1de7b
commit
770ada4baa
36 files changed
+36
No files matched your search
@@ -80,6 +80,7 @@ declare_oxc_lint!(
|
||||
ComponentDefinitionNameCasing,
|
||||
vue,
|
||||
style,
|
||||
recommended,
|
||||
fix,
|
||||
config = CaseType,
|
||||
version = "1.68.0",
|
||||
|
||||
@@ -72,6 +72,7 @@ declare_oxc_lint!(
|
||||
NoArrowFunctionsInWatch,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.39.0",
|
||||
short_description = "This rule disallows using arrow functions when defining a watcher.",
|
||||
);
|
||||
|
||||
@@ -113,6 +113,7 @@ declare_oxc_lint!(
|
||||
NoAsyncInComputedProperties,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
none,
|
||||
config = NoAsyncInComputedProperties,
|
||||
version = "1.71.0",
|
||||
|
||||
@@ -68,6 +68,7 @@ declare_oxc_lint!(
|
||||
NoComputedPropertiesInData,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.67.0",
|
||||
short_description = "Disallow accessing computed properties inside `data()`.",
|
||||
);
|
||||
|
||||
@@ -52,6 +52,7 @@ declare_oxc_lint!(
|
||||
NoDeprecatedDataObjectDeclaration,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
pending, // fixer will be implemented later
|
||||
version = "1.62.0",
|
||||
short_description = "Disallow object declarations for `data` (in Vue.js 3.0.0+).",
|
||||
|
||||
@@ -62,6 +62,7 @@ declare_oxc_lint!(
|
||||
NoDeprecatedDeleteSet,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.62.0",
|
||||
short_description = "Disallow using deprecated `$set` / `$delete` (in Vue.js 3.0.0+).",
|
||||
);
|
||||
|
||||
@@ -63,6 +63,7 @@ declare_oxc_lint!(
|
||||
NoDeprecatedDestroyedLifecycle,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
fix,
|
||||
version = "1.35.0",
|
||||
short_description = "Disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks in Vue.js 3.0.0+.",
|
||||
|
||||
@@ -71,6 +71,7 @@ declare_oxc_lint!(
|
||||
NoDeprecatedEventsApi,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.62.0",
|
||||
short_description = "Disallow using deprecated Events API (`$on`, `$off`, `$once`) in Vue.js 3.0.0+.",
|
||||
);
|
||||
|
||||
@@ -85,6 +85,7 @@ declare_oxc_lint!(
|
||||
NoDeprecatedModelDefinition,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
pending,
|
||||
config = NoDeprecatedModelDefinition,
|
||||
version = "1.63.0",
|
||||
|
||||
@@ -64,6 +64,7 @@ declare_oxc_lint!(
|
||||
NoDeprecatedPropsDefaultThis,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
pending,
|
||||
version = "1.67.0",
|
||||
short_description = "Disallow deprecated `this` access in props default function (in Vue.js 3.0.0+).",
|
||||
|
||||
@@ -36,6 +36,7 @@ declare_oxc_lint!(
|
||||
NoDeprecatedVueConfigKeycodes,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.62.0",
|
||||
short_description = "Disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+).",
|
||||
);
|
||||
|
||||
@@ -81,6 +81,7 @@ declare_oxc_lint!(
|
||||
NoDupeKeys,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.70.0",
|
||||
config = NoDupeKeys,
|
||||
short_description = "Disallow duplication of field names.",
|
||||
|
||||
@@ -44,6 +44,7 @@ declare_oxc_lint!(
|
||||
NoExportInScriptSetup,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.20.0",
|
||||
short_description = "Disallow `export` in `<script setup>`.",
|
||||
);
|
||||
|
||||
@@ -58,6 +58,7 @@ declare_oxc_lint!(
|
||||
NoExposeAfterAwait,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.67.0",
|
||||
short_description = "Disallow asynchronously registered `expose`.",
|
||||
);
|
||||
|
||||
@@ -69,6 +69,7 @@ declare_oxc_lint!(
|
||||
NoLifecycleAfterAwait,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.39.0",
|
||||
short_description = "Disallow asynchronously registered lifecycle hooks.",
|
||||
);
|
||||
|
||||
@@ -71,6 +71,7 @@ declare_oxc_lint!(
|
||||
NoMultipleSlotArgs,
|
||||
vue,
|
||||
restriction,
|
||||
recommended,
|
||||
pending, // TODO: Remove second argument, Spread argument is possible not supported
|
||||
version = "1.15.0",
|
||||
short_description = "Disallow passing multiple arguments to scoped slots.",
|
||||
|
||||
@@ -80,6 +80,7 @@ declare_oxc_lint!(
|
||||
NoRequiredPropWithDefault,
|
||||
vue,
|
||||
suspicious,
|
||||
recommended,
|
||||
suggestion,
|
||||
version = "1.17.0",
|
||||
short_description = "Enforce props with default values to be optional.",
|
||||
|
||||
@@ -84,6 +84,7 @@ declare_oxc_lint!(
|
||||
NoReservedComponentNames,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
config = NoReservedComponentNames,
|
||||
version = "1.68.0",
|
||||
short_description = "Disallow Vue component names that collide with HTML / SVG element names (and optionally Vue built-in component names).",
|
||||
|
||||
@@ -114,6 +114,7 @@ declare_oxc_lint!(
|
||||
NoReservedKeys,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
config = NoReservedKeys,
|
||||
version = "1.69.0",
|
||||
short_description = "Disallow overwriting reserved Vue instance keys (e.g. `$data`, `$emit`) or using `_`-prefixed keys inside `data` / `asyncData`.",
|
||||
|
||||
@@ -93,6 +93,7 @@ declare_oxc_lint!(
|
||||
NoReservedProps,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
config = NoReservedProps,
|
||||
version = "1.69.0",
|
||||
short_description = "Disallow reserved attribute names (e.g. `key`, `ref`) from being used as prop names.",
|
||||
|
||||
@@ -60,6 +60,7 @@ declare_oxc_lint!(
|
||||
NoSharedComponentData,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
pending,
|
||||
version = "1.67.0",
|
||||
short_description = "Enforce that the `data` property of a Vue component definition is a function.",
|
||||
|
||||
@@ -70,6 +70,7 @@ declare_oxc_lint!(
|
||||
NoSideEffectsInComputedProperties,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
none,
|
||||
version = "1.70.0",
|
||||
short_description = "Disallow side effects in computed properties.",
|
||||
|
||||
@@ -68,6 +68,7 @@ declare_oxc_lint!(
|
||||
NoWatchAfterAwait,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.67.0",
|
||||
short_description = "Disallow asynchronously-registered `watch`.",
|
||||
);
|
||||
|
||||
@@ -40,6 +40,7 @@ declare_oxc_lint!(
|
||||
PreferImportFromVue,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
fix,
|
||||
version = "1.20.0",
|
||||
short_description = "Enforce imports from `vue` instead of `@vue/*`.",
|
||||
|
||||
@@ -99,6 +99,7 @@ declare_oxc_lint!(
|
||||
PropNameCasing,
|
||||
vue,
|
||||
style,
|
||||
recommended,
|
||||
config = Config,
|
||||
version = "1.69.0",
|
||||
short_description = "Enforce a specific casing (camelCase or snake_case) for Vue component prop names.",
|
||||
|
||||
@@ -74,6 +74,7 @@ declare_oxc_lint!(
|
||||
RequireDefaultProp,
|
||||
vue,
|
||||
style,
|
||||
recommended,
|
||||
version = "1.70.0",
|
||||
short_description = "Requires a default value to be set for props that are not marked as `required`.",
|
||||
);
|
||||
|
||||
@@ -70,6 +70,7 @@ declare_oxc_lint!(
|
||||
RequirePropTypeConstructor,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
fix,
|
||||
version = "1.68.0",
|
||||
short_description = "Require `props` type values to be a constructor function (e.g. `String`, `Number`, `Boolean`) rather than a string, number, or other literal.",
|
||||
|
||||
@@ -61,6 +61,7 @@ declare_oxc_lint!(
|
||||
RequirePropTypes,
|
||||
vue,
|
||||
style,
|
||||
recommended,
|
||||
version = "1.69.0",
|
||||
short_description = "This rule enforces that a props statement contains a type definition.",
|
||||
);
|
||||
|
||||
@@ -59,6 +59,7 @@ declare_oxc_lint!(
|
||||
RequireRenderReturn,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.67.0",
|
||||
short_description = "Enforce that a `render` function always returns a value.",
|
||||
);
|
||||
|
||||
@@ -60,6 +60,7 @@ declare_oxc_lint!(
|
||||
RequireSlotsAsFunctions,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.67.0",
|
||||
short_description = "Enforce properties of `$slots` to be used as functions.",
|
||||
);
|
||||
|
||||
@@ -76,6 +76,7 @@ declare_oxc_lint!(
|
||||
ReturnInComputedProperty,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
config = ReturnInComputedProperty,
|
||||
version = "1.63.0",
|
||||
short_description = "Enforce that a `return` statement is present in every computed property.",
|
||||
|
||||
@@ -71,6 +71,7 @@ declare_oxc_lint!(
|
||||
ReturnInEmitsValidator,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.67.0",
|
||||
short_description = "Enforce that a `return` statement is present in `emits` validators (in Vue.js 3.0.0+).",
|
||||
);
|
||||
|
||||
@@ -132,6 +132,7 @@ declare_oxc_lint!(
|
||||
ValidDefineEmits,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
pending, // TODO: removing empty `defineEmits` and merging multiple `defineEmits` calls
|
||||
version = "1.14.0",
|
||||
short_description = "Enforce valid usage of the `defineEmits` compiler macro in Vue.",
|
||||
|
||||
@@ -73,6 +73,7 @@ declare_oxc_lint!(
|
||||
ValidDefineOptions,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "1.67.0",
|
||||
short_description = "Enforce valid use of the `defineOptions` compiler macro.",
|
||||
);
|
||||
|
||||
@@ -132,6 +132,7 @@ declare_oxc_lint!(
|
||||
ValidDefineProps,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
pending, // TODO: removing empty `defineProps` and merging multiple `defineProps` calls
|
||||
version = "1.15.0",
|
||||
short_description = "Enforce valid usage of the `defineProps` compiler macro in Vue.",
|
||||
|
||||
@@ -78,6 +78,7 @@ declare_oxc_lint!(
|
||||
ValidNextTick,
|
||||
vue,
|
||||
correctness,
|
||||
recommended,
|
||||
fix,
|
||||
version = "1.67.0",
|
||||
short_description = "Enforce valid `nextTick` function calls.",
|
||||
|
||||
Reference in new issue
Block a user