diff --git a/.eslintrc.js b/.eslintrc.js index 609511e..2ffe6c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,11 +4,8 @@ module.exports = { browser: true, node: true }, - parserOptions: { - parser: 'babel-eslint' - }, extends: [ - '@nuxtjs', + '@nuxtjs/eslint-config-typescript', 'prettier', 'prettier/vue', 'plugin:prettier/recommended', @@ -19,6 +16,8 @@ module.exports = { ], // add your custom rules here rules: { - "no-console": 0 + 'no-console': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'camelcase': 'warn' } } diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 0f6ae0b..b7afd4d 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -25,6 +25,10 @@ Additionally, prefix component names with the following: | UI Component that are made for user data input |=== +### No outer margins on components + +Components should not include any king of spacing on the component's root element: components and pages that includes a component should be responsible for its spacing relative to the other elements included. + ### Inheritance [%header, cols=2*] @@ -81,24 +85,23 @@ For each mutation, when the API request fails, handle the error by showing the u Each mutation should return... -When the action succeeded :: - `[true, object, null]` with `object` the value returned by the matching mutation, or the inner action's `object` return value. +When the action succeededs :: + `{ data: object, error: null]` with `object` the value returned by the matching mutation, or the inner action's `object` return value. When the action fails because of a validation error :: - `[false, validation, 'validation']` with `validation` the value returned by the `validate` getter, or by the inner action's `validation` return value + `{ data: validation, error: 'validation'}` with `validation` the value returned by the `validate` getter, or by the inner action's `validation` return value When the action fails because of a network error :: - `[false, error, 'network']` with `error` the error object from the `try`/`catch` block. + `{ data: error, error: 'network'}` with `error` the error object from the `try`/`catch` block. -More generally, the return value is an array with: +More generally, the return value is an object with: -1. whether the action succeeded or not -2. the object/array that results from the underlying mutation -3. the failure level, if any. If it succeeded, this is `null`. +1. the object/array that results from the underlying mutation +2. the failure level, if any. If it succeeded, this is `null`. Include the following actions: -load({ force: false, verbose: true }) :: +load({ force: false, verbose: false }) :: - If `loaded` is false or `force` is true ** Do a `GET` request ** Use the `SET` mutation to store the response in the store @@ -163,32 +166,10 @@ order(objects, { by: '_your_default_sorting_method_' }) :: ## Code clarity guidelines ### In vue files'