Skip to content

Commit

Permalink
✨ feature/#16 - Visual rework
Browse files Browse the repository at this point in the history
- rework
  • Loading branch information
loicngr committed Feb 7, 2024
1 parent 58706e5 commit 0920c39
Show file tree
Hide file tree
Showing 44 changed files with 1,183 additions and 525 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/dist
/src-capacitor
/src-cordova
/src-pwa
/.quasar
/node_modules
.eslintrc.js
/src-ssr
/quasar.config.*.temporary.compiled*
.gitignore
quasar.config.js
199 changes: 126 additions & 73 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ module.exports = {
// https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
// Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
// `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
parser: 'vue-eslint-parser',
parserOptions: {
parser: require.resolve('@typescript-eslint/parser'),
extraFileExtensions: [ '.vue' ]
extraFileExtensions: [ '.vue' ],
project: './tsconfig.json',
},

env: {
Expand All @@ -21,38 +23,33 @@ module.exports = {

// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
// 'eslint:recommended',

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// ESLint typescript rules
'plugin:@typescript-eslint/recommended',

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

// https://github.com/prettier/eslint-config-prettier#installation
// usage with Prettier, provided by 'eslint-config-prettier'.
'prettier'
// Base ESLint recommended rules
'eslint:recommended',

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// ESLint typescript rules
'plugin:@typescript-eslint/recommended',

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

'standard-with-typescript',
],

plugins: [
// required to apply rules which need type information
'@typescript-eslint',

// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue',
// required to apply rules which need type information
'@typescript-eslint',

// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Prettier has not been included as plugin to avoid performance impact
// add it as an extension for your IDE
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue',

'import',
'import',
'unused-imports',
],

globals: {
Expand All @@ -70,50 +67,106 @@ module.exports = {

// add your custom rules here
rules: {
'prefer-promise-reject-errors': 'off',

quotes: ['warn', 'single', { avoidEscape: true }],

// this rule, if on, would require explicit return type on the `render` function
'@typescript-eslint/explicit-function-return-type': 'off',

// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
'@typescript-eslint/no-var-requires': 'off',

// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
// does not work with type definitions
'no-unused-vars': 'off',

'import/first': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',

// The core 'import/named' rules
// does not work with type definitions
'import/named': 'off',

'prefer-template': 'error',
'object-curly-newline': ['error', {
ObjectExpression: {
multiline: true,
minProperties: 1,
},
ObjectPattern: {
multiline: true,
minProperties: 1,
},
ImportDeclaration: {
multiline: true,
minProperties: 2,
},
ExportDeclaration: 'always',
}],

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
// allow async-await
'generator-star-spacing': 'off',
// allow paren-less arrow functions
'arrow-parens': 'off',
'one-var': 'off',
'no-void': 'off',
'multiline-ternary': ["error", "always"],
'no-useless-concat': 'error',
'object-curly-newline': ['error', {
ObjectExpression: {
multiline: true,
minProperties: 1,
},
ObjectPattern: {
multiline: true,
minProperties: 1,
},
ImportDeclaration: {
multiline: true,
minProperties: 2,
},
ExportDeclaration: 'always',
}],
'prefer-template': 'error',

'import/first': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',

// The core 'import/named' rules
// does not work with type definitions
'import/named': 'off',

'prefer-promise-reject-errors': 'off',

quotes: ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'@typescript-eslint/quotes': ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }],

// this rule, if on, would require explicit return type on the `render` function
'@typescript-eslint/explicit-function-return-type': 'off',

// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
'@typescript-eslint/no-var-requires': 'off',

// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
// does not work with type definitions
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',

'comma-dangle': ['error', 'always-multiline'],
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],

'vue/attributes-order': ['error', {
'order': [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
['UNIQUE', 'SLOT'],
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'EVENTS',
'CONTENT',
],
'alphabetical': false,
}],

'vue/component-tags-order': ['error', {
'order': ['template', 'script', 'style'],
}],

'vue/this-in-template': ['error', 'never'],

'vue/array-bracket-newline': 'error',
'vue/multiline-ternary': 'error',
'vue/no-useless-concat': 'error',
'vue/prefer-template': 'error',
'vue/multi-word-component-names': 'off',

'no-unused-expressions': 0,
'@typescript-eslint/no-unused-expressions': 0,

// '@typescript-eslint/strict-boolean-expressions': 'off'
}
}
Loading

0 comments on commit 0920c39

Please sign in to comment.