Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-introduce Typescript changes #1551

Merged
merged 15 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.node*.js
node_modules
node_modules
lib
testProjects
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,30 @@ module.exports = {
},
plugins: ['prettier'],
extends: ['plugin:prettier/recommended'],
overrides: [
{
files: ["**/*.ts"],
parser: "@typescript-eslint/parser",
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/triple-slash-reference': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-var-requires': 0,
'prefer-rest-params': 'off',
},
},
],
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/** linguist-generated
16 changes: 13 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-

- name: Node check
run: find . -name "*.js" -type f -not -path "./node_modules/*" -not -path "./\.*" -exec node --check {} \;
- name: Build Typescript
run: yarn && yarn build

- name: Check for changes
run: |
if [[ `git status --porcelain` ]]; then
git diff
>&2 echo "Changes detected after compiling TypeScript. Please run yarn build and check in all compiled files in lib/."
exit 1
else
exit 0
fi

- name: Lint
run: yarn && yarn lint
run: yarn lint

test:
name: Test (${{ matrix.node }})
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ tags
.nyc_output
coverage
.idea
testProjects/**/node_modules
testProjects/**/package-lock.json
166 changes: 81 additions & 85 deletions lib/Error.js

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

24 changes: 9 additions & 15 deletions lib/ResourceNamespace.js

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

46 changes: 20 additions & 26 deletions lib/StripeMethod.basic.js

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

Loading