chore: Initial commit - setup tooling
commit
3315a45326
|
@ -0,0 +1,10 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,json,yml}]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
|
@ -0,0 +1,4 @@
|
|||
/.yarn/** linguist-vendored
|
||||
/.yarn/releases/* binary
|
||||
/.yarn/plugins/**/* binary
|
||||
/.pnp.* binary linguist-generated
|
|
@ -0,0 +1,18 @@
|
|||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
# Swap the comments on the following lines if you wish to use zero-installs
|
||||
# In that case, don't forget to run `yarn config set enableGlobalCache false`!
|
||||
# Documentation here: https://yarnpkg.com/features/caching#zero-installs
|
||||
|
||||
#!.yarn/cache
|
||||
.pnp.*
|
||||
|
||||
.env
|
||||
dist
|
||||
test-coverage
|
||||
node_modules
|
|
@ -0,0 +1 @@
|
|||
yarn lint-staged
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix", "eslint"],
|
||||
"*.{json,css,md}": ["prettier --write"]
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
.yarn
|
||||
yarn.lock
|
||||
.husky
|
||||
.prettierignore
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"arcanis.vscode-zipfs",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": []
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"search.exclude": {
|
||||
"**/.yarn": true,
|
||||
"**/.pnp.*": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
nodeLinker: node-modules
|
|
@ -0,0 +1,9 @@
|
|||
# Statistiques
|
||||
|
||||
# Setup
|
||||
|
||||
- Configure a .env defining the NOTION_TOKEN variable
|
||||
- Run
|
||||
`yarn install
|
||||
yarn run update-stats
|
||||
`
|
|
@ -0,0 +1,14 @@
|
|||
import pluginJs from "@eslint/js";
|
||||
import prettier from "eslint-config-prettier";
|
||||
import globals from "globals";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default [
|
||||
{ languageOptions: { globals: globals.browser } },
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
prettier,
|
||||
{
|
||||
ignores: [".yarn/*"],
|
||||
},
|
||||
];
|
|
@ -0,0 +1,15 @@
|
|||
import type { Config } from "jest";
|
||||
|
||||
const config: Config = {
|
||||
collectCoverage: true,
|
||||
coverageDirectory: "../test-coverage",
|
||||
coverageProvider: "v8",
|
||||
preset: "ts-jest/presets/default-esm",
|
||||
testEnvironment: "jest-environment-node",
|
||||
transform: {
|
||||
"^.+\\.m?[t]s?$": ["ts-jest", { useESM: true }],
|
||||
},
|
||||
rootDir: "src",
|
||||
};
|
||||
|
||||
export default config;
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "statistiques",
|
||||
"packageManager": "yarn@4.2.2",
|
||||
"dependencies": {
|
||||
"@notionhq/client": "^2.2.14",
|
||||
"date-fns": "^3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.3.0",
|
||||
"@jest/globals": "^29.7.0",
|
||||
"@types/node": "^20.12.12",
|
||||
"eslint": "9.x",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"globals": "^15.3.0",
|
||||
"husky": "^9.0.11",
|
||||
"jest": "^29.7.0",
|
||||
"lint-staged": "^15.2.5",
|
||||
"prettier": "^2.8.4",
|
||||
"ts-jest": "^29.1.4",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.4.5",
|
||||
"typescript-eslint": "^7.11.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node -r ts-node/register --env-file=.env src/index.ts",
|
||||
"test": "jest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import { describe, expect, test } from "@jest/globals";
|
||||
import { hello } from ".";
|
||||
|
||||
describe("module", () => {
|
||||
test("test hello", () => {
|
||||
expect(hello()).toBe("hello");
|
||||
});
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
export function hello() {
|
||||
return "hello";
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022"],
|
||||
"module": "Node16",
|
||||
"moduleResolution": "Node16",
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
Loading…
Reference in New Issue