Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ダークカスタムテーマを作りました。 #4342

Merged
merged 6 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

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

This file was deleted.

15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,28 @@ updates:
schedule:
interval: monthly
open-pull-requests-limit: 10
groups:
non-majors:
update-types:
- 'patch'
- 'minor'
- package-ecosystem: docker
directory: '/'
schedule:
interval: monthly
open-pull-requests-limit: 10
groups:
non-majors:
update-types:
- 'patch'
- 'minor'
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: monthly
open-pull-requests-limit: 10
groups:
non-majors:
update-types:
- 'patch'
- 'minor'
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
with:
node-version-file: ./.node-version
cache: npm
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ./public/fonts
key: font-build-${{ runner.os }}
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
CYPRESS_INSTALL_BINARY: 0
- name: run test:unit
run: npm run test:unit
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: coverage
path: ./coverage
Expand All @@ -127,11 +127,11 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4.1.7
with:
name: coverage
path: ./coverage
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
test-e2e:
name: run test:e2e
runs-on: ubuntu-latest
Expand All @@ -145,7 +145,7 @@ jobs:
with:
node-version-file: ./.node-version
cache: npm
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ./public/fonts
key: font-build-${{ runner.os }}
Expand All @@ -159,7 +159,7 @@ jobs:
env:
CYPRESS_username: ${{ secrets.traQ_username }}
CYPRESS_password: ${{ secrets.traQ_password }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: failed-screenshots
path: ./tests/e2e/screenshots
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# 隔離された環境でビルドを行い、write perm付きトークンをユーザーのコードに与えないよう注意すること
- name: Build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Archive dist/
run: tar -zcvf ./dist.tar.gz ./dist
- name: Create Release and upload dist.tar.gz
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.1.0
20.15.0
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM node:21.1.0-alpine as build
FROM --platform=$BUILDPLATFORM node:22.9.0-alpine as build

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Preview Image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
WORKDIR /app

ENV CYPRESS_INSTALL_BINARY=0
Expand All @@ -10,7 +10,7 @@
RUN NODE_ENV=production npm run build:with-font


FROM caddy:2.7.6-alpine
FROM caddy:2.8.4-alpine
EXPOSE 80

COPY build/docker/Caddyfile /etc/caddy/Caddyfile
Expand All @@ -19,8 +19,8 @@

COPY --from=build /app/dist /usr/share/caddy

ENV APP_NAME traQ

Check warning on line 22 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Preview Image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV THEME_COLOR #0D67EA

Check warning on line 23 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Preview Image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# 設定上書き処理用に、.brを消して、元の設定を別のディレクトリに保存しておく
RUN cd /usr/share/caddy && \
Expand Down
2 changes: 2 additions & 0 deletions build/gen-mplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import util from 'util'
import esbuild from 'esbuild'
import { resolveToEsbuildTarget } from 'esbuild-plugin-browserslist'
import browserslist from 'browserslist'
import { Buffer } from 'node:buffer'
import process from 'process'

const brotliCompress = util.promisify(zlib.brotliCompress)

Expand Down
1 change: 1 addition & 0 deletions eslint-vue-ts-recommended.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* 適用されるようにするためにoverridesに'*.vue'を追加する
*/

// eslint-disable-next-line @typescript-eslint/no-require-imports
const typescriptEslintEslintRecommended = require('./node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended')

module.exports = {
Expand Down
142 changes: 142 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import unusedImports from 'eslint-plugin-unused-imports'
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'
import stylisticTs from '@stylistic/eslint-plugin-ts'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [
{
ignores: ['**/coverage', '**/dist', '**/node_modules']
},
...compat.extends(
'eslint:recommended',
'./eslint-vue-ts-recommended.cjs',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'prettier'
),
{
plugins: {
'unused-imports': unusedImports,
'@stylistic/ts': stylisticTs
},

linterOptions: {
reportUnusedDisableDirectives: true
},

languageOptions: {
ecmaVersion: 5,
sourceType: 'script',

parserOptions: {
parser: '@typescript-eslint/parser'
}
},

rules: {
'no-console': 'warn',
'no-debugger': 'warn',

'no-empty': [
'error',
{
allowEmptyCatch: true
}
],

eqeqeq: 'error',
'vue/eqeqeq': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',

'@stylistic/ts/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none'
},

singleline: {
delimiter: 'semi'
}
}
],

'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': 'off',
'vue/require-default-prop': 'off',
'vue/no-v-html': 'off',

'vue/block-lang': [
'error',
{
script: {
lang: 'ts'
},

style: {
lang: 'scss'
}
}
],

'vue/component-api-style': ['error', ['script-setup']],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],

'vue/v-on-event-hyphenation': [
'error',
'always',
{
autofix: true
}
],

'vue/v-on-function-call': 'error',
'vue/no-template-target-blank': 'error',
'vue/prefer-true-attribute-shorthand': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'error'
}
},
{
files: ['**/*.cjs'],
ignores: ['*/**/*.cjs'],

languageOptions: {
globals: {
...globals.node
}
},

rules: {
'@typescript-eslint/no-var-requires': 'off'
}
},
...compat.extends('plugin:cypress/recommended').map(config => ({
...config,
files: ['**/tests/e2e/**/*.{js,cjs,jsx,ts,tsx}']
})),
{
files: ['**/tests/e2e/**/*.{js,cjs,jsx,ts,tsx}'],

languageOptions: {
globals: {
...globals.node
}
}
}
]
Loading
Loading