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

feat: no null/undefined in template literal #246

Merged
merged 5 commits into from
Jul 24, 2024
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: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ jobs:
yarn-lockfile-check:
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
linux-unit-tests:
needs: yarn-lockfile-check
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn build
- run: yarn test
lint-external:
uses: ./.github/workflows/externalLint.yml
strategy:
Expand Down Expand Up @@ -39,5 +44,5 @@ jobs:
- https://github.com/forcedotcom/source-deploy-retrieve

with:
packageName: "eslint-config-salesforce-typescript"
packageName: 'eslint-config-salesforce-typescript'
externalProjectGitUrl: ${{ matrix.externalProjectGitUrl }}
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = {
'@typescript-eslint/restrict-template-expressions': [
'error',
{
// true generally (so we get it in /test), we override it to false for src lower down
allowNullish: true,
allowBoolean: true,
allowNumber: true,
Expand Down Expand Up @@ -94,8 +95,17 @@ module.exports = {
ignorePatterns: ['*.js'],
overrides: [
{
// put stricter rules you only want to apply to production code here
files: ['src/**'],
rules: {
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowNullish: false,
allowBoolean: true,
allowNumber: true,
},
],
'import/no-extraneous-dependencies': [
'error',
{
Expand Down
Loading