You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,33 +43,39 @@ Example `.eslintrc`:
43
43
44
44
## Configurations
45
45
46
-
This package exposes multiple configurations for your usage. Each configuration listed below is available for both JavaScript projects (no suffix) and TypeScript projects (with`-ts` suffix).
46
+
This package exposes multiple configurations for your usage. Each configuration listed below is available for both JavaScript projects and TypeScript projects (when using`-ts` suffix).
47
47
48
-
### `@salesforce/eslint-config-lwc/base` and `@salesforce/eslint-config-lwc/base-ts` configurations
48
+
### `@salesforce/eslint-config-lwc/base`
49
49
50
50
**Goal:**
51
51
Prevent common pitfalls with LWC, and enforce other Salesforce platform restrictions.
52
52
53
53
**Rules:**
54
54
[_LWC specific rules_](https://github.com/salesforce/eslint-plugin-lwc/blob/master/README.md#lwc) only.
55
55
56
-
### `@salesforce/eslint-config-lwc/recommended` and `@salesforce/eslint-config-lwc/recommended-ts` configurations
56
+
**TypeScript:** Use `@salesforce/eslint-config-lwc/base-ts` to use this config in TypeScript projects.
57
+
58
+
### `@salesforce/eslint-config-lwc/recommended`
57
59
58
60
**Goal:**
59
61
Prevent common Javascript pitfalls and enforce all best practices.
60
62
61
63
**Rules:**
62
64
`@salesforce/eslint-config-lwc/base` rules + Most of the base [_Potential errors_](https://eslint.org/docs/rules/#possible-errors) rules + Some of the [_Best Practices_](https://eslint.org/docs/rules/#best-practices) rules + [_LWC Best Practices_](https://github.com/salesforce/eslint-plugin-lwc/blob/master/README.md#best-practices).
63
65
64
-
### `@salesforce/eslint-config-lwc/extended` and `@salesforce/eslint-config-lwc/extended-ts` configurations
66
+
**TypeScript:** Use `@salesforce/eslint-config-lwc/recommended-ts` to use this config in TypeScript projects.
67
+
68
+
### `@salesforce/eslint-config-lwc/extended`
65
69
66
70
**Goal:**
67
71
Restrict usage of some Javascript language features known to be slow after the _COMPAT_ transformation. LWC runs in _COMPAT_ mode on older browsers (eg. IE11). To support new Javascript syntax and language features on older browser the LWC compiler transforms LWC modules. This linting configuration targets patterns known to be slow in _COMPAT_ mode.
68
72
69
73
**Rules:**
70
74
`@salesforce/eslint-config-lwc/recommended` rules + restrict usage of some slow patterns in [_COMPAT_](https://github.com/salesforce/eslint-plugin-lwc/blob/master/README.md#compat-performance).
71
75
72
-
### `@salesforce/eslint-config-lwc/i18n` and `@salesforce/eslint-config-lwc/i18n-ts` configurations
76
+
**TypeScript:** Use `@salesforce/eslint-config-lwc/extended-ts` to use this config in TypeScript projects.
77
+
78
+
### `@salesforce/eslint-config-lwc/i18n`
73
79
74
80
**Goal:**
75
81
Promote usage of `@salesforce/i18n-service` over 3rd parties, promote internationalization (I18N) best practices.
@@ -87,7 +93,9 @@ Add the `i18n` configuration to the `extends` field in your `.eslintrc` configur
87
93
}
88
94
```
89
95
90
-
### `@salesforce/eslint-config-lwc/ssr` and `@salesforce/eslint-config-lwc/ssr-ts` configurations
96
+
**TypeScript:** Use `@salesforce/eslint-config-lwc/i18n-ts` to use this config in TypeScript projects.
97
+
98
+
### `@salesforce/eslint-config-lwc/ssr`
91
99
92
100
**Goal:**
93
101
Promote writing server-side-rendering friendly components. We only recommend using this configuration if your components are running in experiences supporting LWC server-side-rendering.
@@ -104,3 +112,5 @@ Add the `ssr` configuration to the `extends` field in your `.eslintrc` configura
0 commit comments