-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96a3484
commit 4d790f6
Showing
10 changed files
with
1,708 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"parser": "vue-eslint-parser", | ||
"parserOptions": { | ||
"parser": "@typescript-eslint/parser", | ||
"project": "./tsconfig.json", | ||
"extraFileExtensions": [".vue"], | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint/eslint-plugin", | ||
"simple-import-sort", | ||
"import" | ||
], | ||
"extends": [ | ||
"eslint:all", | ||
"@nuxtjs/eslint-config-typescript", | ||
"plugin:vue/vue3-recommended", | ||
"plugin:@typescript-eslint/all", | ||
"plugin:typescript-sort-keys/recommended", | ||
"prettier" | ||
], | ||
"root": true, | ||
"env": { | ||
"node": true | ||
}, | ||
"rules": { | ||
// disabled rules (required) | ||
"no-void": "off", // To call promise functions without other actions | ||
"no-magic-numbers": "off", // This will wrongly detect a number passed to a function as a magic number | ||
"@typescript-eslint/no-magic-numbers": "off", | ||
"new-cap": "off", // The decorators will be wrongly detected | ||
"class-methods-use-this": "off", // some methods are not using this | ||
"require-await": "off", // it will wrongly detect async methods as not having await | ||
"@typescript-eslint/require-await": "off", | ||
"max-params": "off", // injection constructors need many parameters | ||
|
||
// disabled rules (optional, in personal preference) | ||
"no-console": "off", // This will disable console.log, console.error, etc. This could be removed if we have our own logger | ||
"one-var": "off", // in favor to not merge variables to one | ||
"no-continue": "off", // in favor to use continue | ||
|
||
// disabled typescript-eslint rules (too strict) | ||
"@typescript-eslint/promise-function-async": "off", | ||
"@typescript-eslint/explicit-member-accessibility": "off", | ||
"@typescript-eslint/prefer-readonly-parameter-types": "off", | ||
"@typescript-eslint/parameter-properties": "off", | ||
"@typescript-eslint/no-extraneous-class": "off", | ||
"@typescript-eslint/no-misused-promises": "off", | ||
"@typescript-eslint/member-ordering": "off", | ||
"@typescript-eslint/no-type-alias": "off", | ||
"@typescript-eslint/unbound-method": "off", | ||
"@typescript-eslint/strict-boolean-expressions": "off", | ||
|
||
// modified rules | ||
"func-style": ["error", "declaration", { "allowArrowFunctions": true }], | ||
|
||
// replaced rules | ||
"no-useless-constructor": "off", | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
|
||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": "error", | ||
|
||
"sort-imports": "off", | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "error", | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/no-duplicates": "error", | ||
|
||
// additional rules | ||
"@typescript-eslint/consistent-type-exports": "error", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
"fixStyle": "inline-type-imports" | ||
} | ||
], | ||
|
||
"padding-line-between-statements": [ | ||
"error", | ||
{ "blankLine": "always", "prev": "*", "next": "return" }, | ||
{ | ||
"blankLine": "always", | ||
"prev": ["const", "let", "var", "multiline-expression"], | ||
"next": "*" | ||
}, | ||
{ | ||
"blankLine": "any", | ||
"prev": ["const", "let", "var"], | ||
"next": ["const", "let", "var"] | ||
} | ||
], | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-unused-vars": "error" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.spec.ts", "*.e2e-spec.ts"], | ||
"rules": { | ||
"@typescript-eslint/init-declarations": "off", | ||
"max-lines-per-function": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ node_modules | |
logs | ||
*.log | ||
|
||
# Linter | ||
.eslintcache | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
build | ||
dist | ||
coverage | ||
e2e | ||
node_modules | ||
pnpm-lock.yaml | ||
*.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"endOfLine": "auto", | ||
"semi": true, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["vue.volar", "vue.vscode-typescript-vue-plugin"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": false, | ||
"source.fixAll.eslint": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
// https://nuxt.com/docs/api/configuration/nuxt-config | ||
export default defineNuxtConfig({ | ||
devtools: { enabled: true } | ||
}) | ||
devtools: { enabled: true }, | ||
typescript: { | ||
strict: true, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.