Skip to content

Commit

Permalink
chore: extended edX Typescript config (#2309)
Browse files Browse the repository at this point in the history
* feat: extended edx typescript config

* refactor: config refactoring

* refactor: code refactoring

* build: override commitlint action to fix upstream issue with typescript

---------

Co-authored-by: Viktor Rusakov <vrusakov66@gmail.com>
  • Loading branch information
PKulkoRaccoonGang and viktorrusakov authored Jun 9, 2023
1 parent 979fc9d commit a390434
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 23 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Run commitlint on the commit messages in a pull request.
# Currently overrides common openedx action as a workaround for fixing https://github.com/conventional-changelog/commitlint/issues/3256

name: Lint Commit Messages

Expand All @@ -7,4 +8,24 @@ on:

jobs:
commitlint:
uses: openedx/.github/.github/workflows/commitlint.yml@master
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
# Fetch 100 commits. Should be enough?
fetch-depth: 100

# This step is needed to fix https://github.com/conventional-changelog/commitlint/issues/3256
- name: Remove tsconfig file
run: rm tsconfig.json

- name: Download a local configuration file if needed
run: |
if [[ ! -f commitlint.config.js ]]; then
echo "Downloading the default commitlint config from edx_lint"
wget --no-verbose -O commitlint.config.js https://raw.githubusercontent.com/openedx/edx-lint/HEAD/edx_lint/files/commitlint.config.js
fi
- name: Run commitlint
uses: wagoid/commitlint-github-action@v5
42 changes: 39 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"@edx/browserslist-config": "^1.2.0",
"@edx/eslint-config": "^3.2.0",
"@edx/stylelint-config-edx": "^2.3.0",
"@edx/typescript-config": "^1.0.1",
"@formatjs/cli": "^5.0.2",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
Expand Down
22 changes: 3 additions & 19 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
{
"extends": "@edx/typescript-config",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["dom", "es6", "dom.iterable"],
"isolatedModules": true,
"module": "es6",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"strictFunctionTypes": false,
"target": "es6",
"allowJs": false,
"rootDir": "src",
"outDir": "dist"
},
"include": ["src"],
"include": ["src"]
}

0 comments on commit a390434

Please sign in to comment.