Skip to content

Commit

Permalink
build: tech update v2
Browse files Browse the repository at this point in the history
  • Loading branch information
AloisSeckar committed Sep 1, 2024
1 parent c4fbfca commit ae9a6c7
Show file tree
Hide file tree
Showing 7 changed files with 10,506 additions and 12,856 deletions.
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

{
// enable auto-linting
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit"
},
// Enable ESlint flat config support
"eslint.experimental.useFlatConfig": true
// ESlint flat config
"eslint.useFlatConfig": true
}
3 changes: 1 addition & 2 deletions components/CurrentTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
Current time by
<span class="link">
<NuxtLink to="https://github.com/danielroe/nuxt-time">Nuxt Time</NuxtLink>
</span>
:
</span>:
<NuxtTime
:datetime="currentDate"
year="numeric"
Expand Down
32 changes: 19 additions & 13 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt({
// config is being passed as an array of separate objects
// as suggested here: https://github.com/nuxt/eslint/discussions/413

export default withNuxt([

// files to be processed (JS/TS + Vue components)
{ files: ['**/*.js', '**/*.ts', '**/*.vue'] },

// `rules` section can follow, where you can change default eslint behaviour if needed
// you can adjust or even turn off some rules if you cannot or don't want to satisfy them
// it is not recommended to do so though

rules: {
{
rules: {
// default for this rule is "1", but I find it too restrictive
// https://eslint.vuejs.org/rules/max-attributes-per-line.html
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 4,
},
multiline: {
max: 3,
},
}],
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 4,
},
multiline: {
max: 3,
},
}],
},
},

})
])
3 changes: 2 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
compatibilityDate: '2024-08-01',
compatibilityDate: '2024-09-01',
modules: [
'nuxt-time',
'nuxt-security',
Expand All @@ -14,6 +14,7 @@ export default defineNuxtConfig({
'@vueuse/nuxt',
],
eslint: {
// simple eslint config - see eslint.config.mjs
config: {
stylistic: true,
},
Expand Down
Loading

0 comments on commit ae9a6c7

Please sign in to comment.