Colocate feature views, components, stores, and upload logic; centralize shared map utilities without changing API behavior. Add ESLint, Prettier, EditorConfig, and VS Code settings; standardize four-space indentation and document the project structure and checks. Validation: npm run check, npm run build, and git diff --check.
54 lines
1.4 KiB
JavaScript
54 lines
1.4 KiB
JavaScript
import js from '@eslint/js'
|
|
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
import prettier from 'eslint-config-prettier/flat'
|
|
import vue from 'eslint-plugin-vue'
|
|
import globals from 'globals'
|
|
import ts from 'typescript-eslint'
|
|
|
|
export default defineConfig([
|
|
globalIgnores([
|
|
'dist/**',
|
|
'dist-ssr/**',
|
|
'coverage/**',
|
|
'.agents/**',
|
|
'.codex/**',
|
|
'.claude/**',
|
|
]),
|
|
{
|
|
files: ['**/*.{js,mjs,cjs,ts,mts,cts,vue}'],
|
|
extends: [js.configs.recommended],
|
|
},
|
|
{
|
|
files: ['**/*.{ts,mts,cts,vue}'],
|
|
extends: [ts.configs.recommended],
|
|
rules: {
|
|
// vue-tsc checks undefined names, including ambient types in Vue scripts.
|
|
'no-undef': 'off',
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.vue'],
|
|
extends: [vue.configs['flat/recommended']],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: ts.parser,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ['src/**/*.{js,ts,vue}'],
|
|
languageOptions: {
|
|
globals: globals.browser,
|
|
},
|
|
},
|
|
{
|
|
files: ['*.{js,mjs,cjs,ts,mts,cts}', 'scripts/**/*.{js,mjs,cjs,ts,mts,cts}'],
|
|
languageOptions: {
|
|
globals: globals.node,
|
|
},
|
|
},
|
|
// Keep formatting in Prettier; this must follow the rule presets.
|
|
prettier,
|
|
])
|