-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
730 changed files
with
18,494 additions
and
33,669 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./webapp | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v4.0.1 | ||
with: | ||
node-version: 18.x | ||
cache: "npm" | ||
cache-dependency-path: webapp/package-lock.json | ||
- name: Install | ||
run: npm install --legacy-peer-deps | ||
- name: Lint | ||
run: npm run lint |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
extends: ['@dcl/eslint-config/dapps'], | ||
parserOptions: { | ||
project: ['tsconfig.json'], | ||
tsconfigRootDir: __dirname | ||
}, | ||
plugins: ['react-hooks'], | ||
overrides: [ | ||
{ | ||
files: ['*.js', '*.ts', '*.tsx'], | ||
rules: { | ||
['prettier/prettier']: [ | ||
'error', | ||
{ | ||
semi: false, | ||
singleQuote: true, | ||
printWidth: 140, | ||
tabWidth: 2, | ||
trailingComma: 'none', | ||
arrowParens: 'avoid' | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
files: ['*.ts', '*.tsx', '*.cjs'], | ||
extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'prettier'], | ||
rules: { | ||
'@typescript-eslint/no-unsafe-declaration-merging': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-declaration-merging | ||
'@typescript-eslint/no-redundant-type-constituents': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-redundant-type-constituents | ||
'@typescript-eslint/require-await': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/require-await | ||
'@typescript-eslint/no-floating-promises': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-floating-promises | ||
'@typescript-eslint/no-unsafe-return': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-return | ||
'@typescript-eslint/naming-convention': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/naming-convention/ | ||
'@typescript-eslint/no-unused-vars': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unused-vars | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unnecessary-type-assertion | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/explicit-module-boundary-types | ||
'@typescript-eslint/restrict-template-expressions': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/restrict-template-expressions | ||
'@typescript-eslint/no-base-to-string': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-base-to-string | ||
'@typescript-eslint/ban-types': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/ban-types | ||
'@typescript-eslint/unbound-method': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/unbound-method | ||
'@typescript-eslint/ban-ts-comment': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/ban-ts-comment | ||
'no-prototype-builtins': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-prototype-builtins | ||
'no-case-declarations': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-case-declarations | ||
'@typescript-eslint/no-unsafe-assignment': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-assignment/ | ||
'@typescript-eslint/no-unsafe-call': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-call/ | ||
'@typescript-eslint/no-unsafe-member-access': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-member-access/ | ||
'@typescript-eslint/no-unsafe-argument': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-argument/ | ||
'@typescript-eslint/no-explicit-any': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-explicit-any | ||
'@typescript-eslint/no-non-null-assertion': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-non-null-assertion | ||
'no-async-promise-executor': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-async-promise-executor | ||
'@typescript-eslint/await-thenable': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/await-thenable | ||
'@typescript-eslint/no-unnecessary-type-constraint': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unnecessary-type-constraint | ||
'@typescript-eslint/no-misused-promises': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-misused-promises | ||
'require-yield': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/require-yield | ||
'import/order': 'off', // TODO: migrate code progressively to remove this line. | ||
'no-empty': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-empty | ||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain | ||
'@typescript-eslint/no-unsafe-enum-comparison': 'off' | ||
}, | ||
parserOptions: { | ||
project: ['./tsconfig.json'] | ||
} | ||
}, | ||
{ | ||
files: ['*.spec.ts'], | ||
rules: { | ||
'@typescript-eslint/unbound-method': 'off' | ||
} | ||
}, | ||
{ | ||
files: ['*.js'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 'off' | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
cd ./webapp | ||
|
||
FILES=$(git diff --cached --name-only --relative=webapp --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx|json|yml|md|html|css)$' || true; }) | ||
|
||
if [ -z "$FILES" ]; then | ||
exit 0 | ||
fi | ||
|
||
TS_FILES=$(git diff --cached --name-only --relative=webapp --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx)$' || true; }) | ||
|
||
if [[ ! -z "$TS_FILES" ]];then | ||
echo "Running lints" | ||
npm run pre-commit:fix:code -- $TS_FILES | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 140, | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid" | ||
} |
Oops, something went wrong.