Skip to content

Commit ed6b56f

Browse files
committedMay 28, 2023
chore: set up project
1 parent 9ea38a1 commit ed6b56f

16 files changed

+6535
-0
lines changed
 

‎.editorconfig

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true

‎.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.prettierrc.js

‎.eslintrc.js

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
"use strict";
2+
3+
module.exports = {
4+
plugins: ["jest", "jest-formatting"],
5+
overrides: [
6+
// source files
7+
{
8+
files: ["*.ts"],
9+
extends: ["@susisu/eslint-config/preset/ts", "prettier"],
10+
parserOptions: {
11+
ecmaVersion: 2022,
12+
sourceType: "module",
13+
project: "./tsconfig.json",
14+
},
15+
env: {
16+
es6: true,
17+
},
18+
rules: {},
19+
},
20+
// test files
21+
{
22+
files: ["src/**/*.spec.ts", "src/**/__tests__/**/*.ts"],
23+
extends: ["plugin:jest/recommended", "plugin:jest-formatting/recommended"],
24+
env: {
25+
"jest/globals": true,
26+
},
27+
},
28+
// script files
29+
{
30+
files: ["*.js"],
31+
extends: ["@susisu/eslint-config/preset/js", "prettier"],
32+
parserOptions: {
33+
ecmaVersion: 2022,
34+
sourceType: "script",
35+
},
36+
env: {
37+
es6: true,
38+
node: true,
39+
},
40+
},
41+
],
42+
};

‎.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.yarn/** linguist-vendored
2+
/.yarn/releases/* binary
3+
/.yarn/plugins/**/* binary
4+
/.pnp.* binary linguist-generated

‎.gitignore

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/lib
2+
3+
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Node.gitignore
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
.pnpm-debug.log*
13+
14+
# Diagnostic reports (https://nodejs.org/api/report.html)
15+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
16+
17+
# Runtime data
18+
pids
19+
*.pid
20+
*.seed
21+
*.pid.lock
22+
23+
# Directory for instrumented libs generated by jscoverage/JSCover
24+
lib-cov
25+
26+
# Coverage directory used by tools like istanbul
27+
coverage
28+
*.lcov
29+
30+
# nyc test coverage
31+
.nyc_output
32+
33+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
34+
.grunt
35+
36+
# Bower dependency directory (https://bower.io/)
37+
bower_components
38+
39+
# node-waf configuration
40+
.lock-wscript
41+
42+
# Compiled binary addons (https://nodejs.org/api/addons.html)
43+
build/Release
44+
45+
# Dependency directories
46+
node_modules/
47+
jspm_packages/
48+
49+
# Snowpack dependency directory (https://snowpack.dev/)
50+
web_modules/
51+
52+
# TypeScript cache
53+
*.tsbuildinfo
54+
55+
# Optional npm cache directory
56+
.npm
57+
58+
# Optional eslint cache
59+
.eslintcache
60+
61+
# Optional stylelint cache
62+
.stylelintcache
63+
64+
# Microbundle cache
65+
.rpt2_cache/
66+
.rts2_cache_cjs/
67+
.rts2_cache_es/
68+
.rts2_cache_umd/
69+
70+
# Optional REPL history
71+
.node_repl_history
72+
73+
# Output of 'npm pack'
74+
*.tgz
75+
76+
# Yarn Integrity file
77+
.yarn-integrity
78+
79+
# dotenv environment variable files
80+
.env
81+
.env.development.local
82+
.env.test.local
83+
.env.production.local
84+
.env.local
85+
86+
# parcel-bundler cache (https://parceljs.org/)
87+
.cache
88+
.parcel-cache
89+
90+
# Next.js build output
91+
.next
92+
out
93+
94+
# Nuxt.js build / generate output
95+
.nuxt
96+
dist
97+
98+
# Gatsby files
99+
.cache/
100+
# Comment in the public line in if your project uses Gatsby and not Next.js
101+
# https://nextjs.org/blog/next-9-1#public-directory-support
102+
# public
103+
104+
# vuepress build output
105+
.vuepress/dist
106+
107+
# vuepress v2.x temp and cache directory
108+
.temp
109+
.cache
110+
111+
# Docusaurus cache and generated files
112+
.docusaurus
113+
114+
# Serverless directories
115+
.serverless/
116+
117+
# FuseBox cache
118+
.fusebox/
119+
120+
# DynamoDB Local files
121+
.dynamodb/
122+
123+
# TernJS port file
124+
.tern-port
125+
126+
# Stores VSCode versions used for testing VSCode extensions
127+
.vscode-test
128+
129+
# yarn v2
130+
.yarn/cache
131+
.yarn/unplugged
132+
.yarn/build-state.yml
133+
.yarn/install-state.gz
134+
.pnp.*

