Skip to content

Commit 8efc132

Browse files
committed
chore: add dev scripts and default pkg scripts
chg eslint rules to warn to commit
1 parent f378152 commit 8efc132

File tree

3 files changed

+2805
-560
lines changed

3 files changed

+2805
-560
lines changed

LICENSE.txt

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1-
Copyright (c) 2020, Salesforce.com, inc.
1+
Copyright (c) 2022, Salesforce.com, Inc.
22
All rights reserved.
33

4-
Redistribution and use in source and binary forms, with or without modification,
5-
are permitted provided that the following conditions are met:
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
65

7-
* Redistributions of source code must retain the above copyright notice, this
8-
list of conditions and the following disclaimer.
6+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
97

10-
* Redistributions in binary form must reproduce the above copyright notice, this
11-
list of conditions and the following disclaimer in the documentation and/or
12-
other materials provided with the distribution.
8+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
139

14-
* Neither the name of Salesforce.com nor the names of its contributors may be
15-
used to endorse or promote products derived from this software without specific
16-
prior written permission.
10+
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1711

18-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

package.json

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,39 @@
1818
"@oclif/plugin-help": "^5",
1919
"@oclif/test": "^2.2.2",
2020
"@salesforce/dev-config": "3.0.1",
21+
"@salesforce/dev-scripts": "^3.1.0",
2122
"@salesforce/plugin-command-reference": "^1.3.16",
2223
"@salesforce/prettier-config": "^0.0.2",
2324
"@salesforce/ts-sinon": "^1.1.2",
2425
"@salesforce/ts-types": "1.2.2",
2526
"@swc/core": "^1.3.21",
26-
"@types/chai": "^4",
2727
"@types/mkdirp": "0.5.2",
28-
"@types/mocha": "^5",
29-
"@types/node": "^14",
30-
"chai": "^4",
28+
"@typescript-eslint/eslint-plugin": "^5.33.0",
29+
"@typescript-eslint/parser": "^5.33.0",
30+
"chai": "^4.2.0",
3131
"cross-env": "7.0.2",
32+
"eslint": "^8.21.0",
33+
"eslint-config-prettier": "^8.5.0",
34+
"eslint-config-salesforce": "^1.1.0",
35+
"eslint-config-salesforce-license": "^0.1.6",
36+
"eslint-config-salesforce-typescript": "^1.1.1",
37+
"eslint-plugin-header": "^3.0.0",
38+
"eslint-plugin-import": "^2.26.0",
39+
"eslint-plugin-jsdoc": "^39.3.6",
3240
"globby": "^8",
33-
"mocha": "^5",
34-
"nyc": "^14.1.1",
41+
"husky": "^7.0.4",
42+
"mocha": "^9.1.3",
43+
"nyc": "^15.1.0",
3544
"oclif": "^3.2.28",
45+
"prettier": "^2.7.1",
46+
"pretty-quick": "^3.1.0",
3647
"shx": "^0.3.4",
37-
"sinon": "^7.3.1",
38-
"ts-node": "^8.7.0",
48+
"sinon": "10.0.0",
49+
"ts-node": "^10.0.0",
3950
"typescript": "4.6.4"
4051
},
4152
"engines": {
42-
"node": ">=14.14.0"
53+
"node": ">=14.0.0"
4354
},
4455
"files": [
4556
"yarn.lock",
@@ -96,21 +107,25 @@
96107
},
97108
"repository": "salesforcecli/plugin-apex",
98109
"scripts": {
99-
"build": "shx rm -rf lib && tsc -b",
100-
"format": "prettier --config ../../.prettierrc --write './{src,test,scripts}/**/*.{ts,js,json}'",
101-
"lint": "eslint -c .eslintrc.json --ext .ts ./src ./test",
102-
"manifest:generate": "yarn build && oclif manifest",
110+
"build": "sf-build",
111+
"clean": "sf-clean",
112+
"clean-all": "sf-clean all",
113+
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
114+
"compile": "sf-compile",
115+
"docs": "sf-docs",
116+
"format": "sf-format",
117+
"lint": "sf-lint",
103118
"postpack": "shx rm -f oclif.manifest.json",
104-
"test": "cross-env FORCE_COLOR=true mocha --recursive \"./test/**/*.test.ts\" --full-trace",
105-
"version": "oclif readme && git add README.md",
119+
"posttest": "yarn lint && yarn test:deprecation-policy && yarn test:json-schema && yarn test:command-reference",
120+
"prepack": "sf-prepack",
121+
"prepare": "sf-install",
122+
"pretest": "sf-compile-test",
123+
"test": "sf-test",
124+
"test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
106125
"test:deprecation-policy": "./bin/dev snapshot:compare",
107-
"test:command-reference": "./bin/dev commandreference:generate -p apex --erroronwarnings",
108-
"package": "npm pack"
109-
},
110-
"husky": {
111-
"hooks": {
112-
"pre-commit": "yarn lint-staged"
113-
}
126+
"test:json-schema": "./bin/dev schema:compare",
127+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
128+
"version": "oclif readme"
114129
},
115130
"lint-staged": {
116131
"./{src,test}/**/*.{ts,js}": [

0 commit comments

Comments
 (0)