Skip to content

Commit

Permalink
feat: keep logFn out of code (#94)
Browse files Browse the repository at this point in the history
* feat: keep logFn out of code

* chore: external lint without direct dependency

* chore: no shx
  • Loading branch information
mshanemc authored Mar 26, 2024
1 parent d77f0e1 commit 73062e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ module.exports = {
group: ["**/../lib/**", "lib/**"],
message: "import from /src not from /lib. /lib is a build artifact",
},
{
group: ["@salesforce/kit"],
importNames: ["logFn"],
message:
"The logging function is only for debug and should not be shipped in production code",
},
],
},
],
Expand Down Expand Up @@ -80,6 +86,6 @@ module.exports = {
"import/order": "error",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "error",
"jsdoc/tag-lines": [2, "any", { "startLines": 1,"endLines": 1 }]
"jsdoc/tag-lines": [2, "any", { startLines: 1, endLines: 1 }],
},
};
5 changes: 2 additions & 3 deletions .github/workflows/externalLint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ jobs:
name: ${{ inputs.command }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
- run: git clone ${{ inputs.externalProjectGitUrl}} $(pwd)
- run: yarn install --network-timeout 600000
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: swap this dependency for the version on this branch
run: |
yarn remove ${{ inputs.packageName }}
yarn add ${{ github.repository }}#${{ github.sha }} --dev
- name: install/build ${{ inputs.packageName}} in node_modules
working-directory: node_modules/${{ inputs.packageName }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- https://github.com/salesforcecli/plugin-info
- https://github.com/salesforcecli/plugin-limits
- https://github.com/salesforcecli/plugin-login
- https://github.com/salesforcecli/plugin-marketplace
- https://github.com/salesforcecli/plugin-org
- https://github.com/salesforcecli/plugin-packaging
- https://github.com/salesforcecli/plugin-schema
Expand All @@ -42,3 +43,4 @@ jobs:
with:
packageName: "eslint-config-salesforce"
externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }}
preExternalBuildCommands: "rm -rf node_modules/@salesforce/**/node_modules/@salesforce/eslint-config-salesforce"

0 comments on commit 73062e2

Please sign in to comment.