Skip to content

Commit

Permalink
feat: more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Apr 21, 2024
1 parent 1a88309 commit 0df5884
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 10 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@commitlint/cli": "19.2.2",
"@commitlint/config-conventional": "19.2.2",
"@cspell/dict-cryptocurrencies": "5.0.0",
"@intlify/eslint-plugin-vue-i18n": "2.0.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/commit-analyzer": "12.0.0",
"@semantic-release/git": "10.0.1",
Expand Down
114 changes: 114 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions project-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fred
garply
grault
iife
intlify
jiti
knip
litecoin
Expand Down
27 changes: 18 additions & 9 deletions src/configs/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,18 @@ export async function vue(

const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;

const [pluginVue, parserVue, processorVueBlocks] = (await loadPackages([
"eslint-plugin-vue",
"vue-eslint-parser",
"eslint-processor-vue-blocks",
])) as [
PluginVue,
typeof import("vue-eslint-parser"),
(typeof import("eslint-processor-vue-blocks"))["default"],
];
const [pluginVue, pluginVueI18n, parserVue, processorVueBlocks] =
(await loadPackages([
"eslint-plugin-vue",
"@intlify/eslint-plugin-vue-i18n",
"vue-eslint-parser",
"eslint-processor-vue-blocks",
])) as [
PluginVue,
ESLint.Plugin,
typeof import("vue-eslint-parser"),
(typeof import("eslint-processor-vue-blocks"))["default"],
];

const parserTs = await interopDefault(
import("@typescript-eslint/parser"),
Expand Down Expand Up @@ -84,6 +87,7 @@ export async function vue(
},
plugins: {
vue: pluginVue,
"vue-i18n": pluginVueI18n,
},
},
{
Expand Down Expand Up @@ -191,6 +195,11 @@ export async function vue(
"vue/space-infix-ops": "error",
"vue/space-unary-ops": ["error", { nonwords: false, words: true }],

"vue-i18n/no-html-messages": "warn",
"vue-i18n/no-missing-keys": "warn",
"vue-i18n/no-raw-text": "warn",
"vue-i18n/no-v-html": "warn",

...(stylistic === false
? {}
: {
Expand Down
3 changes: 2 additions & 1 deletion src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ import {
const VuePackages = ["vue", "nuxt", "vitepress", "@slidev/cli"];

export const defaultPluginRenaming = {
"@intlify/vue-i18n": "vue-i18n",
"@stylistic": "style",
"@typescript-eslint": "ts",
"import-x": "import",
"optimize-regex": "regexp",
n: "node",
"optimize-regex": "regexp",
sonarjs: "sonar",
vitest: "test",
yml: "yaml",
Expand Down

0 comments on commit 0df5884

Please sign in to comment.