Skip to content

Commit

Permalink
chore: setup linter
Browse files Browse the repository at this point in the history
  • Loading branch information
yanskun committed Oct 21, 2023
1 parent 20984b2 commit 57a25a5
Show file tree
Hide file tree
Showing 5 changed files with 1,633 additions and 30 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
'@vue/prettier'
],
overrides: [
{
env: {
node: true
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script'
}
}
],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'vue'],
rules: {}
}
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"semi": false,
"vueIndentScriptAndStyle": true,
"trailingComma": "none"
}
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
},
"devDependencies": {
"@nuxt/content": "^2.8.5",
"nuxt": "^3.7.4"
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@vue/eslint-config-prettier": "^8.0.0",
"eslint": "^8.52.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.17.0",
"nuxt": "^3.7.4",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
}
}
4 changes: 2 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
</template>

<script setup lang="ts">
import type { QueryBuilderParams } from '@nuxt/content/dist/runtime/types'
const query: QueryBuilderParams = { sort: [{ date: -1 }] }
import type { QueryBuilderParams } from '@nuxt/content/dist/runtime/types'
const query: QueryBuilderParams = { sort: [{ date: -1 }] }
</script>
Loading

0 comments on commit 57a25a5

Please sign in to comment.