Skip to content

Commit 92961e0

Browse files
committed
🎉 init: Initialize project
0 parents  commit 92961e0

28 files changed

+14224
-0
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Matches multiple files with brace expansion notation
12+
# Set default charset
13+
[*.{js,cjs,mjs,ts,cts,mts,json}]
14+
charset = utf-8
15+
indent_style = space
16+
indent_size = 2

.eslintrc.cjs

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// @ts-check
2+
3+
/* eslint-env node */
4+
5+
/** @satisfies {import("eslint").Linter.Config} */
6+
const config = {
7+
root: true,
8+
extends: [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
12+
"plugin:import/recommended",
13+
"plugin:import/typescript",
14+
"plugin:prettier/recommended",
15+
"plugin:sonarjs/recommended",
16+
],
17+
parser: "@typescript-eslint/parser",
18+
parserOptions: {
19+
ecmaVersion: "latest",
20+
sourceType: "module",
21+
project: ["./tsconfig.json", "./tsconfig.eslint.json"],
22+
tsconfigRootDir: __dirname,
23+
},
24+
ignorePatterns: ["!.lintstagedrc.js"],
25+
plugins: ["sort-destructure-keys"],
26+
rules: {
27+
"@typescript-eslint/consistent-type-imports": [
28+
"error",
29+
{ prefer: "type-imports", disallowTypeAnnotations: false },
30+
],
31+
"@typescript-eslint/no-empty-object-type": "off",
32+
"@typescript-eslint/no-explicit-any": "off",
33+
"@typescript-eslint/no-namespace": "off",
34+
"@typescript-eslint/no-non-null-assertion": "off",
35+
"@typescript-eslint/no-unsafe-argument": "off",
36+
"@typescript-eslint/no-unsafe-assignment": "off",
37+
"@typescript-eslint/no-unsafe-call": "off",
38+
"@typescript-eslint/no-unsafe-member-access": "off",
39+
"@typescript-eslint/no-unsafe-return": "off",
40+
"@typescript-eslint/no-unused-vars": "off", // Already covered by TypeScript
41+
"import/export": "off",
42+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
43+
"import/namespace": "off",
44+
"import/no-unresolved": "off",
45+
"import/order": [
46+
"error",
47+
{
48+
alphabetize: { order: "asc" },
49+
groups: ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"],
50+
"newlines-between": "always",
51+
},
52+
],
53+
"no-undef": "off",
54+
"sonarjs/cognitive-complexity": "off",
55+
"sonarjs/no-duplicate-string": "off",
56+
"sort-destructure-keys/sort-destructure-keys": "error",
57+
"sort-imports": [
58+
"error",
59+
{
60+
ignoreCase: false,
61+
ignoreDeclarationSort: true,
62+
ignoreMemberSort: false,
63+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
64+
},
65+
],
66+
},
67+
reportUnusedDisableDirectives: true,
68+
};
69+
70+
module.exports = config;

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs/
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
# Build
11+
node_modules/
12+
dist/
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea/
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit "${1}"

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
npm run test-types
2+
npm test
3+
4+
npx lint-staged

.lintstagedrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// @ts-check
2+
3+
/** @satisfies {import("lint-staged").Config} */
4+
const config = {
5+
"**/*.{js,ts}":
6+
"eslint --fix --no-error-on-unmatched-pattern --report-unused-disable-directives-severity error --max-warnings 0",
7+
"*.{cjs,mjs,cts,mts}":
8+
"eslint --fix --no-error-on-unmatched-pattern --report-unused-disable-directives-severity error --max-warnings 0",
9+
"**/*.{json,md}": "prettier --log-level=silent --no-error-on-unmatched-pattern --write",
10+
".hintrc": "prettier --log-level=silent --no-error-on-unmatched-pattern --write --parser json",
11+
};
12+
13+
export default config;

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Snowflyt
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)