2021-08-02 19:17:49 +01:00
|
|
|
// Copyright (C) 2021 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
env: {
|
2022-09-08 15:11:09 +01:00
|
|
|
node: true,
|
2021-08-02 19:17:49 +01:00
|
|
|
},
|
2021-08-05 12:07:45 +01:00
|
|
|
extends: [
|
2021-08-10 14:14:37 +01:00
|
|
|
'plugin:vue/recommended',
|
2021-08-02 19:17:49 +01:00
|
|
|
'eslint:recommended',
|
|
|
|
'@vue/typescript/recommended',
|
2022-09-08 15:11:09 +01:00
|
|
|
'plugin:import/recommended',
|
|
|
|
'plugin:import/typescript',
|
2021-08-02 19:17:49 +01:00
|
|
|
],
|
2022-09-08 15:11:09 +01:00
|
|
|
parser: 'vue-eslint-parser',
|
2021-08-02 19:17:49 +01:00
|
|
|
parserOptions: {
|
2022-09-08 15:11:09 +01:00
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
sourceType: 'module',
|
|
|
|
ecmaVersion: 2020,
|
2021-08-02 19:17:49 +01:00
|
|
|
},
|
2023-05-23 15:28:48 +01:00
|
|
|
plugins: ['eslint-plugin-import'],
|
2021-08-02 19:17:49 +01:00
|
|
|
rules: {
|
2022-09-08 15:11:09 +01:00
|
|
|
'linebreak-style': ['error', 'unix'],
|
2021-08-31 16:25:49 +01:00
|
|
|
|
2021-08-02 19:17:49 +01:00
|
|
|
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
|
|
|
2023-08-17 18:02:25 +01:00
|
|
|
'no-tabs': 'warn',
|
2022-09-08 15:11:09 +01:00
|
|
|
'indent': ['warn', 4],
|
|
|
|
'vue/html-indent': ['warn', 4],
|
2023-12-05 14:22:37 +00:00
|
|
|
'@typescript-eslint/indent': ['warn', 4, {"SwitchCase": 0}],
|
2021-08-05 12:07:45 +01:00
|
|
|
|
2022-10-26 18:07:39 +01:00
|
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
2022-09-08 15:11:09 +01:00
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
|
|
'@typescript-eslint/no-var-requires': 'off',
|
2021-08-05 12:07:45 +01:00
|
|
|
|
2022-09-08 15:11:09 +01:00
|
|
|
'no-multiple-empty-lines': ['error', { 'max': 1 }],
|
2021-08-10 14:14:37 +01:00
|
|
|
|
2022-09-08 15:11:09 +01:00
|
|
|
'import/order': ['error', {
|
|
|
|
'pathGroups': [
|
|
|
|
{
|
|
|
|
'group': 'external',
|
|
|
|
'pattern': 'vue-property-decorator',
|
|
|
|
'position': 'before',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'group': 'internal',
|
2023-10-16 02:23:02 +01:00
|
|
|
'pattern': '@?(poc)/{components,views,layouts}/**',
|
2022-09-08 15:11:09 +01:00
|
|
|
'position': 'after',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'group': 'internal',
|
|
|
|
'pattern': '@/../static/**',
|
|
|
|
'position': 'after',
|
|
|
|
},
|
2023-08-29 01:45:58 +01:00
|
|
|
{
|
|
|
|
'group': 'internal',
|
|
|
|
'pattern': '@poc/assets/**',
|
|
|
|
'position': 'after',
|
|
|
|
},
|
2022-09-08 15:11:09 +01:00
|
|
|
],
|
|
|
|
'newlines-between': 'always',
|
|
|
|
}],
|
2023-11-02 00:14:46 +00:00
|
|
|
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
|
2022-09-08 15:11:09 +01:00
|
|
|
'no-duplicate-imports': 'error',
|
2022-10-26 18:07:39 +01:00
|
|
|
'import/default': 'off',
|
|
|
|
'vue/script-setup-uses-vars': 'error',
|
2022-09-08 15:11:09 +01:00
|
|
|
'object-curly-spacing': ['error', 'always'],
|
|
|
|
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
|
|
|
|
'semi': ['error', 'always'],
|
|
|
|
'keyword-spacing': ['error'],
|
|
|
|
'comma-dangle': ['error', 'always-multiline'],
|
2023-02-24 15:13:27 +00:00
|
|
|
'no-trailing-spaces': ['error'],
|
|
|
|
'eqeqeq': ['error'],
|
|
|
|
'comma-spacing': ['error'],
|
|
|
|
'arrow-spacing': ['error'],
|
|
|
|
'space-in-parens': ['error'],
|
|
|
|
'space-before-blocks': ['error'],
|
2021-08-31 14:49:45 +01:00
|
|
|
|
2022-09-08 15:11:09 +01:00
|
|
|
'vue/multi-word-component-names': ['off'],
|
|
|
|
'vue/max-attributes-per-line': ['off'],
|
|
|
|
'vue/singleline-html-element-content-newline': ['off'],
|
|
|
|
|
|
|
|
'vue/block-lang': ['error', { 'script': { 'lang': 'ts' } }],
|
|
|
|
'vue/html-button-has-type': ['error'],
|
|
|
|
'vue/no-unused-properties': ['warn'],
|
|
|
|
'vue/no-unused-refs': ['warn'],
|
2023-05-16 13:09:46 +01:00
|
|
|
'vue/no-unused-vars': ['warn'],
|
2022-09-08 15:11:09 +01:00
|
|
|
'vue/no-useless-v-bind': ['warn'],
|
2023-07-28 15:29:32 +01:00
|
|
|
'vue/no-v-model-argument': ['off'],
|
2023-07-14 00:45:59 +01:00
|
|
|
'vue/valid-v-slot': ['error', { 'allowModifiers': true }],
|
2022-09-08 15:11:09 +01:00
|
|
|
|
|
|
|
'vue/no-useless-template-attributes': ['off'], // TODO: fix later
|
2023-05-16 13:09:46 +01:00
|
|
|
'vue/no-multiple-template-root': ['off'], // it's possible to have multiple roots in template in Vue 3
|
2022-04-07 12:04:24 +01:00
|
|
|
|
2023-05-16 13:09:46 +01:00
|
|
|
'vue/no-undef-components': ['warn', { ignorePatterns: ['router-link', 'router-view'] }],
|
2021-08-31 16:25:49 +01:00
|
|
|
|
2023-03-06 16:19:58 +00:00
|
|
|
'vue/no-v-html': ['error'],
|
2021-08-02 19:17:49 +01:00
|
|
|
},
|
2022-09-08 15:11:09 +01:00
|
|
|
settings: {
|
|
|
|
'import/resolver': {
|
|
|
|
'eslint-import-resolver-custom-alias': {
|
|
|
|
'alias': {
|
|
|
|
'@': './src',
|
|
|
|
},
|
|
|
|
extensions: ['.ts', '.spec.ts', '.vue'],
|
|
|
|
},
|
|
|
|
typescript: {
|
|
|
|
alwaysTryTypes: true,
|
|
|
|
project: './tsconfig.json',
|
|
|
|
},
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
'import/parsers': {
|
|
|
|
'@typescript-eslint/parser': ['.ts'],
|
|
|
|
'vue-eslint-parser': ['.vue'],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|