Skip to content

Commit

Permalink
fix: first version
Browse files Browse the repository at this point in the history
  • Loading branch information
Farenheith committed Jan 18, 2025
0 parents commit e0ae09f
Show file tree
Hide file tree
Showing 38 changed files with 6,606 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = single

[*.{js,json,proto,ts}]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
121 changes: 121 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
ignorePatterns: ['dist/**', 'build/**', 'bin/**', 'templates/**', '*.py', ".eslintrc.js"],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['tsconfig.json', 'tsconfig.test.json'],
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'unused-imports'],
rules: {
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/quotes': [
'error',
'single',
{
avoidEscape: true,
},
],
'@typescript-eslint/semi': ['error', 'always'],
camelcase: 'error',
'comma-dangle': ['error', 'always-multiline'],
complexity: [
'off',
{
max: 11,
},
],
curly: ['error', 'multi-line'],
'default-case': 'error',
'eol-last': 'error',
eqeqeq: ['error', 'smart'],
'guard-for-in': 'error',
'id-blacklist': 'error',
'id-match': 'error',
'linebreak-style': ['error', 'unix'],
'max-classes-per-file': ['off', 1],
'max-lines': ['off', 300],
'new-parens': 'error',
'no-bitwise': 'error',
'no-caller': 'error',
'no-cond-assign': 'error',
'no-console': 'off',
'no-constant-condition': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-empty': 'error',
'no-eval': 'error',
'no-fallthrough': 'error',
'no-invalid-regexp': 'error',
'no-invalid-this': 'off',
'no-magic-numbers': [
'error',
{
ignore: [0, 1, -1],
},
],
'no-multiple-empty-lines': [
'error',
{
max: 2,
},
],
'no-new-wrappers': 'error',
'no-redeclare': 'off',
"@typescript-eslint/no-redeclare": ["error"],
'no-regex-spaces': 'error',
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'error',
'no-unsafe-finally': 'error',
'no-unused-labels': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{ 'vars': 'all', 'varsIgnorePattern': '^_', 'args': 'after-used', 'argsIgnorePattern': '^_' }
],
'prefer-const': [
'error',
{
destructuring: 'any',
},
],
'quote-props': ['error', 'as-needed'],
radix: 'error',
'spaced-comment': [
'error',
'always',
{
markers: ['/'],
},
],
'use-isnan': 'error',
},
};
31 changes: 31 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @Farenheith @gustavobeavis @danielgalleni @Dodt @pedrosodre @douglasdrdc @fgabrielsilva @pauloandreget

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.

# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This is a basic workflow to help you get started with Actions

name: build
on:
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: install
run: npm ci
- name: Build
run: npm run build
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is a basic workflow to help you get started with Actions

name: lint
on:
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
- name: install
run: npm ci
- name: Lint
run: npm run lint
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: release

on:
push:
branches: [main]

jobs:
semantic:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
HUSKY: 0
CI: true
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: "16.x"
- run: printf "//`node -p \"require('url').parse('https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\n" >> ~/.npmrc
- run: npm ci
- run: npm run build --if-present
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- run: previousVersion=$(sed 's/.*"version": "\(.*\)".*/\1/;t;d' ./package.json)
- run: npm i -g release-it release-it-pnpm @release-it/conventional-changelog
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
CI: true
- run: npm run publish
- run: finalVersion=$(sed 's/.*"version": "\(.*\)".*/\1/;t;d' ./package.json)
- run: |
if [ "$previousVersion" != "$finalVersion" ]; then
git push
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This is a basic workflow to help you get started with Actions

name: test-coverage
on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: install
run: npm ci
- name: "Test"
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run test:coverage
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

.env
.npmrc
.scannerwork
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.ts": "npm run lint:fix",
"*.js": "npm run lint:fix"
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"arrowParens": "always",
"trailingComma": "all",
"tabWidth": 2
}
14 changes: 14 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/changelog",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
],
"preset": "angular"
}
Empty file added CHANGELOG.md
Empty file.
Loading

0 comments on commit e0ae09f

Please sign in to comment.