Skip to content

Commit

Permalink
initial commit 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
osyrisrblx committed Feb 13, 2024
0 parents commit 0effb1b
Show file tree
Hide file tree
Showing 22 changed files with 4,002 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab
indent_size = 4

[*.yml]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
tests
68 changes: 68 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"jsx": true,
"useJSXTextNode": true,
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"@typescript-eslint/eslint-plugin",
"prettier",
"simple-import-sort",
"no-autofix"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"rules": {
"prettier/prettier": [
"warn",
{
"semi": true,
"trailingComma": "all",
"singleQuote": false,
"printWidth": 120,
"tabWidth": 4,
"useTabs": true,
"arrowParens": "avoid"
}
],
"@typescript-eslint/array-type": [
"warn",
{
"default": "generic",
"readonly": "generic"
}
],
"@typescript-eslint/no-floating-promises": [
"error",
{ "ignoreVoid": true }
],
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unused-expressions": "warn",
"curly": ["warn", "multi-line", "consistent"],
"no-autofix/prefer-const": "warn",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-debugger": "off",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-extra-boolean-cast": "off",
"no-undef-init": "error",
"prefer-const": "off",
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": "warn"
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.ts linguist-language=TypeScript
* text eol=lf
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "npm"
versioning-strategy: increase
open-pull-requests-limit: 99
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "typescript"
groups:
packages:
patterns:
- "*"
21 changes: 21 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Install NPM dependencies
uses: bahmutov/[email protected]

- name: Compile Source Files
run: npm run build
21 changes: 21 additions & 0 deletions .github/workflows/ESLint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ESLint

on:
pull_request:
push:
branches:
- master

jobs:
lint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Install NPM Dependencies
uses: bahmutov/[email protected]

- name: Run ESLint
run: npm run eslint
32 changes: 32 additions & 0 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish
run-name: Publish ${{ inputs.version }} (@${{ github.actor }})

on:
workflow_dispatch:
inputs:
version:
required: true
type: string

jobs:
publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
token: ${{ secrets.pat }}

- name: Install NPM Dependencies
uses: bahmutov/[email protected]

- name: Publish
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > .npmrc
npm version ${{ inputs.version }}
npm publish
git push
git push --tags
47 changes: 47 additions & 0 deletions .github/workflows/UnitTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: UnitTests

on:
pull_request:
push:
branches:
- master

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout path-translator repo
uses: actions/checkout@v4
with:
path: path-translator

- name: Checkout roblox-ts repo
uses: actions/checkout@v4
with:
repository: roblox-ts/roblox-ts
path: roblox-ts

- name: Install Foreman
uses: Roblox/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup path-translator repo
run: |
cd path-translator
npm install
npm run build
- name: Setup roblox-ts repo
run: |
cd roblox-ts
foreman install
npm install
npm install ../path-translator
npm run update-test-types
- name: Run Tests
run: |
cd roblox-ts
npm test
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.cmd
coverage.lcov
.nyc_output
coverage
node_modules
out
.DS_Store
.history
.vscode/settings.json
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
]
}
16 changes: 16 additions & 0 deletions .vscode/settings.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"editor.formatOnSave": true,
"eslint.format.enable": true,
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.quoteStyle": "double",
"[markdown]": {
"editor.formatOnSave": false,
"editor.wordWrap": "bounded",
"editor.wordWrapColumn": 120
}
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 1.0.0

- Initial release, split off from roblox-ts repository
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 roblox-ts

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @roblox-ts/path-translator
Loading

0 comments on commit 0effb1b

Please sign in to comment.