diff --git a/.eslintrc.js b/.eslintrc.js index 980be04..a9ea219 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,8 +7,8 @@ module.exports = { extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license'], rules: { - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/prefer-includes": "off", - "class-methods-use-this": "off" - } + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/prefer-includes': 'off', + 'class-methods-use-this': 'off', + }, }; diff --git a/package.json b/package.json index b8438a4..efa99b0 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,12 @@ "chai": "^4.3.4", "eslint": "^8.23.0", "eslint-config-prettier": "^8.5.0", - "eslint-config-salesforce": "^1.1.0", + "eslint-config-salesforce": "^2.0.2", "eslint-config-salesforce-license": "^0.1.6", "eslint-config-salesforce-typescript": "^1.1.1", "eslint-plugin-header": "^3.0.0", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jsdoc": "^39.3.6", + "eslint-plugin-jsdoc": "^46.8.2", "eslint-plugin-prettier": "^4.2.1", "husky": "^8.0.1", "isbinaryfile": "^5.0.0", diff --git a/src/commands/force/lightning/lwc/test/setup.ts b/src/commands/force/lightning/lwc/test/setup.ts index fc2b43f..481f41d 100644 --- a/src/commands/force/lightning/lwc/test/setup.ts +++ b/src/commands/force/lightning/lwc/test/setup.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import { SfdxCommand } from '@salesforce/command'; import { Messages, SfError } from '@salesforce/core'; import semverCompare = require('semver-compare'); -import { FileWriter } from '../../../../../lib/fileWriter'; +import { FileWriter } from '../../../../../shared/fileWriter'; Messages.importMessagesDirectory(__dirname); const messages = Messages.loadMessages('@salesforce/sfdx-plugin-lwc-test', 'setup'); diff --git a/src/lib/fileWriter.ts b/src/shared/fileWriter.ts similarity index 100% rename from src/lib/fileWriter.ts rename to src/shared/fileWriter.ts diff --git a/test/commands/lwc/test/run.test.ts b/test/commands/lwc/test/run.test.ts index 1d73ea3..06e6376 100644 --- a/test/commands/lwc/test/run.test.ts +++ b/test/commands/lwc/test/run.test.ts @@ -11,6 +11,7 @@ import { expect, test } from '@salesforce/command/lib/test'; import { testSetup } from '@salesforce/core/lib/testSetup'; import { stubMethod } from '@salesforce/ts-sinon'; +// eslint-disable-next-line import Run from '../../../../lib/commands/force/lightning/lwc/test/run'; // Mock all things in core, like api, file io, etc. diff --git a/test/commands/lwc/test/setup.test.ts b/test/commands/lwc/test/setup.test.ts index f92e40c..7231786 100644 --- a/test/commands/lwc/test/setup.test.ts +++ b/test/commands/lwc/test/setup.test.ts @@ -11,6 +11,7 @@ import { expect, test } from '@salesforce/command/lib/test'; import { testSetup } from '@salesforce/core/lib/testSetup'; import { stubMethod } from '@salesforce/ts-sinon'; import { SinonStub } from 'sinon'; +// eslint-disable-next-line import Setup from '../../../../lib/commands/force/lightning/lwc/test/setup'; // Mock all things in core, like api, file io, etc. diff --git a/yarn.lock b/yarn.lock index f01debb..b815862 100644 --- a/yarn.lock +++ b/yarn.lock @@ -389,14 +389,14 @@ esquery "^1.4.0" jsdoc-type-pratt-parser "1.0.4" -"@es-joy/jsdoccomment@~0.31.0": - version "0.31.0" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.31.0.tgz#dbc342cc38eb6878c12727985e693eaef34302bc" - integrity sha512-tc1/iuQcnaiSIUVad72PBierDFpsxdUHtEF/OrfqvM1CBAsIoMP51j52jTMb3dXriwhieTo289InzZj72jL3EQ== +"@es-joy/jsdoccomment@~0.40.1": + version "0.40.1" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz#13acd77fb372ed1c83b7355edd865a3b370c9ec4" + integrity sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg== dependencies: - comment-parser "1.3.1" - esquery "^1.4.0" - jsdoc-type-pratt-parser "~3.1.0" + comment-parser "1.4.0" + esquery "^1.5.0" + jsdoc-type-pratt-parser "~4.0.0" "@eslint/eslintrc@^0.4.3": version "0.4.3" @@ -1904,6 +1904,11 @@ archy@^1.0.0: resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== +are-docs-informative@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/are-docs-informative/-/are-docs-informative-0.0.2.tgz#387f0e93f5d45280373d387a59d34c96db321963" + integrity sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig== + are-we-there-yet@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" @@ -2167,6 +2172,11 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +builtin-modules@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -2630,10 +2640,10 @@ comment-parser@1.1.6-beta.0: resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.1.6-beta.0.tgz#57e503b18d0a5bd008632dcc54b1f95c2fffe8f6" integrity sha512-q3cA8TSMyqW7wcPSYWzbO/rMahnXgzs4SLG/UIWXdEsnXTFPZkEkWAdNgPiHig2OzxgpPLOh4WwsmClDxndwHw== -comment-parser@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" - integrity sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA== +comment-parser@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.0.tgz#0f8c560f59698193854f12884c20c0e39a26d32c" + integrity sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw== common-ancestor-path@^1.0.1: version "1.0.1" @@ -3211,6 +3221,11 @@ eslint-config-salesforce@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-config-salesforce/-/eslint-config-salesforce-1.1.0.tgz#8f33e7cacd417f202727ae8e2b2fab27a81c0dc7" integrity sha512-83foPo1Z8QoKc+APlZ7lN4uSRx4o2uicFMumi8n68Fx1/vPmBBMx86m15lOmEsAY7Gv97DneInVRotlc4+JaQw== +eslint-config-salesforce@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/eslint-config-salesforce/-/eslint-config-salesforce-2.0.2.tgz#38eb2d8eb2824c66967ed9b45bc92082eba2f225" + integrity sha512-3jbrI+QFu/KaQbPYIBxItB3okqUtA4EBCGiR6s2kcUMIZBLBBGAURW0k62f9WAv1EagR3eUoO0m9ru7LTj2F5Q== + eslint-import-resolver-node@^0.3.6: version "0.3.6" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" @@ -3265,17 +3280,19 @@ eslint-plugin-jsdoc@^35.1.2: semver "^7.3.5" spdx-expression-parse "^3.0.1" -eslint-plugin-jsdoc@^39.3.6: - version "39.3.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.3.6.tgz#6ba29f32368d72a51335a3dc9ccd22ad0437665d" - integrity sha512-R6dZ4t83qPdMhIOGr7g2QII2pwCjYyKP+z0tPOfO1bbAbQyKC20Y2Rd6z1te86Lq3T7uM8bNo+VD9YFpE8HU/g== +eslint-plugin-jsdoc@^46.8.2: + version "46.8.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.8.2.tgz#3e6b1c93e91e38fe01874d45da121b56393c54a5" + integrity sha512-5TSnD018f3tUJNne4s4gDWQflbsgOycIKEUBoCLn6XtBMgNHxQFmV8vVxUtiPxAQq8lrX85OaSG/2gnctxw9uQ== dependencies: - "@es-joy/jsdoccomment" "~0.31.0" - comment-parser "1.3.1" + "@es-joy/jsdoccomment" "~0.40.1" + are-docs-informative "^0.0.2" + comment-parser "1.4.0" debug "^4.3.4" escape-string-regexp "^4.0.0" - esquery "^1.4.0" - semver "^7.3.7" + esquery "^1.5.0" + is-builtin-module "^3.2.1" + semver "^7.5.4" spdx-expression-parse "^3.0.1" eslint-plugin-prefer-arrow@^1.2.1: @@ -3456,6 +3473,13 @@ esquery@^1.4.0: dependencies: estraverse "^5.1.0" +esquery@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -4507,6 +4531,13 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-builtin-module@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== + dependencies: + builtin-modules "^3.3.0" + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" @@ -4851,10 +4882,10 @@ jsdoc-type-pratt-parser@^1.0.4: resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.2.0.tgz#3482a3833b74a88c95a6ba7253f0c0de3b77b9f5" integrity sha512-4STjeF14jp4bqha44nKMY1OUI6d2/g6uclHWUCZ7B4DoLzaB5bmpTkQrpqU+vSVzMD0LsKAOskcnI3I3VfIpmg== -jsdoc-type-pratt-parser@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz#a4a56bdc6e82e5865ffd9febc5b1a227ff28e67e" - integrity sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw== +jsdoc-type-pratt-parser@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz#136f0571a99c184d84ec84662c45c29ceff71114" + integrity sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ== jsesc@^2.5.1: version "2.5.2"