Skip to content

Commit 2626419

Browse files
committed
Initial commit
0 parents  commit 2626419

23 files changed

Lines changed: 11535 additions & 0 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
/node_modules
3+
dist

.pretterignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build
2+
dist
3+
node_modules

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"tabWidth": 2,
6+
"useTabs": false,
7+
"printWidth": 120,
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid"
10+
}

LICENSE.md

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] [Devscast](https://devscast.tech)
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.

eslint.config.cjs

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
const { defineConfig } = require("eslint/config");
2+
const tsParser = require("@typescript-eslint/parser");
3+
const tsPlugin = require("@typescript-eslint/eslint-plugin");
4+
const importPlugin = require("eslint-plugin-import");
5+
const prettierPlugin = require("eslint-plugin-prettier");
6+
const unusedImportsPlugin = require("eslint-plugin-unused-imports");
7+
8+
module.exports = defineConfig([
9+
{
10+
files: ["src/**/*.ts"],
11+
languageOptions: {
12+
parser: tsParser,
13+
parserOptions: {
14+
project: "./tsconfig.json",
15+
sourceType: "module",
16+
},
17+
},
18+
settings: {
19+
"import/resolver": {
20+
typescript: {
21+
alwaysTryTypes: true,
22+
project: "./tsconfig.json",
23+
},
24+
},
25+
},
26+
plugins: {
27+
"@typescript-eslint": tsPlugin,
28+
prettier: prettierPlugin,
29+
"unused-imports": unusedImportsPlugin,
30+
import: importPlugin,
31+
},
32+
rules: {
33+
// TypeScript rules
34+
"@typescript-eslint/no-unused-vars": [
35+
"warn",
36+
{
37+
vars: "all",
38+
varsIgnorePattern: "^_",
39+
args: "after-used",
40+
argsIgnorePattern: "^_",
41+
},
42+
],
43+
44+
// Unused imports
45+
"no-unused-vars": "off",
46+
"unused-imports/no-unused-imports": "error",
47+
48+
// Import order
49+
"import/order": [
50+
"error",
51+
{
52+
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
53+
"newlines-between": "always",
54+
alphabetize: {
55+
order: "asc",
56+
caseInsensitive: true,
57+
},
58+
},
59+
],
60+
61+
// Désactivation de règles inutiles
62+
"import/default": "off",
63+
"import/named": "off",
64+
"import/namespace": "error",
65+
"import/export": "error",
66+
67+
// Interdire les extensions dans les imports locaux
68+
"import/extensions": [
69+
"error",
70+
"ignorePackages",
71+
{
72+
ts: "never",
73+
js: "never",
74+
},
75+
],
76+
77+
// Formatage
78+
"prettier/prettier": "error",
79+
},
80+
},
81+
{
82+
ignores: ["dist/*"],
83+
},
84+
]);

0 commit comments

Comments
 (0)