Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add strict null checks #330

Merged
merged 6 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@
module.exports = {
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license'],
rules: {
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/member-ordering': 'off',
'no-underscore-dangle': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-empty': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'jsdoc/newline-after-description': 'off',
},
};
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ package-lock.json
npm-error.log
yarn-error.log
lerna-debug.log
*.tsbuildinfo

# compile source
lib
Expand All @@ -26,6 +25,9 @@ coverage
docs

# -- CLEAN ALL
*.tsbuildinfo
.eslintcache
peternhale marked this conversation as resolved.
Show resolved Hide resolved
.wireit
node_modules

# --
Expand Down
21 changes: 20 additions & 1 deletion .sfdevrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,24 @@
"test": {
"testsPath": "test/**/*.test.ts"
},
"exclude-scripts": ["pretest"]
"exclude-scripts": ["pretest"],
"wireit": {
"test": {
"dependencies": ["test:only", "lint"]
},
"test:only": {
"command": "nyc mocha \"test/**/*.test.ts\"",
"env": {
"FORCE_COLOR": "2"
},
"dependencies": ["test:compile", "test:command-reference"],
"files": ["test/**/*.ts", "src/**/*.ts", "**/tsconfig.json", ".mocha*", "!*.nut.ts", ".nycrc", "tmp/test/**"],
"output": []
},
"test:command-reference": {
"command": "\"./bin/dev\" commandreference:generate --plugins auth --outputdir ./tmp/test",
"files": ["src/**/*.ts", "messages/**", "package.json"],
"output": ["tmp/test/**"]
}
}
}
172 changes: 138 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@
"author": "Salesforce",
"bugs": "https://github.com/salesforcecli/plugin-command-reference/issues",
"dependencies": {
"@oclif/core": "^2.0.7",
"@salesforce/core": "^3.32.12",
"@salesforce/kit": "^1.8.2",
"@salesforce/sf-plugins-core": "^2.0.1",
"@oclif/core": "^2.8.2",
"@salesforce/core": "^3.34.7",
"@salesforce/kit": "^1.9.2",
"@salesforce/sf-plugins-core": "^2.2.9",
"@salesforce/ts-types": "^1.7.1",
"chalk": "^3.0.0",
"fs-extra": "^10.0.1",
"handlebars": "^4.7.7",
"lodash.uniqby": "^4.7.0",
"mkdirp": "^1.0.4",
"tslib": "^2"
},
"devDependencies": {
"@oclif/plugin-help": "^5.1.1",
"@oclif/plugin-help": "^5.2.9",
"@salesforce/dev-config": "^3.1.0",
"@salesforce/dev-scripts": "^2.0.4",
"@salesforce/plugin-login": "^1.1.15",
"@salesforce/dev-scripts": "^4.3.0",
"@salesforce/plugin-auth": "^2.7.12",
"@salesforce/prettier-config": "^0.0.2",
"@types/debug": "^4.1.7",
"@types/fs-extra": "^9.0.13",
"@types/lodash.uniqby": "^4.7.6",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"chai": "^4.2.0",
"eslint": "^7.27.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-salesforce": "^0.1.6",
"eslint-config-salesforce-license": "^0.1.6",
"eslint-config-salesforce-typescript": "^0.2.8",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-salesforce": "^1.2.0",
"eslint-config-salesforce-license": "^0.2.0",
"eslint-config-salesforce-typescript": "^1.1.1",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "2.24.2",
"eslint-plugin-jsdoc": "^35.1.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^43.0.7",
"husky": "^7.0.4",
"mocha": "^9.1.3",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"oclif": "^3.6.1",
"prettier": "^2.0.5",
"oclif": "^3.8.1",
"prettier": "^2.8.7",
"pretty-quick": "^3.1.0",
"shx": "^0.3.3",
"sinon": "10.0.0",
"ts-node": "^10.0.0",
"typescript": "^4.1.3"
"typescript": "^4.9.5",
"wireit": "^0.9.5"
},
"engines": {
"node": ">=14.0.0"
Expand Down Expand Up @@ -78,30 +78,134 @@
},
"devPlugins": [
"@oclif/plugin-help",
"@salesforce/plugin-login"
"@salesforce/plugin-auth"
]
},
"repository": "salesforcecli/plugin-command-reference",
"scripts": {
"build": "sf-build",
"build": "wireit",
"clean": "sf-clean",
"clean-all": "sf-clean all",
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
"command-reference": "./bin/dev commandreference:generate --plugins login --outputdir test/tmp",
"compile": "sf-compile",
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -rf test/tmp && shx rm -f oclif.manifest.json",
"compile": "wireit",
"docs": "sf-docs",
"format": "sf-format",
"lint": "sf-lint",
"format": "wireit",
"lint": "wireit",
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "yarn lint",
"prepack": "sf-prepack",
"prepare": "sf-install",
"pretest": "sf-compile-test && yarn command-reference",
"test": "sf-test",
"test": "wireit",
"test:only": "wireit",
"version": "oclif readme"
},
"publishConfig": {
"access": "public"
},
"main": "lib/index.js"
}
"main": "lib/index.js",
"wireit": {
"build": {
"dependencies": [
"compile",
"lint"
]
},
"compile": {
"command": "tsc -p . --pretty --incremental",
"files": [
"src/**/*.ts",
"**/tsconfig.json",
"messages/**"
],
"output": [
"lib/**",
"*.tsbuildinfo"
],
"clean": "if-file-deleted"
},
"format": {
"command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
"files": [
"src/**/*.ts",
"test/**/*.ts",
"schemas/**/*.json",
"command-snapshot.json",
".prettier*"
],
"output": []
},
"lint": {
"command": "eslint src test --color --cache --cache-location .eslintcache",
"files": [
"src/**/*.ts",
"test/**/*.ts",
"messages/**",
"**/.eslint*",
"**/tsconfig.json"
],
"output": []
},
"test:compile": {
"command": "tsc -p \"./test\" --pretty",
"files": [
"test/**/*.ts",
"**/tsconfig.json"
],
"output": []
},
"test": {
"dependencies": [
"test:only",
"lint"
]
},
"test:only": {
"command": "nyc mocha \"test/**/*.test.ts\"",
"env": {
"FORCE_COLOR": "2"
},
"dependencies": [
"test:compile",
"test:command-reference"
],
"files": [
"test/**/*.ts",
"src/**/*.ts",
"**/tsconfig.json",
".mocha*",
"!*.nut.ts",
".nycrc",
"tmp/test/**"
],
"output": []
},
"test:command-reference": {
"command": "\"./bin/dev\" commandreference:generate --plugins auth --outputdir ./tmp/test",
"files": [
"src/**/*.ts",
"messages/**",
"package.json"
],
"output": [
"tmp/test/**"
]
},
"test:deprecation-policy": {
"command": "\"./bin/dev\" snapshot:compare",
"files": [
"src/**/*.ts"
],
"output": [],
"dependencies": [
"compile"
]
},
"test:json-schema": {
"command": "\"./bin/dev\" schema:compare",
"files": [
"src/**/*.ts",
"schemas"
],
"output": []
}
}
}
Loading