Skip to content

Commit

Permalink
chore: complete initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Nov 19, 2023
1 parent 84dc495 commit 63c723d
Show file tree
Hide file tree
Showing 63 changed files with 2,206 additions and 989 deletions.
3 changes: 1 addition & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"fixed": [],
"linked": [],
"access": "public",
"updateInternalDependencies": "patch",
"ignore": ["@acme/docs"]
"updateInternalDependencies": "patch"
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

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

[*.md]
trim_trailing_whitespace = false
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-acme`
extends: ["acme"],
// This tells ESLint to load the config from the package `@hanabira/config`
extends: ["hana"],
settings: {
next: {
rootDir: ["apps/*/"],
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ dist-ssr
server/dist
public/dist
.turbo

test
4 changes: 0 additions & 4 deletions apps/docs/.eslintrc.js

This file was deleted.

5 changes: 0 additions & 5 deletions apps/docs/next-env.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/docs/next.config.js

This file was deleted.

27 changes: 0 additions & 27 deletions apps/docs/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions apps/docs/src/app/layout.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions apps/docs/src/app/page.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/docs/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@changesets/cli": "^2.22.0",
"eslint": "^7.32.0",
"eslint-config-acme": "workspace:*",
"@hanabira/config": "workspace:*",
"prettier": "^2.5.1",
"turbo": "latest"
},
Expand Down
4 changes: 0 additions & 4 deletions packages/acme-core/.eslintrc.js

This file was deleted.

10 changes: 0 additions & 10 deletions packages/acme-tsconfig/node14.json

This file was deleted.

9 changes: 0 additions & 9 deletions packages/acme-tsconfig/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/acme-utils/.eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions packages/auth/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['@hanabira/config/eslint'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@acme/core",
"name": "@hanabira/auth",
"version": "0.0.0",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -16,11 +16,10 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"devDependencies": {
"@acme/tsconfig": "workspace:*",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"eslint": "^7.32.0",
"eslint-config-acme": "workspace:*",
"@hanabira/config": "workspace:*",
"react": "^17.0.2",
"tsup": "^6.0.1",
"typescript": "^5.2.2"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@acme/tsconfig/react-library.json",
"extends": "@hanabira/config/tsconfig/react-library.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
}
File renamed without changes.
96 changes: 96 additions & 0 deletions packages/config/eslint/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
module.exports = {
extends: ['next', 'eslint:recommended', 'turbo', 'prettier'],
plugins: [
'@typescript-eslint',
'tailwindcss',
'simple-import-sort',
'prettier',
],
settings: {
tailwindcss: {
callees: ['classNames'],
officialSorting: true,
},
next: {
rootDir: ['apps/*/', 'packages/*/'],
},
},
rules: {
'@next/next/no-html-link-for-pages': 'off',
'react/jsx-key': 'error',
'react/react-in-jsx-scope': 'off',
'prefer-const': 'error',
'no-console': 1,
'no-multi-spaces': 'error',
'no-multiple-empty-lines': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-param-reassign': [
'error',
{
props: false,
},
],
'no-use-before-define': 'error',
'max-depth': ['error', 5],
'max-nested-callbacks': ['error', 4],
'max-len': [
'error',
{
code: 100,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
},
],
'prettier/prettier': 'error',
'react/jsx-filename-extension': [
1,
{
extensions: ['.ts', '.tsx'],
},
],
'react/no-danger': 0,
'react/prop-types': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react/self-closing-comp': [
'error',
{
component: true,
html: true,
},
],
'react/jsx-curly-brace-presence': [
'error',
{
props: 'never',
children: 'never',
},
],
'space-in-parens': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'react/jsx-sort-props': [
2,
{
shorthandFirst: true,
multiline: 'last',
reservedFirst: ['key'],
callbacksLast: true,
},
],
'tailwindcss/classnames-order': 'off',
'tailwindcss/no-custom-classname': 'off',
'tailwindcss/no-contradicting-classname': 'error',
},
overrides: [
{
files: ['*.test.ts', '*.test.tsx'],
rules: {
'max-nested-callbacks': ['error', 5],
},
},
],
};
23 changes: 23 additions & 0 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@hanabira/config",
"version": "0.0.0",
"files": [
"eslint",
"tsconfig"
],
"scripts": {
"build": "mkdir dist && cp -R tsconfig dist && cp -R eslint dist && cp next.config.js dist",
"release": "pnpm publish"
},
"dependencies": {
"@changesets/cli": "^2.26.2",
"next": "^13.4.12"
},
"devDependencies": {
"@types/node": "^18.11.17",
"tsup": "^6.1.3"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"noUnusedParameters": false,
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true
"strict": true,
"resolveJsonModule": true
},
"exclude": ["node_modules"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"plugins": [{ "name": "next" }],
"target": "ES6",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"declaration": false,
"declarationMap": false,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"],
"esModuleInterop": true,
"module": "esnext",
"noEmit": true,
"resolveJsonModule": true,
"target": "es5"
"isolatedModules": true,
"jsx": "preserve",
"declaration": false,
"declarationMap": false
},
"include": ["src", "next-env.d.ts"],
"exclude": ["node_modules"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"display": "React Library",
"extends": "./base.json",
"compilerOptions": {
"jsx": "react-jsx",
"lib": ["dom", "ES2015"],
"lib": ["ES2015", "DOM"],
"module": "ESNext",
"target": "es6"
"target": "ES6",
"jsx": "react-jsx"
}
}
11 changes: 0 additions & 11 deletions packages/eslint-config-acme/index.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/eslint-config-acme/package.json

This file was deleted.

4 changes: 4 additions & 0 deletions packages/hana/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['@hanabira/config/eslint'],
};
Loading

0 comments on commit 63c723d

Please sign in to comment.