Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
drewjbartlett committed Nov 26, 2023
0 parents commit 4634c26
Show file tree
Hide file tree
Showing 20 changed files with 8,214 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/*

61 changes: 61 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
parser: {
ts: '@typescript-eslint/parser',
js: '@typescript-eslint/parser',
},
},
plugins: ['no-relative-import-paths', 'prettier'],
extends: ['plugin:@typescript-eslint/recommended'],
root: true,
env: {
browser: true,
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'src/**/*.test.tsx', 'src/**/*.test.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-namespace': 'off',
'no-undef': ['error'],
'no-relative-import-paths/no-relative-import-paths': ['error'],
'no-console': ['error', { allow: ['warn', 'error'] }],
camelcase: ['error', { properties: 'never', ignoreDestructuring: true }],
'prettier/prettier': 'error',
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['src/*'],
message: 'src/ should use the @src/ alias instead',
},
{
group: ['*__exports*'],
message: '__exports/ should not be used for imports',
},
],
},
],
},
overrides: [
{
files: ['jest.config.js'],
},
{
files: ['**/?(*.)+(spec|test).[jt]s?(x)'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'no-restricted-imports': 'off',
},
},
],
};
25 changes: 25 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Core CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.16"
cache: "npm"
- run: node -v
- run: npm -v
- run: npm ci
- run: npm run lint
- run: npm test
- run: npx turbo build
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
dist
.turbo
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.16.0
Empty file added .prettierignore
Empty file.
26 changes: 26 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 120,
"overrides": [
{
"files": "*.json",
"options": {
"tabWidth": 4
}
},
{
"files": "*.scss",
"options": {
"tabWidth": 4
}
},
{
"files": "*.css",
"options": {
"tabWidth": 4
}
}
]
}
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# i17n

[![Core CI](https://github.com/drewjbartlett/ioc/actions/workflows/core.yml/badge.svg)](https://github.com/drewjbartlett/ioc/actions/workflows/core.yml)



### Features

- ✅ 100% TypeScript
-

### Installation

```bash
npm i @drewjbartlett/ioc --save
```

### Usage

### API

- bind
- bindSingleton
- bindFactory
- bindOnce
- resetSingleton
- bound
- unbind
- swap
- get
14 changes: 14 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
verbose: true,
roots: ['<rootDir>'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@src/(.*)$': '<rootDir>/src/$1',
'^@test/(.*)$': '<rootDir>/test/$1',
},
moduleFileExtensions: ['ts', 'js'],
testMatch: ['**/?(*.)+(spec|test).(ts|js)?(x)'],
transform: {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
};
Loading

0 comments on commit 4634c26

Please # to comment.