Skip to content

Commit 402814a

Browse files
committed
add first version of zod locales
1 parent e89af20 commit 402814a

22 files changed

Lines changed: 12975 additions & 0 deletions

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintrc.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"node": true,
5+
"browser": true,
6+
"es6": true,
7+
"commonjs": true
8+
},
9+
"plugins": [
10+
"@typescript-eslint",
11+
"import",
12+
"prettier",
13+
"formatjs"
14+
],
15+
"extends": [
16+
"plugin:@typescript-eslint/recommended",
17+
"plugin:prettier/recommended",
18+
"plugin:import/recommended",
19+
"plugin:import/typescript",
20+
"plugin:jest/recommended"
21+
],
22+
"parserOptions": {
23+
"sourceType": "module",
24+
"ecmaVersion": 2018
25+
},
26+
"rules": {
27+
"@typescript-eslint/no-unused-vars": "error",
28+
"@typescript-eslint/member-delimiter-style": "off",
29+
"@typescript-eslint/explicit-function-return-type": "off",
30+
"formatjs/enforce-default-message": ["error", "literal"],
31+
"formatjs/enforce-placeholders": "error",
32+
"formatjs/no-multiple-whitespaces": "error",
33+
"formatjs/enforce-id": "error",
34+
"import/order": [
35+
"error",
36+
{
37+
"groups": ["builtin", "external", "unknown", "parent", "sibling", "index"]
38+
}
39+
]
40+
}
41+
}

.githooks/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -o pipefail
5+
6+
npm run lint

.github/workflows/main.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
tags-ignore:
6+
- '**'
7+
8+
jobs:
9+
checks:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: '16.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
- uses: actions/cache@v2
18+
with:
19+
path: ~/.npm
20+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
21+
- run: npm ci
22+
- run: npm run lint
23+
- run: npm run typecheck
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Create Relase & Publish Package
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/create-release@v1
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
with:
15+
tag_name: ${{ github.ref }}
16+
release_name: Release ${{ github.ref }}
17+
draft: false
18+
prerelease: false
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: '16.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
- run: npm ci
24+
- run: npm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Basic
2+
.DS_Store
3+
4+
# IDE
5+
/.idea
6+
/.vscode
7+
8+
# Project
9+
/node_modules
10+
/dist
11+
/translations-template.json

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false
4+
}

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
transform: {
3+
'^.+\\.tsx?$': 'babel-jest',
4+
},
5+
moduleNameMapper: {
6+
'\\.(css)$': 'identity-obj-proxy',
7+
},
8+
}

0 commit comments

Comments
 (0)