Skip to content
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
2 changes: 1 addition & 1 deletion packages/code-analyzer-eslint-engine/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@salesforce/code-analyzer-eslint-engine",
"description": "Plugin package that adds 'eslint' as an engine into Salesforce Code Analyzer",
"version": "0.34.0",
"version": "0.35.0-SNAPSHOT",
"author": "The Salesforce Code Analyzer Team",
"license": "BSD-3-Clause",
"homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview",
Expand Down
7 changes: 7 additions & 0 deletions packages/code-analyzer-eslint-engine/src/base-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ export class BaseConfigFactory {
// Swap out eslintJs.configs.recommended with eslintJs.configs.all
configs[1] = eslintJs.configs.all;

// This one rule makes eslint throw an exception if the user doesn't have jest installed (which should be
// optional), so we turn it off for now. See https://github.com/salesforce/eslint-config-lwc/issues/161
configs[3].rules = {
...configs[3].rules,
'jest/no-deprecated-functions': 'off'
}

// This one rule is broken and thus, we need to turn it off for now.
// See https://git.soma.salesforce.com/lwc/eslint-plugin-lwc-platform/issues/152
configs[5].rules = {
Expand Down
11 changes: 7 additions & 4 deletions packages/code-analyzer-eslint-engine/src/rule-mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,10 +1040,13 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
severity: SeverityLevel.High,
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
},
"jest/no-deprecated-functions": {
severity: SeverityLevel.Moderate,
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
},

// This one rule makes eslint throw an exception if the user doesn't have jest installed (which should be
// optional), so we turn it off for now. See https://github.com/salesforce/eslint-config-lwc/issues/161
// "jest/no-deprecated-functions": {
// severity: SeverityLevel.Moderate,
// tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
// },
"jest/no-disabled-tests": {
severity: SeverityLevel.Info,
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,20 +685,6 @@
"JavaScript"
]
},
{
"description": "Disallow use of deprecated functions",
"name": "jest/no-deprecated-functions",
"resourceUrls": [
"https://github.com/jest-community/eslint-plugin-jest/blob/v29.0.1/docs/rules/no-deprecated-functions.md"
],
"severityLevel": 3,
"tags": [
"Recommended",
"LWC",
"BestPractices",
"JavaScript"
]
},
{
"description": "Disallow disabled tests",
"name": "jest/no-disabled-tests",
Expand Down