storj/web/satellite/.eslintrc.js
Vitalii e6959004c9 web/satellite: migrate webpack to vite
Migrated webpack to vite.
Replaced jest with vitest (because I couldn't resolve 'import.meta' issue)
Replaced legacy vue-svg-loader with vite-svg-loader
Replaced bip39 dep with bip39-english (it includes only english wordlist)
Replaced aws-sdk v2 with aws-sdk V3 (because v2 was throwing some weird error in console. Ref: https://stackoverflow.com/questions/75107933/aws-sdk-contributes-to-build-error-uncaught-typeerror-e-is-not-a-constructor)
Renamed VUE_APP_ENDPOINT_URL env variable to VITE_ENDPOINT_URL
Removed a ton of dependencies (like babel and jest-related stuff).

Tested in Chrome, Safari, Brave, Firefox and Opera browsers.

Additionally fixed logout errors from buckets and object browser routes.

TODO: try to remove util and stream-browserify dependencies and see if it works

Change-Id: I4562649a59eb0ba80c1a672d55c59fceb8c80b23
2023-05-30 09:25:30 +00:00

111 lines
3.6 KiB
JavaScript

// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/recommended',
'eslint:recommended',
'@vue/typescript/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaVersion: 2020,
},
plugins: ['eslint-plugin-import'],
rules: {
'linebreak-style': ['error', 'unix'],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'indent': ['warn', 4],
'vue/html-indent': ['warn', 4],
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-multiple-empty-lines': ['error', { 'max': 1 }],
'import/order': ['error', {
'pathGroups': [
{
'group': 'external',
'pattern': 'vue-property-decorator',
'position': 'before',
},
{
'group': 'internal',
'pattern': '@/components/**',
'position': 'after',
},
{
'group': 'internal',
'pattern': '@/../static/**',
'position': 'after',
},
],
'newlines-between': 'always',
}],
'no-duplicate-imports': 'error',
'import/default': 'off',
'vue/script-setup-uses-vars': 'error',
'object-curly-spacing': ['error', 'always'],
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
'semi': ['error', 'always'],
'keyword-spacing': ['error'],
'comma-dangle': ['error', 'always-multiline'],
'no-trailing-spaces': ['error'],
'eqeqeq': ['error'],
'comma-spacing': ['error'],
'arrow-spacing': ['error'],
'space-in-parens': ['error'],
'space-before-blocks': ['error'],
'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-unused-vars': ['warn'],
'vue/no-useless-v-bind': ['warn'],
'vue/no-useless-template-attributes': ['off'], // TODO: fix later
'vue/no-multiple-template-root': ['off'], // it's possible to have multiple roots in template in Vue 3
'vue/no-undef-components': ['warn', { ignorePatterns: ['router-link', 'router-view'] }],
'vue/no-v-html': ['error'],
},
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'],
},
},
};