11.0.2 • Published 10 months ago

@xwtec/eslint-config-vue v11.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 months ago

@xwtec/eslint-config-vue

ESLint Configuration for xwtec vue projects

Install

# with yarn
yarn add --dev eslint prettier @xwtec/eslint-config-vue

# with npm
npm install --save-dev eslint prettier @xwtec/eslint-config-vue

Configuration

.eslintrc.cjs format is recommended

module.exports = {
  extends: ['@xwtec/vue'],
};

Rules

Error

#TypeRuleDescription
1errorvue/comment-directivesupport comment-directives in <template>
2errorvue/jsx-uses-varsprevent variables used in JSX to be marked as unused
3errorvue/no-arrow-functions-in-watchdisallow using arrow functions to define watcher
4errorvue/no-async-in-computed-propertiesdisallow asynchronous actions in computed properties
5errorvue/no-child-contentdisallow element's child contents which would be overwritten by a directive like v-html or v-text
6errorvue/no-computed-properties-in-datadisallow accessing computed properties in data.
7errorvue/no-deprecated-dollar-listeners-apidisallow using deprecated $listeners (in Vue.js 3.0.0+)
8errorvue/no-deprecated-events-apidisallow using deprecated events api (in Vue.js 3.0.0+)
9errorvue/no-deprecated-filterdisallow using deprecated filters syntax (in Vue.js 3.0.0+)
10errorvue/no-deprecated-functional-templatedisallow using deprecated the functional template (in Vue.js 3.0.0+)
11errorvue/no-deprecated-html-element-isdisallow using deprecated the is attribute on HTML elements (in Vue.js 3.0.0+)
12errorvue/no-deprecated-inline-templatedisallow using deprecated inline-template attribute (in Vue.js 3.0.0+)
13errorvue/no-deprecated-props-default-thisdisallow deprecated this access in props default function (in Vue.js 3.0.0+)
14errorvue/no-deprecated-router-link-tag-propdisallow using deprecated tag property on RouterLink (in Vue.js 3.0.0+)
15errorvue/no-deprecated-v-on-native-modifierdisallow using deprecated .native modifiers (in Vue.js 3.0.0+)
16errorvue/no-deprecated-vue-config-keycodesdisallow using deprecated Vue.config.keyCodes (in Vue.js 3.0.0+)
17errorvue/no-dupe-keysdisallow duplication of field names
18errorvue/no-dupe-v-else-ifdisallow duplicate conditions in v-if / v-else-if chains
19errorvue/no-duplicate-attributesdisallow duplication of attributes
20errorvue/no-export-in-script-setupdisallow export in <script setup>
21errorvue/no-expose-after-awaitdisallow asynchronously registered expose
22errorvue/no-lifecycle-after-awaitdisallow asynchronously registered lifecycle hooks
23errorvue/no-parsing-errordisallow parsing errors in <template>
24errorvue/no-reserved-keysdisallow overwriting reserved keys
25errorvue/no-reserved-propsdisallow reserved names in props
26errorvue/no-setup-props-destructuredisallow destructuring of props passed to setup
27errorvue/no-side-effects-in-computed-propertiesdisallow side effects in computed properties
28errorvue/no-template-keydisallow key attribute on <template>
29errorvue/no-textarea-mustachedisallow mustaches in <textarea>
30errorvue/no-use-computed-property-like-methoddisallow use computed property like method
31errorvue/no-useless-template-attributesdisallow useless attribute on <template>
32errorvue/no-v-for-template-key-on-childdisallow key of <template v-for> placed on child elements
33errorvue/no-v-text-v-html-on-componentdisallow v-text / v-html on component
34errorvue/no-watch-after-awaitdisallow asynchronously registered watch
35errorvue/require-slots-as-functionsenforce properties of $slots to be used as a function
36errorvue/require-toggle-inside-transitionrequire control the display of the content inside <transition>
37errorvue/return-in-emits-validatorenforce that a return statement is present in emits validator
38errorvue/valid-attribute-namerequire valid attribute names
39errorvue/valid-define-emitsenforce valid defineEmits compiler macro
40errorvue/valid-define-propsenforce valid defineProps compiler macro
41errorvue/valid-v-bindenforce valid v-bind directives
42errorvue/valid-v-cloakenforce valid v-cloak directives
43errorvue/valid-v-elseenforce valid v-else directives
44errorvue/valid-v-else-ifenforce valid v-else-if directives
45errorvue/valid-v-forenforce valid v-for directives
46errorvue/valid-v-htmlenforce valid v-html directives
47errorvue/valid-v-ifenforce valid v-if directives
48errorvue/valid-v-isenforce valid v-is directives
49errorvue/valid-v-memoenforce valid v-memo directives
50errorvue/valid-v-modelenforce valid v-model directives
51errorvue/valid-v-onenforce valid v-on directives
52errorvue/valid-v-onceenforce valid v-once directives
53errorvue/valid-v-preenforce valid v-pre directives
54errorvue/valid-v-showenforce valid v-show directives
55errorvue/valid-v-slotenforce valid v-slot directives
56errorvue/valid-v-textenforce valid v-text directives

Warn

#TypeRuleDescription
1warnvue/no-mutating-propsdisallow mutation of component props
2warnvue/no-reserved-component-namesdisallow the use of reserved names in component definitions
3warnvue/no-unused-varsdisallow unused variable definitions of v-for directives or scope attributes
4warnvue/prop-name-casingenforce specific casing for the Prop name in Vue components
5warnvue/require-default-proprequire default value for props
6warnvue/require-render-returnenforce render function to always return value
7warnvue/require-valid-default-propenforce props default values to be valid
8warnvue/return-in-computed-propertyenforce that a return statement is present in computed property
9warnvue/valid-template-rootenforce valid template root
10warnvue/valid-v-bind-syncenforce valid .sync modifier on v-bind directives

