Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f338e82e72
|
+3
-3
@@ -1,6 +1,6 @@
|
||||
bun.lockb
|
||||
package-lock.json
|
||||
node_modules/
|
||||
.idea/
|
||||
._*
|
||||
.idea/
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
.woodpecker/
|
||||
test/
|
||||
.gitignore
|
||||
README.md
|
||||
.prettierignore
|
||||
.prettierrc
|
||||
eslint.config.ts
|
||||
@@ -0,0 +1,3 @@
|
||||
.woodpecker
|
||||
node_modules
|
||||
dist
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"bracketSpacing": false,
|
||||
"printWidth": 120,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": true,
|
||||
"trailingComma": "none"
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
when:
|
||||
- path:
|
||||
include: ['**/*.{js,jsx,ts,tsx}']
|
||||
|
||||
steps:
|
||||
install:
|
||||
image: node
|
||||
when:
|
||||
- event: [pull_request, push, manual]
|
||||
commands:
|
||||
- npm install
|
||||
|
||||
typecheck:
|
||||
image: node
|
||||
when:
|
||||
- event: [pull_request, push, manual]
|
||||
depends_on: install
|
||||
commands:
|
||||
- npm run typecheck
|
||||
|
||||
lint:
|
||||
image: node
|
||||
when:
|
||||
- event: [pull_request, push, manual]
|
||||
depends_on: install
|
||||
commands:
|
||||
- npm run lint
|
||||
|
||||
fmt:
|
||||
image: node
|
||||
when:
|
||||
- event: [pull_request, push, manual]
|
||||
depends_on: install
|
||||
commands:
|
||||
- npm run check:fmt
|
||||
|
||||
test:
|
||||
image: node
|
||||
when:
|
||||
- event: [pull_request, push, manual]
|
||||
depends_on: install
|
||||
commands:
|
||||
- npm run test
|
||||
|
||||
check:
|
||||
image: node
|
||||
when:
|
||||
- event: [pull_request, push, manual]
|
||||
depends_on: install
|
||||
commands:
|
||||
- npm run check
|
||||
@@ -0,0 +1,2 @@
|
||||
# Console logger
|
||||
Using package [log](https://git.pband.ch/typescript/log), logs to console
|
||||
@@ -0,0 +1,15 @@
|
||||
import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import {defineConfig, globalIgnores} from 'eslint/config'
|
||||
|
||||
export default defineConfig([
|
||||
tseslint.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||||
plugins: {js},
|
||||
extends: ['js/recommended'],
|
||||
languageOptions: {globals: {...globals.browser, ...globals.node}}
|
||||
},
|
||||
globalIgnores(['dist'])
|
||||
])
|
||||
+23
-5
@@ -2,14 +2,32 @@
|
||||
"name": "logger-console",
|
||||
"description": "Logger to console, for client and server",
|
||||
"version": "1.0.0",
|
||||
|
||||
"author": "Pascal Perrenoud <pascal@pband.ch>",
|
||||
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
"files": ["index.ts"],
|
||||
"scripts": {
|
||||
"check": "clear ; npm run typecheck && npm run lint && npm run check:fmt && clear && echo 'OK'",
|
||||
"check:fmt": "npx prettier -c **/*.{js,jsx,ts,tsx}",
|
||||
"fmt": "prettier --write **/*.{js,jsx,ts,tsx}",
|
||||
"lint": "eslint **/*.{js,jsx,ts,tsx}",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"log": "git+https://git.pband.ch/typescript/log.git"
|
||||
"log": "git+ssh://git@git.pband.ch:typescript/log.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.35.0",
|
||||
"eslint": "^9.35.0",
|
||||
"globals": "^16.4.0",
|
||||
"jiti": "^2.5.1",
|
||||
"prettier": "^3.6.2",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript-eslint": "^8.43.0"
|
||||
},
|
||||
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
}
|
||||
}
|
||||
|
||||
+8
-26
@@ -1,32 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
// Enable latest features
|
||||
"lib": ["ESNext","dom"],
|
||||
"target": "ESNext",
|
||||
"target": "ES2020",
|
||||
"module": "ESNext",
|
||||
"moduleDetection": "force",
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
|
||||
// Bundler mode
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
|
||||
// Best practices
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Some stricter flags (disabled by default)
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noPropertyAccessFromIndexSignature": false
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
|
||||
"include": [
|
||||
"index.ts",
|
||||
]
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user