-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tool-setup): fix lint & prettier
- Loading branch information
Showing
48 changed files
with
36,392 additions
and
36,280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,89 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/eslintrc.json", | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"plugins": ["react", "@typescript-eslint", "@typescript-eslint/tslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended" | ||
], | ||
"$schema": "https://json.schemastore.org/eslintrc.json", | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"plugins": ["react", "@typescript-eslint", "@typescript-eslint/tslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended" | ||
], | ||
|
||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.json", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-eval": "error", | ||
"no-trailing-spaces": "error", | ||
"no-unsafe-finally": "error", | ||
"no-var": "error", | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
"markers": ["/"] | ||
} | ||
], | ||
"indent": "off", | ||
"no-empty": ["error", { "allowEmptyCatch": true }], | ||
"no-console": ["error", { "allow": ["info", "error", "warn"] }], | ||
"brace-style": ["error", "1tbs"], | ||
"no-whitespace-before-property": "error", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"typescript-eslint/indent": "off", // Prettier takes care of indentation. | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/prefer-namespace-keyword": "error", | ||
"@typescript-eslint/quotes": ["error", "double"], | ||
"@typescript-eslint/semi": ["error", "always"], | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/triple-slash-reference": "warn", | ||
"@typescript-eslint/tslint/config": [ | ||
"error", | ||
{ | ||
"rules": { | ||
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"] | ||
} | ||
} | ||
], | ||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies | ||
"react/react-in-jsx-scope": "off", | ||
"react/no-unescaped-entities": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*,ts", "**/*.tsx"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "error" | ||
} | ||
} | ||
] | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.json", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-eval": "error", | ||
"no-trailing-spaces": "error", | ||
"no-unsafe-finally": "error", | ||
"no-var": "error", | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
"markers": ["/"] | ||
} | ||
], | ||
"indent": "off", | ||
"no-empty": ["error", { "allowEmptyCatch": true }], | ||
"no-console": ["error", { "allow": ["info", "error", "warn"] }], | ||
"brace-style": ["error", "1tbs"], | ||
"no-whitespace-before-property": "error", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"typescript-eslint/indent": "off", // Prettier takes care of indentation. | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/prefer-namespace-keyword": "error", | ||
"@typescript-eslint/quotes": ["error", "double"], | ||
"@typescript-eslint/semi": ["error", "always"], | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/triple-slash-reference": "warn", | ||
"@typescript-eslint/tslint/config": [ | ||
"error", | ||
{ | ||
"rules": { | ||
"whitespace": [ | ||
true, | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-separator", | ||
"check-type" | ||
] | ||
} | ||
} | ||
], | ||
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies | ||
"react/react-in-jsx-scope": "off", | ||
"react/no-unescaped-entities": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*,ts", "**/*.tsx"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "error" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
name: "Enforcing changelog in PRs Workflow" | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
|
||
jobs: | ||
# Enforces the update of a changelog file on every pull request | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dangoslen/changelog-enforcer@v2 | ||
with: | ||
changeLogPath: "CHANGELOG.md" | ||
skipLabels: "Skip-Changelog" | ||
# Enforces the update of a changelog file on every pull request | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dangoslen/changelog-enforcer@v2 | ||
with: | ||
changeLogPath: "CHANGELOG.md" | ||
skipLabels: "Skip-Changelog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
name: "Lint PR Title" | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
pr-title: | ||
name: Lint PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
validateSingleCommit: true | ||
pr-title: | ||
name: Lint PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
validateSingleCommit: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: "Pre commit hook check" | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
pr-title: | ||
name: Pre commit hook check | ||
runs-on: ubuntu-latest | ||
container: rishabhpoddar/supertokens_website_sdk_testing_node_16 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git init && git add --all && git -c user.name='test' -c user.email='[email protected]' commit -m 'init for pr action' | ||
- run: npm i --force || true | ||
# the below command is there cause otherwise running npm run check-circular-dependencies gives an error like: | ||
# Your cache folder contains root-owned files, due to a bug in | ||
# npm ERR! previous versions of npm which has since been addressed. | ||
- run: chown -R 1001:121 "/github/home/.npm" | ||
- run: npm i --force | ||
- run: ./hooks/pre-commit | ||
pr-title: | ||
name: Pre commit hook check | ||
runs-on: ubuntu-latest | ||
container: rishabhpoddar/supertokens_website_sdk_testing_node_16 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git init && git add --all && git -c user.name='test' -c user.email='[email protected]' commit -m 'init for pr action' | ||
- run: npm i --force || true | ||
# the below command is there cause otherwise running npm run check-circular-dependencies gives an error like: | ||
# Your cache folder contains root-owned files, due to a bug in | ||
# npm ERR! previous versions of npm which has since been addressed. | ||
- run: chown -R 1001:121 "/github/home/.npm" | ||
- run: npm i --force | ||
- run: ./hooks/pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
{ | ||
"copy-ts-css": { | ||
"scope": "javascript,typescript,typescriptreact,css,scss", | ||
"prefix": ["copyright"], | ||
"description": "Add copyright to typescript, javascript, or css file format", | ||
"body": [ | ||
"/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved.\r", | ||
" *\r", | ||
" * This software is licensed under the Apache License, Version 2.0 (the\r", | ||
" * \"License\") as published by the Apache Software Foundation.\r", | ||
" *\r", | ||
" * You may not use this file except in compliance with the License. You may\r", | ||
" * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\r", | ||
" *\r", | ||
" * Unless required by applicable law or agreed to in writing, software\r", | ||
" * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r", | ||
" * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r", | ||
" * License for the specific language governing permissions and limitations\r", | ||
" * under the License.\r", | ||
" */" | ||
] | ||
} | ||
"copy-ts-css": { | ||
"scope": "javascript,typescript,typescriptreact,css,scss", | ||
"prefix": ["copyright"], | ||
"description": "Add copyright to typescript, javascript, or css file format", | ||
"body": [ | ||
"/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved.\r", | ||
" *\r", | ||
" * This software is licensed under the Apache License, Version 2.0 (the\r", | ||
" * \"License\") as published by the Apache Software Foundation.\r", | ||
" *\r", | ||
" * You may not use this file except in compliance with the License. You may\r", | ||
" * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\r", | ||
" *\r", | ||
" * Unless required by applicable law or agreed to in writing, software\r", | ||
" * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r", | ||
" * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r", | ||
" * License for the specific language governing permissions and limitations\r", | ||
" * under the License.\r", | ||
" */" | ||
] | ||
} | ||
} |
Oops, something went wrong.