Fixable

#TypeRuleDescription
1warnvue/attribute-hyphenationenforce attribute naming style on custom components in template
2warnvue/attributes-orderenforce order of attributes
3warnvue/block-orderenforce order of component top-level elements
4warnvue/component-name-in-template-casingenforce specific casing for the component naming style in template
5warnvue/component-tags-orderenforce order of component top-level elements
6warnvue/define-macros-orderenforce order of defineEmits and defineProps compiler macros
7warnvue/dot-notationEnforce dot notation whenever possible in <template>
8errorvue/eqeqeqRequire the use of === and !== in <template>
9warnvue/html-comment-content-spacingenforce unified spacing in HTML comments
10warnvue/html-self-closingenforce self-closing style
11warnvue/next-tick-styleenforce Promise or callback style in nextTick
12warnvue/no-deprecated-data-object-declarationdisallow using deprecated object declaration on data (in Vue.js 3.0.0+)
13warnvue/no-deprecated-dollar-scopedslots-apidisallow using deprecated $scopedSlots (in Vue.js 3.0.0+)
14warnvue/no-deprecated-scope-attributedisallow deprecated scope attribute (in Vue.js 2.5.0+)
15warnvue/no-deprecated-slot-scope-attributedisallow deprecated slot-scope attribute (in Vue.js 2.6.0+)
16warnvue/no-deprecated-v-isdisallow deprecated v-is directive (in Vue.js 3.1.0+)
17warnvue/no-deprecated-v-on-number-modifiersdisallow using deprecated number (keycode) modifiers (in Vue.js 3.0.0+)
18warnvue/no-ref-as-operanddisallow use of value wrapped by ref() (Composition API) as an operand
19warnvue/no-required-prop-with-defaultenforce props with default values to be optional
20warnvue/no-shared-component-dataenforce component's data property to be a function
21warnvue/no-unsupported-featuresdisallow unsupported Vue.js syntax on the specified version
22warnvue/no-useless-mustachesdisallow unnecessary mustache interpolations
23warnvue/no-useless-v-binddisallow unnecessary v-bind directives
24warnvue/object-shorthandRequire or disallow method and property shorthand syntax for object literals in <template>
25warnvue/order-in-componentsenforce order of properties in components
26warnvue/padding-line-between-blocksrequire or disallow padding lines between blocks
27warnvue/prefer-define-optionsenforce use of defineOptions instead of default export.
28warnvue/prefer-import-from-vueenforce import from 'vue' instead of import from '@vue/*'
29warnvue/prefer-separate-static-classrequire static class names in template to be in a separate class attribute
30warnvue/prefer-templateRequire template literals instead of string concatenation in <template>
31warnvue/require-prop-type-constructorrequire prop type to be a constructor
32errorvue/this-in-templatedisallow usage of this in template
33warnvue/v-bind-styleenforce v-bind directive style
34warnvue/v-for-delimiter-styleenforce v-for directive's delimiter style
35warnvue/v-on-event-hyphenationenforce v-on event naming style on custom components in template
36warnvue/v-on-styleenforce v-on directive style
37warnvue/v-slot-styleenforce v-slot directive style
38warnvue/valid-next-tickenforce valid nextTick function calls

Relative

Links

License

MIT © xwtec

10.4.0

10 months ago

11.0.2

10 months ago

11.0.0

10 months ago

11.0.1

10 months ago

10.0.0

2 years ago

10.0.1

2 years ago

10.2.0

2 years ago

9.3.0

2 years ago

10.1.0

2 years ago

10.3.0

2 years ago

9.2.3

2 years ago

9.2.2

2 years ago

9.2.1

2 years ago

9.1.1

3 years ago

9.1.0

3 years ago

9.2.0

2 years ago

9.0.2

3 years ago

9.0.1

3 years ago

9.0.0

3 years ago

8.4.1

3 years ago

8.4.0

3 years ago

8.3.1

3 years ago

8.3.0

3 years ago

8.2.0

3 years ago

8.1.1

3 years ago

8.1.0

3 years ago

8.0.5

3 years ago

8.0.4

3 years ago

8.0.3

3 years ago

8.0.2

3 years ago

8.0.1

3 years ago

8.0.0

3 years ago

7.2.1

3 years ago

7.2.0

3 years ago

7.1.4

3 years ago

7.1.3

3 years ago

7.1.2

3 years ago

7.1.1

4 years ago

7.1.0

4 years ago

7.0.2

4 years ago

7.0.1

4 years ago

7.0.0

4 years ago

6.3.1

4 years ago

6.3.0

4 years ago

6.2.1

4 years ago

6.2.0

4 years ago

6.1.1

4 years ago

6.1.0

4 years ago

6.0.17

4 years ago

6.0.16

4 years ago

6.0.15

4 years ago

6.0.14

4 years ago

6.0.13

4 years ago

6.0.12

4 years ago

6.0.11

4 years ago

6.0.10

4 years ago

6.0.9

4 years ago

6.0.8

4 years ago

6.0.7

4 years ago

6.0.6

4 years ago

6.0.5

4 years ago

6.0.4

4 years ago

6.0.3

4 years ago

6.0.2

5 years ago

5.2.6

5 years ago

5.2.5

5 years ago

5.2.4

5 years ago

5.2.3

5 years ago

5.2.2

5 years ago

5.2.1

5 years ago

5.2.0

5 years ago

5.1.4

5 years ago

5.1.3

5 years ago

5.1.2

5 years ago

5.1.1

5 years ago

5.1.0

5 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.1.12

5 years ago

4.1.11

5 years ago

4.1.10

5 years ago

4.1.9

5 years ago

4.1.8

5 years ago

4.1.7

5 years ago