Skip to content

Commit

Permalink
chore: add eslint module and config
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Sep 20, 2024
1 parent dfe129e commit 2903550
Show file tree
Hide file tree
Showing 9 changed files with 263 additions and 58 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ localhost.*

# FiveNet
.data/
/plugins/
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

32 changes: 0 additions & 32 deletions .eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"moalamri.inline-fold",
"yoavbls.pretty-ts-errors",
"lokalise.i18n-ally",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
],
"unwantedRecommendations": [
Expand Down
34 changes: 34 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// @ts-check
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
// @ts-ignore no types available yet
import pluginVue from 'eslint-plugin-vue';
import withNuxt from './.nuxt/eslint.config.mjs';

export default withNuxt(
{
ignores: ['gen/', 'proto/'],
},
{
files: ['app/pages/', 'app/layouts/'],
rules: {
'vue/multi-word-component-names': 'off',
},
},
...pluginVue.configs['flat/recommended'],
eslintPluginPrettierRecommended,
{
rules: {
'no-console': 0,
'require-await': 0,
'no-restricted-syntax': ['error', 'IfStatement > ExpressionStatement > AssignmentExpression'],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
);
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default defineNuxtConfig({
'nuxt-zod-i18n',
'@nuxtjs/i18n',
'@galexrt/nuxt-update',
'@nuxt/eslint',
],

future: {
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"postinstall": "COMMIT_REF=$(git describe --tags --exclude='fivenet-*') pnpm nuxi prepare",
"pretty": "pnpm prettier --write ./app/",
"analyze": "pnpm nuxi analyze",
"typecheck": "pnpm nuxi typecheck",
"typecheck": "pnpm vue-tsc --noEmit -p tsconfig.vue-tsc.json",
"lint": "pnpm eslint .",
"i18next-scanner": "npx i18next-scanner --config ./internal/scripts/i18next-scanner.config.cjs"
},
Expand Down Expand Up @@ -63,7 +63,7 @@
},
"devDependencies": {
"@nuxt/devtools": "1.4.2",
"@nuxt/eslint-config": "0.5.7",
"@nuxt/eslint": "^0.5.7",
"@nuxtjs/fontaine": "0.4.3",
"@nuxtjs/i18n": "8.5.3",
"@protobuf-ts/plugin": "2.9.4",
Expand All @@ -85,7 +85,6 @@
"eslint": "9.10.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-tailwindcss": "3.17.4",
"eslint-plugin-vue": "9.28.0",
"i18next-scanner": "4.5.0",
"nuxi": "3.13.2",
Expand Down
Loading

0 comments on commit 2903550

Please sign in to comment.