diff --git a/.eslintrc.js b/.eslintrc.js index 3ee380685..25268dcdb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,64 +24,69 @@ module.exports = { 'no-console': 'off', 'semi': 'off', - // override/add rules settings here - "vue/attributes-order": ["warn", { - "order": [ - "GLOBAL", - "OTHER_ATTR", - "DEFINITION", - "TWO_WAY_BINDING", - "OTHER_DIRECTIVES", - "EVENTS", - "RENDER_MODIFIERS", - "CONTENT", - "CONDITIONALS", - ], - "alphabetical": false - }], - "vue/order-in-components": ["warn", { - "order": [ - ["template", "render"], - "extends", - "el", - "name", - "key", - "parent", - "functional", - ["delimiters", "comments"], - ["components", "directives", "filters"], - "mixins", - ["provide", "inject"], - "ROUTER_GUARDS", - "layout", - "middleware", - "validate", - "scrollToTop", - "transition", - "loading", - "inheritAttrs", - "model", - ["props", "propsData"], - "emits", - "setup", - "asyncData", - "data", - "fetch", - "head", - "computed", - "watch", - "watchQuery", - "LIFECYCLE_HOOKS", - "methods", - "renderError" - ] - }], - "vue/first-attribute-linebreak": ["warn", { - "singleline": "beside", - "multiline": "ignore" - }], - "vue/multi-word-component-names": ["warn"], - "vue/no-v-html": ["off"], + // override/add rules settings here + 'vue/attributes-order': ['warn', { + 'order': [ + 'GLOBAL', + 'OTHER_ATTR', + 'DEFINITION', + 'TWO_WAY_BINDING', + 'OTHER_DIRECTIVES', + 'EVENTS', + 'RENDER_MODIFIERS', + 'CONTENT', + 'CONDITIONALS', + ], + 'alphabetical': false + }], + 'vue/first-attribute-linebreak': ['warn', { + 'singleline': 'beside', + 'multiline': 'ignore' + }], + 'vue/html-indent': ['warn', 4], + 'vue/multi-word-component-names': ['warn'], + 'vue/no-mutating-props': ['warn'], + 'vue/no-unused-components': ['warn'], + 'vue/no-use-v-if-with-v-for': ['warn'], + 'vue/no-v-html': ['off'], + 'vue/order-in-components': ['warn', { + 'order': [ + ['template', 'render'], + 'extends', + 'el', + 'name', + 'key', + 'parent', + 'functional', + ['delimiters', 'comments'], + ['components', 'directives', 'filters'], + 'mixins', + ['provide', 'inject'], + 'ROUTER_GUARDS', + 'layout', + 'middleware', + 'validate', + 'scrollToTop', + 'transition', + 'loading', + 'inheritAttrs', + 'model', + ['props', 'propsData'], + 'emits', + 'setup', + 'asyncData', + 'data', + 'fetch', + 'head', + 'computed', + 'watch', + 'watchQuery', + 'LIFECYCLE_HOOKS', + 'methods', + 'renderError' + ] + }], + 'vue/require-v-for-key': ['warn'], }, parserOptions: { ecmaVersion: 2021, diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index 5daafa9fd..0db358d35 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -44,4 +44,4 @@ jobs: run: yarn build - name: Run ESLint - run: yarn eslint resources/js/**/*.js + run: yarn eslint resources/js/**/*.js resources/js/**/*.vue diff --git a/resources/js/app/components/json-editor/json-editor.vue b/resources/js/app/components/json-editor/json-editor.vue index ed40bab3c..0cc56abae 100644 --- a/resources/js/app/components/json-editor/json-editor.vue +++ b/resources/js/app/components/json-editor/json-editor.vue @@ -1,14 +1,11 @@