‎.prettierrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"use strict";
2+
3+
module.exports = {
4+
parser: "typescript",
5+
printWidth: 100,
6+
tabWidth: 2,
7+
useTabs: false,
8+
semi: true,
9+
singleQuote: false,
10+
quoteProps: "consistent",
11+
jsxSingleQuote: false,
12+
trailingComma: "es5",
13+
bracketSpacing: true,
14+
bracketSameLine: false,
15+
arrowParens: "avoid",
16+
endOfLine: "lf",
17+
};

‎.yarn/releases/yarn-3.5.1.cjs

+873
Large diffs are not rendered by default.

‎.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.5.1.cjs

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# hokemi

‎jest.config.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
3+
module.exports = {
4+
roots: ["./src"],
5+
testMatch: ["**/*.spec.ts"],
6+
testEnvironment: "node",
7+
collectCoverage: true,
8+
collectCoverageFrom: ["./src/**/*.ts", "!./src/**/*.spec.ts", "!./src/**/__tests__/**/*.ts"],
9+
coverageDirectory: "coverage",
10+
transform: {
11+
"\\.tsx?$": [
12+
"ts-jest",
13+
{
14+
tsconfig: "./tsconfig.test.json",
15+
},
16+
],
17+
},
18+
};

‎package.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@susisu/hokemi",
3+
"version": "0.0.0",
4+
"description": "",
5+
"repository": "https://github.com/susisu/hokemi.git",
6+
"author": "Susisu <susisu2413@yahoo.co.jp>",
7+
"license": "MIT",
8+
"main": "lib/index.js",
9+
"files": [
10+
"lib",
11+
"src",
12+
"!src/**/*.{test,spec}.{ts,tsx}",
13+
"!src/**/__tests__"
14+
],
15+
"scripts": {
16+
"lint": "run-s lint:eslint lint:prettier",
17+
"lint-fix": "run-s lint-fix:eslint lint-fix:prettier",
18+
"lint:eslint": "eslint '*.js' src",
19+
"lint-fix:eslint": "eslint --fix '*.js' src",
20+
"lint:prettier": "prettier --check '*.js' src",
21+
"lint-fix:prettier": "prettier --write '*.js' src",
22+
"test": "jest",
23+
"typecheck": "tsc -p tsconfig.json --noEmit",
24+
"build": "tsc --build tsconfig.build.json",
25+
"clean": "run-s clean:build clean:rm",
26+
"clean:build": "tsc --build tsconfig.build.json --clean",
27+
"clean:rm": "rimraf lib",
28+
"prepublishOnly": "run-s clean lint test build"
29+
},
30+
"packageManager": "yarn@3.5.1",
31+
"devDependencies": {
32+
"@susisu/eslint-config": "^0.0.63",
33+
"@types/jest": "^29.5.1",
34+
"eslint": "^8.41.0",
35+
"eslint-config-prettier": "^8.8.0",
36+
"eslint-plugin-jest": "^27.2.1",
37+
"eslint-plugin-jest-formatting": "^3.1.0",
38+
"jest": "^29.5.0",
39+
"npm-run-all": "^4.1.5",
40+
"prettier": "^2.8.8",
41+
"rimraf": "^5.0.1",
42+
"ts-jest": "^29.1.0",
43+
"typescript": "^5.0.4"
44+
}
45+
}

‎src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

‎tsconfig.build.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": [
4+
"src/**/*.spec.*",
5+
"src/**/__tests__/**/*"
6+
]
7+
}

‎tsconfig.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"rootDir": "src",
4+
"outDir": "lib",
5+
"incremental": true,
6+
"target": "es2020",
7+
"module": "commonjs",
8+
"moduleResolution": "node",
9+
"esModuleInterop": true,
10+
"lib": ["es2020"],
11+
"jsx": "react-jsx",
12+
"strict": true,
13+
"noImplicitOverride": true,
14+
"sourceMap": true,
15+
"declaration": true,
16+
"declarationMap": true
17+
},
18+
"include": [
19+
"src/**/*"
20+
]
21+
}

‎tsconfig.test.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./tsconfig.json"
3+
}

0 commit comments

Comments
 (0)
Please sign in to comment.