2018-01-31 01:21:21 +03:00
|
|
|
module.exports = {
|
2020-10-09 22:58:28 +03:00
|
|
|
root: true,
|
|
|
|
|
2023-12-28 11:37:43 +03:00
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
},
|
|
|
|
|
2020-10-09 22:58:28 +03:00
|
|
|
parserOptions: {
|
2020-10-10 22:45:28 +03:00
|
|
|
parser: '@typescript-eslint/parser',
|
2020-10-09 22:58:28 +03:00
|
|
|
},
|
|
|
|
|
2023-12-28 11:37:43 +03:00
|
|
|
plugins: [
|
|
|
|
'@typescript-eslint',
|
|
|
|
'vue',
|
|
|
|
],
|
2020-10-18 16:41:57 +03:00
|
|
|
|
2020-10-09 22:58:28 +03:00
|
|
|
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
|
|
|
|
extends: [
|
2023-12-28 11:37:43 +03:00
|
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
2020-10-18 16:41:57 +03:00
|
|
|
'plugin:@typescript-eslint/recommended',
|
2020-10-09 22:58:28 +03:00
|
|
|
'plugin:vue/recommended',
|
|
|
|
],
|
|
|
|
|
|
|
|
rules: {
|
2020-10-18 16:41:57 +03:00
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
|
|
'@typescript-eslint/no-explicit-any': 'off', // @TODO
|
|
|
|
'@typescript-eslint/no-unused-vars': ['error'], // @TODO
|
2020-10-09 22:58:28 +03:00
|
|
|
'arrow-parens': 0,
|
|
|
|
'comma-dangle': ['error', 'only-multiline'],
|
2020-10-10 22:45:28 +03:00
|
|
|
'indent': ['error', 4, { SwitchCase: 1 }],
|
2020-10-09 22:58:28 +03:00
|
|
|
'max-depth': ['error', 3],
|
|
|
|
'max-lines-per-function': ['error', 40],
|
|
|
|
'no-console': ['warn', {allow: ['warn', 'error']}],
|
|
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
2020-10-10 22:45:28 +03:00
|
|
|
'no-unused-vars': 'off',
|
2020-10-09 22:58:28 +03:00
|
|
|
'vue/html-closing-bracket-spacing': ['error', {
|
|
|
|
startTag: 'never',
|
|
|
|
endTag: 'never',
|
|
|
|
selfClosingTag: 'always',
|
|
|
|
}],
|
|
|
|
'vue/html-indent': ['error', 4, {
|
|
|
|
attribute: 1,
|
|
|
|
closeBracket: 0,
|
|
|
|
alignAttributesVertically: true,
|
|
|
|
ignores: [],
|
|
|
|
}],
|
|
|
|
},
|
2020-10-18 16:41:57 +03:00
|
|
|
|
|
|
|
overrides: [{
|
|
|
|
files: ['*/**/shims-*.d.ts'],
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/no-empty-interface': 'off',
|
|
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
|
|
},
|
2020-10-18 18:28:37 +03:00
|
|
|
}, {
|
|
|
|
files: ['*.js', '*.tale.vue'],
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
2020-10-27 17:28:14 +03:00
|
|
|
},
|
|
|
|
}, {
|
|
|
|
files: ['*.config.js'],
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/camelcase': 'off',
|
2020-10-18 18:28:37 +03:00
|
|
|
}
|
2020-10-18 16:41:57 +03:00
|
|
|
}],
|
2018-01-31 01:21:21 +03:00
|
|
|
}
|