VueTorrent/.eslintrc.js

86 lines
2.3 KiB
JavaScript
Raw Normal View History

module.exports = {
2020-12-30 13:11:40 +03:00
extends: [
'eslint:recommended',
'plugin:vue/recommended'
],
parserOptions: {
2022-04-16 12:11:18 +03:00
parser: '@babel/eslint-parser',
2020-12-30 13:11:40 +03:00
ecmaVersion: 2017,
sourceType: 'module'
},
env: {
es6: true,
browser: true,
node: true
},
plugins: [
'vue'
],
rules: {
'arrow-parens': ['error', 'as-needed'],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'array-bracket-spacing': ['error', 'never'],
'comma-spacing': ['error', { before: false, after: true }],
'brace-style': ['error', '1tbs'],
'comma-dangle': ['error', 'never'],
'comma-style': ['error', 'last'],
eqeqeq: 0,
indent: ['error', 2, {
2021-11-27 13:23:20 +03:00
SwitchCase: 1,
2022-04-16 12:11:18 +03:00
ignoredNodes: ['TemplateLiteral']
2020-12-30 13:11:40 +03:00
}],
'vue/html-indent': [
'error',
2,
{ ignores: ['VElement[name=code-block].children'] }
2020-11-07 15:05:31 +03:00
],
2020-12-30 13:11:40 +03:00
'vue/multiline-html-element-content-newline': ['error', {
ignores: ['code-block']
}],
'linebreak-style': ['error', 'unix'],
'keyword-spacing': 'error',
'prefer-const': 'error',
'new-parens': 'error',
'no-case-declarations': 'off',
'no-const-assign': 'error',
'no-unused-vars': ['error', { args: 'none' }],
'no-whitespace-before-property': 'error',
'object-curly-spacing': ['error', 'always'],
quotes: ['error', 'single'],
'quote-props': ['error', 'as-needed'],
semi: ['error', 'never'],
'space-before-blocks': 'error',
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never' }],
'space-in-parens': ['error', 'never'],
'space-infix-ops': 'error',
strict: ['error', 'never'],
'vue/max-attributes-per-line': ['error', {
singleline: 3,
multiline: {
max: 1,
allowFirstLine: false
}
}],
'vue/no-v-html': 'off',
'vue/require-prop-types': 'off',
'vue/require-default-prop': 'off',
'vue/require-v-for-key': 'off',
'vue/order-in-components': ['error'],
'vue/space-infix-ops': 'error',
'arrow-spacing': ['error', { before: true, after: true }],
'no-multi-spaces': ['error'],
'newline-before-return': ['error']
2021-01-27 15:24:23 +03:00
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}