Skip to content

Commit

Permalink
Merge pull request #65 from appleple/fix/v15/create-function
Browse files Browse the repository at this point in the history
生成するカスタムフィールドコードにモダンなタグを追加
  • Loading branch information
atsu666 authored Nov 7, 2024
2 parents 7db7837 + ba67da9 commit 4cfe780
Show file tree
Hide file tree
Showing 111 changed files with 39,127 additions and 12,223 deletions.
68 changes: 68 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
root = true
# 初めの行に記述する。この記述をすることで、フォルダ以下のディレクトリのみにルールが適用される

#[*.css] // 適用したいファイルを指定
#indent_style = space // シャープでコメントできる

[*]
# すべてのファイルに適用する
charset = utf-8
# 文字コードを統一
indent_style = space
#インデントを統一する。「tab」か「 space」
indent_size = 2
# インデントの数を統一
trim_trailing_whitespace = true
# 行末のホワイトスペースを削除
insert_final_newline = true
# フォルダの最後の行に改行
end_of_line = lf

[*.php]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

[*.js]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.ts]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.tsx]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.scss]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.html]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2

[*.yaml]
indent_style = space
indent_size = 2
58 changes: 58 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module.exports = {
root: true,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'prettier',
],
plugins: ['react', 'jsx-a11y'],
rules: {
'react/prop-types': 'off',
// 関数コンポーネントは関数宣言を強制
'react/function-component-definition': [
'error',
{
namedComponents: 'function-declaration',
unnamedComponents: 'function-expression',
},
],
'jsx-a11y/label-has-associated-control': 'off',
'react/no-children-prop': 'off',
},
overrides: [
// プロジェクトにJavaScriptとTypeScriptが共存しているため、
// ts, tsxの拡張子のファイルは別途TypeScript用のルールを適用
{
files: ['**/*.ts', '**/*.tsx'],
extends: ['plugin:@typescript-eslint/recommended'],
plugins: ['@typescript-eslint'],
rules: {
// 未使用変数を禁止
'@typescript-eslint/no-unused-vars': 'error',
// 定義前の変数の使用に警告
'@typescript-eslint/no-use-before-define': 'warn',
},
},
],
settings: {
react: {
version: 'detect',
},
'import/resolver': {
webpack: {
config: 'webpack.prod.js',
},
},
},
parser: '@typescript-eslint/parser',
};
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
run: |
npm install
npm run build --if-present
npm test
# npm test
env:
CI: true
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{ts,tsx,js,jsx}": ["prettier --write"]
}
Loading

0 comments on commit 4cfe780

Please sign in to comment.