forked from FreeTubeApp/FreeTube
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into feature/history/remember-search-query
* development: (55 commits) Translated using Weblate (Russian) Translated using Weblate (Japanese) fix cmd+m shortcut to minimize the window on macos and not mute the video (FreeTubeApp#5828) (FreeTubeApp#5829) Update dependabot.yml to add new eslint packages into the eslint group (FreeTubeApp#5837) Bump the babel group with 4 updates (FreeTubeApp#5831) Bump globals from 15.9.0 to 15.10.0 (FreeTubeApp#5835) Bump lefthook from 1.7.17 to 1.7.18 (FreeTubeApp#5836) Bump the eslint group with 2 updates (FreeTubeApp#5832) Bump @eslint/js from 9.11.1 to 9.12.0 (FreeTubeApp#5833) Bump @eslint/compat from 1.1.1 to 1.2.0 (FreeTubeApp#5834) Translated using Weblate (Belarusian) Translated using Weblate (Hebrew) Translated using Weblate (Chinese (Traditional Han script)) Turn `vue/no-useless-template-attributes` eslint rule back on (FreeTubeApp#5830) Translated using Weblate (Serbian) Translated using Weblate (Belarusian) Translated using Weblate (Belarusian) Translated using Weblate (Belarusian) Upgrade eslint 8 > 9 (FreeTubeApp#5777) Translated using Weblate (Belarusian) ...
- Loading branch information
Showing
41 changed files
with
3,350 additions
and
2,314 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
import eslintPluginVue from 'eslint-plugin-vue' | ||
import vuejsAccessibility from 'eslint-plugin-vuejs-accessibility' | ||
import eslintPluginUnicorn from 'eslint-plugin-unicorn' | ||
import eslintConfigPrettier from 'eslint-config-prettier' | ||
import intlifyVueI18N from '@intlify/eslint-plugin-vue-i18n' | ||
import globals from 'globals' | ||
import vueEslintParser from 'vue-eslint-parser' | ||
import js from '@eslint/js' | ||
import { FlatCompat } from '@eslint/eslintrc' | ||
import { fixupConfigRules } from '@eslint/compat' | ||
import jsoncEslintParser from 'jsonc-eslint-parser' | ||
import eslintPluginJsonc from 'eslint-plugin-jsonc' | ||
import eslintPluginYml from 'eslint-plugin-yml' | ||
import yamlEslintParser from 'yaml-eslint-parser' | ||
|
||
import activeLocales from './static/locales/activeLocales.json' with { type: 'json' } | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: import.meta.dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}) | ||
|
||
export default [ | ||
...fixupConfigRules( | ||
compat.config({ | ||
extends: ['standard'] | ||
}) | ||
), | ||
js.configs.recommended, | ||
eslintConfigPrettier, | ||
...eslintPluginVue.configs['flat/vue2-recommended'], | ||
...vuejsAccessibility.configs["flat/recommended"], | ||
...intlifyVueI18N.configs['flat/recommended'], | ||
{ | ||
files: [ | ||
'**/*.{js,vue}', | ||
], | ||
ignores: [ | ||
'**/node_modules', | ||
'**/_scripts', | ||
'**/dist', | ||
], | ||
plugins: { | ||
unicorn: eslintPluginUnicorn, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
}, | ||
|
||
parser: vueEslintParser, | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
}, | ||
|
||
settings: { | ||
'vue-i18n': { | ||
localeDir: `./static/locales/{${activeLocales.join(',')}}.yaml`, | ||
messageSyntaxVersion: '^8.0.0', | ||
}, | ||
}, | ||
|
||
rules: { | ||
'space-before-function-paren': 'off', | ||
'comma-dangle': ['error', 'only-multiline'], | ||
'vue/no-v-html': 'off', | ||
|
||
'no-console': ['error', { | ||
allow: ['warn', 'error'], | ||
}], | ||
|
||
'no-unused-vars': 'warn', | ||
'no-undef': 'warn', | ||
'object-shorthand': 'off', | ||
'vue/no-template-key': 'warn', | ||
'vue/multi-word-component-names': 'off', | ||
'vuejs-accessibility/no-onchange': 'off', | ||
|
||
'vuejs-accessibility/label-has-for': ['error', { | ||
required: { | ||
some: ['nesting', 'id'], | ||
}, | ||
}], | ||
|
||
'vuejs-accessibility/no-static-element-interactions': 'off', | ||
'n/no-callback-literal': 'warn', | ||
'n/no-path-concat': 'warn', | ||
'unicorn/better-regex': 'error', | ||
'unicorn/no-array-push-push': 'error', | ||
'unicorn/prefer-keyboard-event-key': 'error', | ||
'unicorn/prefer-regexp-test': 'error', | ||
'unicorn/prefer-string-replace-all': 'error', | ||
'@intlify/vue-i18n/no-dynamic-keys': 'error', | ||
'@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error', | ||
|
||
'@intlify/vue-i18n/no-raw-text': ['error', { | ||
attributes: { | ||
'/.+/': [ | ||
'title', | ||
'aria-label', | ||
'aria-placeholder', | ||
'aria-roledescription', | ||
'aria-valuetext', | ||
'tooltip', | ||
'message', | ||
], | ||
|
||
input: ['placeholder', 'value'], | ||
img: ['alt'], | ||
}, | ||
|
||
ignoreText: ['-', '•', '/', 'YouTube', 'Invidious', 'FreeTube'], | ||
}], | ||
|
||
'@intlify/vue-i18n/no-deprecated-tc': 'off', | ||
'vue/require-explicit-emits': 'error', | ||
'vue/no-unused-emit-declarations': 'error', | ||
}, | ||
}, | ||
|
||
...eslintPluginJsonc.configs['flat/base'], | ||
{ | ||
files: ['**/*.json'], | ||
ignores: [ | ||
'**/node_modules/**', | ||
'**/_scripts/**', | ||
'**/dist/**', | ||
], | ||
|
||
languageOptions: { | ||
parser: jsoncEslintParser, | ||
}, | ||
|
||
rules: { | ||
'no-tabs': 'off', | ||
'comma-spacing': 'off', | ||
'no-irregular-whitespace': 'off', | ||
}, | ||
|
||
settings: { | ||
'vue-i18n': { | ||
localeDir: `./static/locales/{${activeLocales.join(',')}}.yaml`, | ||
messageSyntaxVersion: '^8.0.0', | ||
}, | ||
}, | ||
}, | ||
|
||
...eslintPluginYml.configs['flat/recommended'], | ||
{ | ||
files: ['**/*.{yml,yaml}'], | ||
ignores: [ | ||
'**/node_modules/**', | ||
'**/_scripts/**', | ||
'**/dist/**', | ||
'**/.github/**', | ||
], | ||
|
||
languageOptions: { | ||
parser: yamlEslintParser, | ||
}, | ||
|
||
rules: { | ||
'yml/no-irregular-whitespace': 'off', | ||
}, | ||
|
||
settings: { | ||
'vue-i18n': { | ||
localeDir: `./static/locales/{${activeLocales.join(',')}}.yaml`, | ||
messageSyntaxVersion: '^8.0.0', | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ['.github/**/*.{yml,yaml}'], | ||
|
||
languageOptions: { | ||
parser: yamlEslintParser, | ||
}, | ||
|
||
rules: { | ||
'yml/no-empty-mapping-value': 'off', | ||
'yml/no-irregular-whitespace': 'off', | ||
}, | ||
|
||
settings: { | ||
'vue-i18n': { | ||
localeDir: `./static/locales/{${activeLocales.join(',')}}.yaml`, | ||
messageSyntaxVersion: '^8.0.0', | ||
}, | ||
}, | ||
}, | ||
] |
Oops, something went wrong.