2021-08-02 18:09:54 +01:00
|
|
|
// Copyright (C) 2021 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
env: {
|
2022-11-04 11:57:05 +00:00
|
|
|
node: true,
|
2021-08-02 18:09:54 +01:00
|
|
|
},
|
2021-08-04 11:26:43 +01:00
|
|
|
extends: [
|
2021-08-10 14:05:40 +01:00
|
|
|
'plugin:vue/recommended',
|
2021-08-02 18:09:54 +01:00
|
|
|
'eslint:recommended',
|
|
|
|
'@vue/typescript/recommended',
|
2022-11-04 11:57:05 +00:00
|
|
|
'plugin:import/recommended',
|
|
|
|
'plugin:import/typescript',
|
2021-08-02 18:09:54 +01:00
|
|
|
],
|
2022-11-04 11:57:05 +00:00
|
|
|
parser: 'vue-eslint-parser',
|
2021-08-02 18:09:54 +01:00
|
|
|
parserOptions: {
|
2022-11-04 11:57:05 +00:00
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
sourceType: 'module',
|
|
|
|
ecmaVersion: 2020,
|
|
|
|
vueFeatures: {
|
|
|
|
filter: true,
|
|
|
|
},
|
2021-08-02 18:09:54 +01:00
|
|
|
},
|
2022-11-04 11:57:05 +00:00
|
|
|
plugins: ['storj', 'eslint-plugin-import'],
|
2021-08-02 18:09:54 +01:00
|
|
|
rules: {
|
2022-11-04 11:57:05 +00:00
|
|
|
'linebreak-style': ['error', 'unix'],
|
2021-08-31 16:25:49 +01:00
|
|
|
|
2021-08-02 18:09:54 +01:00
|
|
|
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
|
|
|
2022-11-04 11:57:05 +00:00
|
|
|
'indent': ['warn', 4],
|
|
|
|
'vue/html-indent': ['warn', 4],
|
2021-08-04 11:26:43 +01:00
|
|
|
|
2022-11-04 11:57:05 +00:00
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
|
|
'warn', {
|
|
|
|
'vars': 'all',
|
|
|
|
'args': 'all',
|
|
|
|
'argsIgnorePattern': '^_',
|
2021-08-04 11:26:43 +01:00
|
|
|
}],
|
|
|
|
|
2022-11-04 11:57:05 +00:00
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
|
|
'@typescript-eslint/no-var-requires': 'off',
|
2021-08-10 14:05:40 +01:00
|
|
|
|
2022-11-04 11:57:05 +00:00
|
|
|
'no-multiple-empty-lines': ['error', { 'max': 1 }],
|
2021-08-12 14:04:46 +01:00
|
|
|
|
2022-11-04 11:57:05 +00:00
|
|
|
'import/order': ['error', {
|
|
|
|
'pathGroups': [
|
|
|
|
{
|
|
|
|
'group': 'external',
|
|
|
|
'pattern': 'vue-property-decorator',
|
|
|
|
'position': 'before',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'group': 'internal',
|
|
|
|
'pattern': '@/app/components/**',
|
|
|
|
'position': 'after',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'group': 'internal',
|
|
|
|
'pattern': '@/../static/**',
|
|
|
|
'position': 'after',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'newlines-between': 'always',
|
|
|
|
}],
|
|
|
|
'no-duplicate-imports': 'error',
|
|
|
|
'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'],
|
2022-11-04 11:57:05 +00: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'],
|
|
|
|
'vue/no-useless-v-bind': ['warn'],
|
|
|
|
|
|
|
|
'vue/no-useless-template-attributes': ['off'], // TODO: fix later
|
2021-08-31 14:49:45 +01:00
|
|
|
|
2021-08-31 13:58:25 +01:00
|
|
|
'vue/no-unregistered-components': ['warn', { ignorePatterns: ['router-link', 'router-view'] }],
|
2021-08-31 16:25:49 +01:00
|
|
|
|
|
|
|
'storj/vue/require-annotation': 'warn',
|
2022-11-04 11:57:05 +00:00
|
|
|
|
|
|
|
'vue/no-v-html': 0,
|
|
|
|
},
|
|
|
|
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'],
|
|
|
|
},
|
2021-08-02 18:09:54 +01:00
|
|
|
},
|
2022-11-04 11:57:05 +00:00
|
|
|
};
|