modernize frontend-shared to target the same ES and TS standards as the rest of the app
This commit is contained in:
parent
d08bb5c82f
commit
73481990ea
9 changed files with 560 additions and 483 deletions
|
|
@ -5,11 +5,10 @@ import pluginVue from 'eslint-plugin-vue';
|
|||
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'],
|
||||
files: ['js/**/*.vue'],
|
||||
...pluginMisskey.configs.typescript,
|
||||
},
|
||||
...pluginVue.configs['flat/recommended'],
|
||||
|
|
@ -17,7 +16,7 @@ export default [
|
|||
files: [
|
||||
'@types/**/*.ts',
|
||||
'js/**/*.ts',
|
||||
'**/*.vue',
|
||||
'js/**/*.vue',
|
||||
],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
|
|
@ -43,7 +42,7 @@ export default [
|
|||
parserOptions: {
|
||||
extraFileExtensions: ['.vue'],
|
||||
parser: tsParser,
|
||||
project: ['./tsconfig.json'],
|
||||
project: ['./tsconfig.web.json'],
|
||||
sourceType: 'module',
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
|
|
@ -98,18 +97,45 @@ export default [
|
|||
'vue/attribute-hyphenation': ['error', 'never'],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.js', '*.ts'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: tsParser,
|
||||
project: ['./tsconfig.scripts.json'],
|
||||
sourceType: 'module',
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'import/no-default-export': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['util/**/*.ts', 'util/**/*.js'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: tsParser,
|
||||
project: ['./tsconfig.util.json'],
|
||||
sourceType: 'module',
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'import/no-default-export': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
// TODO: Error while loading rule '@typescript-eslint/naming-convention': Cannot use 'in' operator to search for 'type' in undefined のため一時的に無効化
|
||||
// See https://github.com/misskey-dev/misskey/pull/15311
|
||||
'js/i18n.ts',
|
||||
'js-built/',
|
||||
"**/lib/",
|
||||
"**/temp/",
|
||||
"**/built/",
|
||||
"**/coverage/",
|
||||
"**/node_modules/",
|
||||
"*.*",
|
||||
]
|
||||
'**/lib/',
|
||||
'**/temp/',
|
||||
'**/built/',
|
||||
'**/coverage/',
|
||||
'**/node_modules/',
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue