Implement Nx lint for API package

This commit is contained in:
roykho 2021-11-05 05:43:46 -07:00
parent b64d0b3dfe
commit 608d42711d
No known key found for this signature in database
GPG Key ID: 7B36C0EA25795714
4 changed files with 6969 additions and 23 deletions

View File

@ -1,12 +1,9 @@
module.exports = {
parser: '@typescript-eslint/parser',
env: {
'jest/globals': true
'jest/globals': true,
},
ignorePatterns: [
'dist/',
'node_modules/'
],
ignorePatterns: [ 'dist/', 'node_modules/' ],
rules: {
'no-unused-vars': 'off',
'no-dupe-class-members': 'off',
@ -14,18 +11,11 @@ module.exports = {
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 2,
},
plugins: [
'@typescript-eslint'
],
extends: [
'plugin:@wordpress/eslint-plugin/recommended-with-formatting'
],
plugins: [ '@typescript-eslint/eslint-plugin' ],
extends: [ 'plugin:@wordpress/eslint-plugin/recommended-with-formatting' ],
overrides: [
{
files: [
'**/*.js',
'**/*.ts'
],
files: [ '**/*.js', '**/*.ts' ],
settings: {
jsdoc: {
mode: 'typescript',
@ -33,13 +23,10 @@ module.exports = {
},
},
{
files: [
'**/*.spec.ts',
'**/*.test.ts'
],
files: [ '**/*.spec.ts', '**/*.test.ts' ],
rules: {
'no-console': 'off',
}
}
]
}
},
},
],
};

6711
packages/js/api/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,9 @@
"@types/jest": "25.2.1",
"@types/moxios": "^0.4.9",
"@types/node": "13.13.5",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"eslint": "^8.1.0",
"jest": "^25.1.0",
"jest-mock-extended": "^1.0.10",
"moxios": "0.4.0",

View File

@ -53,8 +53,11 @@ importers:
'@types/jest': 25.2.1
'@types/moxios': ^0.4.9
'@types/node': 13.13.5
'@typescript-eslint/eslint-plugin': ^5.3.0
'@typescript-eslint/parser': ^5.3.0
axios: 0.21.2
create-hmac: 1.1.7
eslint: ^8.1.0
jest: ^25.1.0
jest-mock-extended: ^1.0.10
moxios: 0.4.0
@ -70,6 +73,9 @@ importers:
'@types/jest': 25.2.1
'@types/moxios': 0.4.12
'@types/node': 13.13.5
'@typescript-eslint/eslint-plugin': 5.3.0_30d05eaf3f90d28a782539abf7387751
'@typescript-eslint/parser': 5.3.0_eslint@8.1.0+typescript@3.9.7
eslint: 8.1.0
jest: 25.5.4
jest-mock-extended: 1.0.18_jest@25.5.4+typescript@3.9.7
moxios: 0.4.0_axios@0.21.2
@ -2269,6 +2275,23 @@ packages:
- supports-color
dev: true
/@eslint/eslintrc/1.0.3:
resolution: {integrity: sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
ajv: 6.12.6
debug: 4.3.2
espree: 9.0.0
globals: 13.11.0
ignore: 4.0.6
import-fresh: 3.3.0
js-yaml: 3.14.1
minimatch: 3.0.4
strip-json-comments: 3.1.1
transitivePeerDependencies:
- supports-color
dev: true
/@hapi/address/2.1.4:
resolution: {integrity: sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==}
deprecated: Moved to 'npm install @sideway/address'
@ -2312,6 +2335,17 @@ packages:
- supports-color
dev: true
/@humanwhocodes/config-array/0.6.0:
resolution: {integrity: sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==}
engines: {node: '>=10.10.0'}
dependencies:
'@humanwhocodes/object-schema': 1.2.0
debug: 4.3.2
minimatch: 3.0.4
transitivePeerDependencies:
- supports-color
dev: true
/@humanwhocodes/object-schema/1.2.0:
resolution: {integrity: sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==}
dev: true
@ -3507,6 +3541,32 @@ packages:
- supports-color
dev: true
/@typescript-eslint/eslint-plugin/5.3.0_30d05eaf3f90d28a782539abf7387751:
resolution: {integrity: sha512-ARUEJHJrq85aaiCqez7SANeahDsJTD3AEua34EoQN9pHS6S5Bq9emcIaGGySt/4X2zSi+vF5hAH52sEen7IO7g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/experimental-utils': 5.3.0_eslint@8.1.0+typescript@3.9.7
'@typescript-eslint/parser': 5.3.0_eslint@8.1.0+typescript@3.9.7
'@typescript-eslint/scope-manager': 5.3.0
debug: 4.3.2
eslint: 8.1.0
functional-red-black-tree: 1.0.1
ignore: 5.1.8
regexpp: 3.2.0
semver: 7.3.5
tsutils: 3.21.0_typescript@3.9.7
typescript: 3.9.7
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/experimental-utils/2.34.0_eslint@6.8.0+typescript@3.9.7:
resolution: {integrity: sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
@ -3590,6 +3650,24 @@ packages:
- typescript
dev: true
/@typescript-eslint/experimental-utils/5.3.0_eslint@8.1.0+typescript@3.9.7:
resolution: {integrity: sha512-NFVxYTjKj69qB0FM+piah1x3G/63WB8vCBMnlnEHUsiLzXSTWb9FmFn36FD9Zb4APKBLY3xRArOGSMQkuzTF1w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
dependencies:
'@types/json-schema': 7.0.9
'@typescript-eslint/scope-manager': 5.3.0
'@typescript-eslint/types': 5.3.0
'@typescript-eslint/typescript-estree': 5.3.0_typescript@3.9.7
eslint: 8.1.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.1.0
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/@typescript-eslint/parser/3.10.1_eslint@6.8.0+typescript@3.9.7:
resolution: {integrity: sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==}
engines: {node: ^10.12.0 || >=12.0.0}
@ -3631,6 +3709,26 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser/5.3.0_eslint@8.1.0+typescript@3.9.7:
resolution: {integrity: sha512-rKu/yAReip7ovx8UwOAszJVO5MgBquo8WjIQcp1gx4pYQCwYzag+I5nVNHO4MqyMkAo0gWt2gWUi+36gWAVKcw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.3.0
'@typescript-eslint/types': 5.3.0
'@typescript-eslint/typescript-estree': 5.3.0_typescript@3.9.7
debug: 4.3.2
eslint: 8.1.0
typescript: 3.9.7
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/scope-manager/4.33.0:
resolution: {integrity: sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
@ -3639,6 +3737,14 @@ packages:
'@typescript-eslint/visitor-keys': 4.33.0
dev: true
/@typescript-eslint/scope-manager/5.3.0:
resolution: {integrity: sha512-22Uic9oRlTsPppy5Tcwfj+QET5RWEnZ5414Prby465XxQrQFZ6nnm5KnXgnsAJefG4hEgMnaxTB3kNEyjdjj6A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.3.0
'@typescript-eslint/visitor-keys': 5.3.0
dev: true
/@typescript-eslint/types/3.10.1:
resolution: {integrity: sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
@ -3649,6 +3755,11 @@ packages:
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
dev: true
/@typescript-eslint/types/5.3.0:
resolution: {integrity: sha512-fce5pG41/w8O6ahQEhXmMV+xuh4+GayzqEogN24EK+vECA3I6pUwKuLi5QbXO721EMitpQne5VKXofPonYlAQg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree/2.34.0_typescript@3.9.7:
resolution: {integrity: sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
@ -3756,6 +3867,27 @@ packages:
- supports-color
dev: true
/@typescript-eslint/typescript-estree/5.3.0_typescript@3.9.7:
resolution: {integrity: sha512-FJ0nqcaUOpn/6Z4Jwbtf+o0valjBLkqc3MWkMvrhA2TvzFXtcclIM8F4MBEmYa2kgcI8EZeSAzwoSrIC8JYkug==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.3.0
'@typescript-eslint/visitor-keys': 5.3.0
debug: 4.3.2
globby: 11.0.4
is-glob: 4.0.3
semver: 7.3.5
tsutils: 3.21.0_typescript@3.9.7
typescript: 3.9.7
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/visitor-keys/3.10.1:
resolution: {integrity: sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
@ -3771,6 +3903,14 @@ packages:
eslint-visitor-keys: 2.1.0
dev: true
/@typescript-eslint/visitor-keys/5.3.0:
resolution: {integrity: sha512-oVIAfIQuq0x2TFDNLVavUn548WL+7hdhxYn+9j3YdJJXB7mH9dAmZNJsPDa7Jc+B9WGqoiex7GUDbyMxV0a/aw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.3.0
eslint-visitor-keys: 3.0.0
dev: true
/@webassemblyjs/ast/1.9.0:
resolution: {integrity: sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==}
dependencies:
@ -4283,6 +4423,14 @@ packages:
dependencies:
acorn: 7.4.1
/acorn-jsx/5.3.2_acorn@8.5.0:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
acorn: 8.5.0
dev: true
/acorn-walk/6.2.0:
resolution: {integrity: sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==}
engines: {node: '>=0.4.0'}
@ -4508,6 +4656,10 @@ packages:
dependencies:
sprintf-js: 1.0.3
/argparse/2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
dev: true
/aria-query/4.2.2:
resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==}
engines: {node: '>=6.0'}
@ -7216,6 +7368,14 @@ packages:
esrecurse: 4.3.0
estraverse: 4.3.0
/eslint-scope/6.0.0:
resolution: {integrity: sha512-uRDL9MWmQCkaFus8RF5K9/L/2fn+80yoW3jkD53l4shjCh26fCtvJGasxjUqP5OT87SYTxCVA3BwTUzuELx9kA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
esrecurse: 4.3.0
estraverse: 5.2.0
dev: true
/eslint-utils/1.4.3:
resolution: {integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==}
engines: {node: '>=6'}
@ -7239,6 +7399,16 @@ packages:
eslint-visitor-keys: 2.1.0
dev: true
/eslint-utils/3.0.0_eslint@8.1.0:
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
eslint: 8.1.0
eslint-visitor-keys: 2.1.0
dev: true
/eslint-visitor-keys/1.3.0:
resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==}
engines: {node: '>=4'}
@ -7248,6 +7418,11 @@ packages:
engines: {node: '>=10'}
dev: true
/eslint-visitor-keys/3.0.0:
resolution: {integrity: sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/eslint/5.16.0:
resolution: {integrity: sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==}
engines: {node: ^6.14.0 || ^8.10.0 || >=9.10.0}
@ -7434,6 +7609,53 @@ packages:
- supports-color
dev: true
/eslint/8.1.0:
resolution: {integrity: sha512-JZvNneArGSUsluHWJ8g8MMs3CfIEzwaLx9KyH4tZ2i+R2/rPWzL8c0zg3rHdwYVpN/1sB9gqnjHwz9HoeJpGHw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint/eslintrc': 1.0.3
'@humanwhocodes/config-array': 0.6.0
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.2
doctrine: 3.0.0
enquirer: 2.3.6
escape-string-regexp: 4.0.0
eslint-scope: 6.0.0
eslint-utils: 3.0.0_eslint@8.1.0
eslint-visitor-keys: 3.0.0
espree: 9.0.0
esquery: 1.4.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
file-entry-cache: 6.0.1
functional-red-black-tree: 1.0.1
glob-parent: 6.0.2
globals: 13.11.0
ignore: 4.0.6
import-fresh: 3.3.0
imurmurhash: 0.1.4
is-glob: 4.0.3
js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
lodash.merge: 4.6.2
minimatch: 3.0.4
natural-compare: 1.4.0
optionator: 0.9.1
progress: 2.0.3
regexpp: 3.2.0
semver: 7.3.5
strip-ansi: 6.0.1
strip-json-comments: 3.1.1
text-table: 0.2.0
v8-compile-cache: 2.3.0
transitivePeerDependencies:
- supports-color
dev: true
/espree/5.0.1:
resolution: {integrity: sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==}
engines: {node: '>=6.0.0'}
@ -7460,6 +7682,15 @@ packages:
eslint-visitor-keys: 1.3.0
dev: true
/espree/9.0.0:
resolution: {integrity: sha512-r5EQJcYZ2oaGbeR0jR0fFVijGOcwai07/690YRXLINuhmVeRY4UKSAsQPe/0BNuDgwP7Ophoc1PRsr2E3tkbdQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
acorn: 8.5.0
acorn-jsx: 5.3.2_acorn@8.5.0
eslint-visitor-keys: 3.0.0
dev: true
/esprima/4.0.1:
resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==}
engines: {node: '>=4'}
@ -8316,6 +8547,13 @@ packages:
dependencies:
is-glob: 4.0.3
/glob-parent/6.0.2:
resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
engines: {node: '>=10.13.0'}
dependencies:
is-glob: 4.0.3
dev: true
/glob/5.0.15:
resolution: {integrity: sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=}
dependencies:
@ -11247,6 +11485,13 @@ packages:
argparse: 1.0.10
esprima: 4.0.1
/js-yaml/4.1.0:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
dependencies:
argparse: 2.0.1
dev: true
/jsbn/0.1.1:
resolution: {integrity: sha1-peZUwuWi3rXyAdls77yoDA7y9RM=}