Skip to content

Commit

Permalink
Merge pull request #1551 from stripe/anniel-typescript-take2
Browse files Browse the repository at this point in the history
Re-introduce Typescript changes
  • Loading branch information
anniel-stripe authored Sep 22, 2022
2 parents eda7bff + dc4f523 commit fffee63
Show file tree
Hide file tree
Showing 230 changed files with 6,700 additions and 1,165 deletions.
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
45 changes: 15 additions & 30 deletions lib/Error.js

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

6 changes: 0 additions & 6 deletions lib/ResourceNamespace.js

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

6 changes: 0 additions & 6 deletions lib/StripeMethod.basic.js

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

11 changes: 2 additions & 9 deletions lib/StripeMethod.js

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

Loading

0 comments on commit fffee63

Please sign in to comment.