Skip to content

Commit

Permalink
refactor: clean up internationalization mess
Browse files Browse the repository at this point in the history
change dashboard route to root
add i18n eslint plugin
  • Loading branch information
simonwep committed Dec 17, 2023
1 parent 1cb4f53 commit 29dd592
Show file tree
Hide file tree
Showing 45 changed files with 560 additions and 429 deletions.
102 changes: 54 additions & 48 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
{
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [".vue"]
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [
".vue"
]
},
"env": {
"node": true
},
"globals": {
"defineModel": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@intlify/vue-i18n/recommended",
"plugin:vue/vue3-recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"settings": {
"import/resolver": {
"typescript": true,
"node": true
},
"env": {
"node": true
},
"globals": {
"defineModel": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
},
"rules": {
"vue/multi-word-component-names": "off",
"vue/require-default-prop": "off",
"vue/no-v-html": "off",
"prettier/prettier": "error",
"no-console": "error",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"type",
"object"
],
"alphabetize": {
"order": "asc"
}
}
]
"vue-i18n": {
"localeDir": "src/i18n/locales/*.json"
}
},
"rules": {
"vue/multi-word-component-names": "off",
"vue/require-default-prop": "off",
"vue/no-v-html": "off",
"prettier/prettier": "error",
"no-console": "error",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"type",
"object"
],
"alphabetize": {
"order": "asc"
}
}
]
}
}
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,22 @@
"dev": "vite --host",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"lint:src": "eslint '{scripts,src}/**/*.{js,ts,vue}' --no-error-on-unmatched-pattern",
"lint:src:fix": "pnpm run lint:src --fix",
"lint:i18n": "li18nt 'src/i18n/locales/*.json' --config src/i18n/.li18ntrc",
"lint:i18n:fix": "pnpm run lint:i18n --fix",
"lint": "pnpm run lint:i18n && pnpm run lint:src",
"lint:fix": "pnpm run lint:i18n:fix && pnpm run lint:src:fix",
"lint": "eslint '{scripts,src}/**/*.{js,ts,vue}' --no-error-on-unmatched-pattern",
"lint:fix": "pnpm run lint --fix",
"test:ci": "pnpm run lint:fix && pnpm run build",
"gen:icons": "node scripts/icons.js"
},
"dependencies": {
"@popperjs/core": "2.11.8",
"echarts": "5.4.3",
"li18nt": "5.0.0",
"papaparse": "5.4.1",
"vue": "3.3.9",
"vue-i18n": "9.8.0",
"vue-router": "4.2.5",
"yuppee": "0.3.0"
},
"devDependencies": {
"@intlify/eslint-plugin-vue-i18n": "^2.0.0",
"@types/ackee-tracker": "5.0.4",
"@types/node": "20.10.2",
"@types/papaparse": "5.3.14",
Expand Down
Loading

0 comments on commit 29dd592

Please sign in to comment.