mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
* feat: split entry file by locale name
* chore: とりあえず transform hook で雑に分割
* chore: とりあえず transform 結果をいい感じに
* chore: concurrent buildで高速化
* chore: vite ではローケルのないものをビルドして後処理でどうにかするように
* chore: 後処理のためにi18n.jを単体になるように切り出す
* chore: use typescript
* chore: remove unref(i18n) in vite build process
* chore: inline variable
* fix: build error
* fix: i18n.ts.something.replaceAll() become error
* chore: ignore export specifier from error
* chore: support i18n.tsx as object
* chore: process literal for all files
* chore: split config and locale
* chore: inline locale name
* chore: remove updating locale in boot common
* chore: use top-level await to load locales
* chore: inline locale
* chore: remove loading locale from boot.js
* chore: remove loading locale from boot.js
* コメント追加
* fix test; fetchに失敗する
* import削除ログをdebugレベルに
* fix: watch pug
* chore: use hash for entry files
* chore: remove es-module-lexer from dependencies
* chore: move to frontend-builder
* chore: use inline locale in embed
* chore: refetch json on hot reload
* feat: store localization related to boot.js in backend in bootloaderLocales localstorage
* 応急処置を戻す
* fix spex
* fix `Using i18n identifier "e" directly. Skipping inlining.` warning
* refactor: use scriptsDir parameter
* chore: remove i18n from depmap
* chore: make build crash if errors
* error -> warn few conditions
* use inline object
* update localstorage keys
* remove accessing locale localstorage
* fix: failed to process i18n.tsx.aaa({x:i18n.bbb})
99 lines
2.6 KiB
JavaScript
99 lines
2.6 KiB
JavaScript
import globals from 'globals';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import pluginMisskey from '@misskey-dev/eslint-plugin';
|
|
import sharedConfig from '../shared/eslint.config.js';
|
|
|
|
// eslint-disable-next-line import/no-default-export
|
|
export default [
|
|
...sharedConfig,
|
|
{
|
|
files: ['**/*.vue'],
|
|
...pluginMisskey.configs.typescript,
|
|
},
|
|
{
|
|
files: [
|
|
'@types/**/*.ts',
|
|
'js/**/*.ts',
|
|
'**/*.vue',
|
|
],
|
|
languageOptions: {
|
|
globals: {
|
|
...Object.fromEntries(Object.entries(globals.node).map(([key]) => [key, 'off'])),
|
|
...globals.browser,
|
|
|
|
// Node.js
|
|
module: false,
|
|
require: false,
|
|
__dirname: false,
|
|
|
|
// Misskey
|
|
_DEV_: false,
|
|
_LANGS_: false,
|
|
_VERSION_: false,
|
|
_ENV_: false,
|
|
_PERF_PREFIX_: false,
|
|
},
|
|
parserOptions: {
|
|
parser: tsParser,
|
|
project: ['./tsconfig.json'],
|
|
sourceType: 'module',
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
'@typescript-eslint/no-empty-interface': ['error', {
|
|
allowSingleExtends: true,
|
|
}],
|
|
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
|
// window の禁止理由: グローバルスコープと衝突し、予期せぬ結果を招くため
|
|
// e の禁止理由: error や event など、複数のキーワードの頭文字であり分かりにくいため
|
|
'id-denylist': ['error', 'window', 'e'],
|
|
'no-shadow': ['warn'],
|
|
'vue/attributes-order': ['error', {
|
|
alphabetical: false,
|
|
}],
|
|
'vue/no-use-v-if-with-v-for': ['error', {
|
|
allowUsingIterationVar: false,
|
|
}],
|
|
'vue/no-ref-as-operand': 'error',
|
|
'vue/no-multi-spaces': ['error', {
|
|
ignoreProperties: false,
|
|
}],
|
|
'vue/no-v-html': 'warn',
|
|
'vue/order-in-components': 'error',
|
|
'vue/html-indent': ['warn', 'tab', {
|
|
attribute: 1,
|
|
baseIndent: 0,
|
|
closeBracket: 0,
|
|
alignAttributesVertically: true,
|
|
ignores: [],
|
|
}],
|
|
'vue/html-closing-bracket-spacing': ['warn', {
|
|
startTag: 'never',
|
|
endTag: 'never',
|
|
selfClosingTag: 'never',
|
|
}],
|
|
'vue/multi-word-component-names': 'warn',
|
|
'vue/require-v-for-key': 'warn',
|
|
'vue/no-unused-components': 'warn',
|
|
'vue/no-unused-vars': 'warn',
|
|
'vue/no-dupe-keys': 'warn',
|
|
'vue/valid-v-for': 'warn',
|
|
'vue/return-in-computed-property': 'warn',
|
|
'vue/no-setup-props-reactivity-loss': 'warn',
|
|
'vue/max-attributes-per-line': 'off',
|
|
'vue/html-self-closing': 'off',
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
'vue/v-on-event-hyphenation': ['error', 'never', {
|
|
autofix: true,
|
|
}],
|
|
'vue/attribute-hyphenation': ['error', 'never'],
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
],
|
|
},
|
|
];
|