funkwhale/front/.eslintrc.js

78 wiersze
2.0 KiB
JavaScript
Czysty Zwykły widok Historia

2021-04-25 16:23:27 +00:00
module.exports = {
env: {
browser: true,
es6: true
},
extends: [
2022-09-10 16:31:48 +00:00
'plugin:@intlify/vue-i18n/recommended',
2022-11-25 19:48:39 +00:00
'plugin:vue/vue3-recommended',
2022-04-16 11:34:39 +00:00
'@vue/typescript/recommended',
'@vue/standard'
2021-04-25 16:23:27 +00:00
],
globals: {
2022-08-31 18:50:43 +00:00
SharedArrayBuffer: 'readonly',
Atomics: 'readonly'
2021-04-25 16:23:27 +00:00
},
2022-05-01 11:45:07 +00:00
parser: 'vue-eslint-parser',
2021-04-25 16:23:27 +00:00
parserOptions: {
2022-05-01 11:45:07 +00:00
parser: '@typescript-eslint/parser',
2022-08-31 18:50:43 +00:00
sourceType: 'module',
ecmaVersion: 2020
2021-04-25 16:23:27 +00:00
},
plugins: [
'vue'
],
rules: {
2022-07-21 22:36:43 +00:00
// NOTE: Nicer for the eye
'operator-linebreak': ['error', 'before'],
2022-04-30 13:25:59 +00:00
// NOTE: Handled by typescript
2022-08-31 18:50:43 +00:00
'@typescript-eslint/no-unused-vars': 'off',
2022-05-02 15:06:44 +00:00
'no-use-before-define': 'off',
2022-08-31 18:50:43 +00:00
'no-unused-vars': 'off',
'no-redeclare': 'off',
'no-undef': 'off',
2022-04-30 13:25:59 +00:00
2022-09-10 16:31:48 +00:00
// NOTE: i18n
'@intlify/vue-i18n/no-deprecated-i18n-component': 'error',
2022-09-10 16:31:48 +00:00
'@intlify/vue-i18n/valid-message-syntax': 'error',
'@intlify/vue-i18n/no-i18n-t-path-prop': 'error',
2022-09-10 16:31:48 +00:00
'@intlify/vue-i18n/no-missing-keys': 'error',
'@intlify/vue-i18n/no-dynamic-keys': 'error',
'@intlify/vue-i18n/no-unused-keys': ['error', {
extensions: ['.ts', '.vue'],
enableFix: true
}],
2022-09-10 16:31:48 +00:00
2022-08-31 18:50:43 +00:00
// TODO (wvffle): Remove after VUI and #1618
'vue/multi-word-component-names': 'off',
2022-08-31 18:43:25 +00:00
'import/extensions': 'off',
2022-08-31 18:50:43 +00:00
// TODO (wvffle): Remove after embeded player migration
'@typescript-eslint/no-this-alias': 'off',
2022-04-30 13:25:59 +00:00
2022-08-31 18:50:43 +00:00
// TODO (wvffle): Remove after API Client
2022-08-31 18:43:25 +00:00
'@typescript-eslint/no-explicit-any': 'off'
2022-09-26 17:57:47 +00:00
},
overrides: [
{
files: ['public/embed.html'],
rules: {
// NOTE: It is broken for some reason. It's safe to disable in a .html file as this rule only
// brings <!-- eslint-disable --> comments support for the <template> tag in SFCs
'vue/comment-directive': 'off'
}
2022-11-25 19:48:39 +00:00
},
{
files: ['*.json'],
parser: 'jsonc-eslint-parser'
2022-09-26 17:57:47 +00:00
}
2022-09-10 16:31:48 +00:00
],
settings: {
'vue-i18n': {
2022-11-25 19:48:39 +00:00
localeDir: './src/locales/*.json',
2022-09-10 16:31:48 +00:00
messageSyntaxVersion: '^9.0.0'
}
}
2021-04-25 16:23:27 +00:00
}