diff --git a/.eslintrc.js b/.eslintrc.js index 74b279c9..11542f51 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,30 +2,48 @@ module.exports = { root: true, env: { browser: true, - node: true + node: true, }, parser: 'vue-eslint-parser', parserOptions: { ecmaVersion: 2016, - parser: 'babel-eslint' + parser: 'babel-eslint', }, extends: [ '@nuxtjs', 'plugin:nuxt/recommended', - 'plugin:vue/recommended' - ], - plugins: [ - 'vue', - 'html' + 'plugin:vue/recommended', + 'prettier', ], + plugins: ['html', 'vue'], // add your custom rules here rules: { - quotes: ['error', 'single'], - camelcase: 'warn', - 'vue/no-mutating-props': 'warn', - 'brace-style': 'warn', - 'eqeqeq': 'warn', - 'quotes': 'warn', - semi: 'error' - } + // タグの最後で改行しないで + 'vue/html-closing-bracket-newline': [2, { multiline: 'never' }], + // 不要なカッコは消す + 'no-extra-parens': 1, + // 無駄なスペースは削除 + 'no-multi-spaces': 2, + // 不要な空白行は削除。2行開けてたらエラー + 'no-multiple-empty-lines': [2, { max: 1 }], + // 関数とカッコはあけない(function hoge() {/** */}) + 'func-call-spacing': [2, 'never'], + // true/falseを無駄に使うな + 'no-unneeded-ternary': 2, + // varは禁止 + 'no-var': 2, + // かっこの中はスペースなし!違和感 + 'space-in-parens': [2, 'never'], + // コンソールは許可 + 'no-console': 0, + // カンマの前後にスペース入れる? + 'comma-spacing': 2, + // 配列のindexには空白入れるな(hogehoge[ x ]) + 'computed-property-spacing': 2, + // キー + 'key-spacing': 2, + // キーワードの前後には適切なスペースを + 'keyword-spacing': 2, + 'camelcase': 0, + }, } diff --git a/.github/workflows/generate-pages.yml b/.github/workflows/generate-pages.yml index 7ec23bda..16ca60cc 100644 --- a/.github/workflows/generate-pages.yml +++ b/.github/workflows/generate-pages.yml @@ -9,9 +9,9 @@ jobs: - uses: actions/checkout@v2 - name: setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '14.x' + node-version: '20.10.0' - name: Cache dependencies uses: actions/cache@v1 diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 5ac6da9e..b637bd1a 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -12,9 +12,9 @@ jobs: - uses: actions/checkout@v2 - name: setup node - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '14.x' + node-version: '20.10.0' - name: Cache dependencies uses: actions/cache@v1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 42dfaf83..52faaceb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,8 +6,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - name: setup node + uses: actions/setup-node@v4 with: - node-version: 14 + node-version: '20.10.0' - run: yarn install - run: yarn run lint diff --git a/.node-version b/.node-version index 0a9f3027..d5a15960 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -14.17.2 +20.10.0 diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 00000000..cc5ab511 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,17 @@ +tabWidth: 2 +useTabs: false +semi: true +singleQuote: false +quoteProps: "as-needed" +trailingComma: "es5" +bracketSpacing: true +bracketSameLine: false +arrowParens: "always" +requirePragma: false +insertPragma: false +htmlWhitespaceSensitivity: "css" +vueIndentScriptAndStyle: true +endOfLine: "lf" +embeddedLanguageFormatting: "off" +singleAttributePerLine: false + diff --git a/.settings.json b/.settings.json new file mode 100644 index 00000000..8d9c9bc0 --- /dev/null +++ b/.settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": false +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..62098c32 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "eslint.validate": [] +} \ No newline at end of file diff --git a/components/Logo.vue b/components/Logo.vue index 6c728541..8a307066 100644 --- a/components/Logo.vue +++ b/components/Logo.vue @@ -1,13 +1,13 @@ -