Skip to content

Commit

Permalink
Merge pull request #7 from nyawach/feature/fix-eslint
Browse files Browse the repository at this point in the history
ESLint / Prettier を動かすところまで
  • Loading branch information
himeno-yusuke committed Jan 28, 2022
2 parents e93a83e + 2312f68 commit 14ce66d
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 17 deletions.
6 changes: 4 additions & 2 deletions 0022-nuxt-bridge/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ module.exports = {
extends: [
'@nuxtjs/eslint-config-typescript',
'plugin:nuxt/recommended',
'prettier',
'eslint-config-prettier',
],
plugins: [],
// add your custom rules here
rules: {},
rules: {
'vue/multi-word-component-names': 'off',
},
}
3 changes: 3 additions & 0 deletions 0022-nuxt-bridge/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ typings/
# Nuxt generate
dist

# Nuxt 3 output
.output

# vuepress build output
.vuepress/dist

Expand Down
7 changes: 6 additions & 1 deletion 0022-nuxt-bridge/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"semi": false,
"singleQuote": true
"arrowParens": "avoid",
"singleQuote": true,
"pugAttributeSeparator": "none",
"pugSingleFileComponentIndentation": true,
"pugWrapAttributesThreshold": 1,
"pugSingleQuote": false
}
4 changes: 2 additions & 2 deletions 0022-nuxt-bridge/assets/translation/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"World": "World!",
"Hello {world}!": "Hello {world}!"
"World": "World!",
"Hello {world}!": "Hello {world}!"
}
4 changes: 2 additions & 2 deletions 0022-nuxt-bridge/assets/translation/ja.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"World": "世界!",
"Hello {world}!": "こんにちは、{world}!"
"World": "世界!",
"Hello {world}!": "こんにちは、{world}!"
}
4 changes: 2 additions & 2 deletions 0022-nuxt-bridge/components/Tutorial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h1>{{ text }}</h1>
<h2>
<i18n path="Hello {world}!">
<template v-slot:world>
<template #world>
<b>{{ $t('World') }}</b>
</template>
</i18n>
Expand All @@ -26,6 +26,6 @@ export default defineComponent({
context.root.$i18n.setLocale(newLang)
})
return { lang }
}
},
})
</script>
4 changes: 1 addition & 3 deletions 0022-nuxt-bridge/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ export default defineNuxtConfig({
buildModules: [],

// Modules: https://go.nuxtjs.dev/config-modules
modules: [
'@nuxtjs/i18n',
],
modules: ['@nuxtjs/i18n'],

// Build Configuration: https://go.nuxtjs.dev/config-build
build: {},
Expand Down
6 changes: 4 additions & 2 deletions 0022-nuxt-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"build": "nuxi generate",
"start": "nuxi preview",
"lint:js": "eslint --ext \".js,.ts,.vue\" --ignore-path .gitignore .",
"lint:prettier": "prettier --check .",
"lint:prettier": "prettier --check ./**/*.{vue,ts,js}",
"lint": "yarn lint:js && yarn lint:prettier",
"lintfix": "prettier --write --list-different . && yarn lint:js --fix",
"lint:fix": "prettier --write --list-different . && yarn lint:js --fix",
"test": "jest"
},
"dependencies": {
Expand All @@ -27,6 +27,7 @@
"@nuxtjs/eslint-config-typescript": "^8.0.0",
"@nuxtjs/eslint-module": "^3.0.2",
"@nuxtjs/i18n": "^7.2.0",
"@prettier/plugin-pug": "^1.19.2",
"@vue/test-utils": "^1.3.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^27.4.4",
Expand All @@ -42,6 +43,7 @@
"stylus": "^0.56.0",
"stylus-loader": "3.0.2",
"ts-jest": "^27.1.1",
"typescript": "^4.5.5",
"vue-jest": "^3.0.4"
}
}
4 changes: 2 additions & 2 deletions 0022-nuxt-bridge/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template lang="pug">
main
Tutorial
main
Tutorial
</template>

<script lang="ts">
Expand Down
14 changes: 13 additions & 1 deletion 0022-nuxt-bridge/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,13 @@
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1"
integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==

"@prettier/plugin-pug@^1.19.2":
version "1.19.2"
resolved "https://registry.yarnpkg.com/@prettier/plugin-pug/-/plugin-pug-1.19.2.tgz#ac0d433b8decbfc8efc59498da8436fbe4b29099"
integrity sha512-Izo+m3pb15Ym7t3J+u22kun7bQXZOj+lAqkIc5ifxwd9En9OqcCShZz7eABORmzmY276IjSfY92Ijd23nLR68Q==
dependencies:
pug-lexer "^5.0.0"

"@rollup/plugin-alias@^3.1.9":
version "3.1.9"
resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.9.tgz#a5d267548fe48441f34be8323fb64d1d4a1b3fdf"
Expand Down Expand Up @@ -10688,7 +10695,7 @@ pug-filters@^4.0.0:
pug-walk "^2.0.0"
resolve "^1.15.1"

pug-lexer@^5.0.1:
pug-lexer@^5.0.0, pug-lexer@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/pug-lexer/-/pug-lexer-5.0.1.tgz#ae44628c5bef9b190b665683b288ca9024b8b0d5"
integrity sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==
Expand Down Expand Up @@ -12446,6 +12453,11 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^4.5.5:
version "4.5.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==

ua-parser-js@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.2.tgz#e2976c34dbfb30b15d2c300b2a53eac87c57a775"
Expand Down

0 comments on commit 14ce66d

Please sign in to comment.