Auto Router, Discord Rules Page, & Vi18n lib (#52)
feat: Auto Router, Discord Rules Page, & Vi18n lib (#52)
This commit is contained in:
parent
262b8c578f
commit
8c59485898
51 changed files with 3479 additions and 782 deletions
|
|
@ -1,24 +1,62 @@
|
|||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import ts from 'typescript-eslint';
|
||||
import vue from 'eslint-plugin-vue';
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import ts from "typescript-eslint";
|
||||
import vue from "eslint-plugin-vue";
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import vueParser from "vue-eslint-parser";
|
||||
|
||||
export default ts.config(
|
||||
{ ignores: ['dist'] },
|
||||
{
|
||||
extends: [
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommendedTypeChecked,
|
||||
...vue.configs.recommendedTypeChecked,
|
||||
],
|
||||
files: ['**/*.{js,ts,vue}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
export default defineConfig([
|
||||
globalIgnores(["dist"]),
|
||||
{
|
||||
extends: [
|
||||
js.configs.recommended,
|
||||
ts.configs.strictTypeChecked,
|
||||
...vue.configs["flat/essential"],
|
||||
],
|
||||
files: ["./src/**/*.{js,ts,vue}"],
|
||||
plugins: { vue },
|
||||
languageOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
globals: globals.browser,
|
||||
parser: vueParser,
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
parser: ts.parser,
|
||||
extraFileExtensions: [".vue"],
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"vue/no-restricted-html-elements": [
|
||||
"error",
|
||||
{
|
||||
element: ["a", "RouterLink"],
|
||||
message: "Use <SmartLink> instead.",
|
||||
},
|
||||
{ element: ["i18n-t"], message: "Use <RichTemplate> instead." },
|
||||
{
|
||||
element: ["RichTemplateParts"],
|
||||
message:
|
||||
"Do not use the internal <RichTemplateParts> component. Use <RichTemplate> instead.",
|
||||
},
|
||||
],
|
||||
// allow interfaces to only extend another interface without adding properties
|
||||
// good for aliasing more complex types
|
||||
"@typescript-eslint/no-empty-object-type": [
|
||||
"error",
|
||||
{ allowInterfaces: "with-single-extends" },
|
||||
],
|
||||
"vue/no-ref-object-reactivity-loss": ["error"],
|
||||
"@typescript/no-unnecessary-conditions": [
|
||||
"error",
|
||||
{ allowConstantLoopConditions: "only-allowed-literals" },
|
||||
],
|
||||
},
|
||||
},
|
||||
// disable multi-word-component-names for unplugin-vue-router
|
||||
{
|
||||
files: ["src/pages/**/*.vue"],
|
||||
rules: { "vue/multi-word-component-names": "off" },
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue