eslint-config-salesforce-typescript 0.2.8 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +22 -13
- package/CHANGELOG.md +33 -0
- package/package.json +7 -8
package/.eslintrc.js
CHANGED
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
8
8
|
'plugin:@typescript-eslint/recommended',
|
|
9
9
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
10
|
-
'
|
|
10
|
+
'eslint-config-prettier',
|
|
11
11
|
],
|
|
12
12
|
parser: '@typescript-eslint/parser',
|
|
13
13
|
parserOptions: {
|
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
|
19
19
|
],
|
|
20
20
|
sourceType: 'module',
|
|
21
21
|
},
|
|
22
|
-
plugins: ['@typescript-eslint', 'eslint-plugin-import', 'eslint-plugin-jsdoc'
|
|
22
|
+
plugins: ['@typescript-eslint', 'eslint-plugin-import', 'eslint-plugin-jsdoc'],
|
|
23
23
|
rules: {
|
|
24
24
|
// Override @typescript-eslint/recommended
|
|
25
25
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
@@ -34,20 +34,14 @@ module.exports = {
|
|
|
34
34
|
],
|
|
35
35
|
|
|
36
36
|
// Custom @typescript-eslint
|
|
37
|
-
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
38
|
-
'@typescript-eslint/quotes': [
|
|
39
|
-
'error',
|
|
40
|
-
'single',
|
|
41
|
-
{
|
|
42
|
-
avoidEscape: true,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
37
|
'@typescript-eslint/array-type': [
|
|
46
38
|
'error',
|
|
47
39
|
{
|
|
48
40
|
default: 'array-simple',
|
|
49
41
|
},
|
|
50
42
|
],
|
|
43
|
+
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
44
|
+
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
51
45
|
'@typescript-eslint/explicit-member-accessibility': [
|
|
52
46
|
'error',
|
|
53
47
|
{
|
|
@@ -67,14 +61,29 @@ module.exports = {
|
|
|
67
61
|
},
|
|
68
62
|
},
|
|
69
63
|
],
|
|
64
|
+
'@typescript-eslint/member-ordering': 'error',
|
|
65
|
+
"@typescript-eslint/no-shadow": "error",
|
|
66
|
+
'@typescript-eslint/return-await': 'error',
|
|
67
|
+
// turning off the base rule is recommended by ts-eslint
|
|
68
|
+
'no-return-await': 'off',
|
|
70
69
|
'@typescript-eslint/prefer-for-of': 'error',
|
|
71
70
|
'@typescript-eslint/prefer-function-type': 'error',
|
|
72
|
-
'@typescript-eslint/
|
|
73
|
-
'@typescript-eslint/
|
|
71
|
+
'@typescript-eslint/prefer-includes': 'error',
|
|
72
|
+
'@typescript-eslint/prefer-nullish-coalescing': 'error',
|
|
73
|
+
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
74
|
+
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
|
|
75
|
+
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
|
|
76
|
+
'@typescript-eslint/quotes': [
|
|
77
|
+
'error',
|
|
78
|
+
'single',
|
|
79
|
+
{
|
|
80
|
+
avoidEscape: true,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
74
84
|
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
75
85
|
'@typescript-eslint/unified-signatures': 'error',
|
|
76
86
|
"no-shadow": "off",
|
|
77
|
-
"@typescript-eslint/no-shadow": "error",
|
|
78
87
|
},
|
|
79
88
|
ignorePatterns: ['*.js'],
|
|
80
89
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.1](https://github.com/forcedotcom/eslint-config-salesforce-typescript/compare/v1.1.0...v1.1.1) (2022-08-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* remove reference to prettier from eslintrc ([6c8c307](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/6c8c307032478a0e07feb9b1655e50e06b7fef3c))
|
|
11
|
+
|
|
12
|
+
## [1.1.0](https://github.com/forcedotcom/eslint-config-salesforce-typescript/compare/v1.0.0...v1.1.0) (2022-08-12)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* followup for prettier/eslint plugin removal ([70cf09a](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/70cf09a37d42ee4aa801682fd17b2ddaffb7fdd8))
|
|
18
|
+
|
|
19
|
+
## [1.0.0](https://github.com/forcedotcom/eslint-config-salesforce-typescript/compare/v0.2.8...v1.0.0) (2022-06-20)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* cause release ([effb11e](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/effb11ec618318e2d548fe546ccbc26a71c0e8a3))
|
|
25
|
+
* check strings with methods ([ed8179a](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/ed8179a66af4a14e2942734822486257c4d65c45))
|
|
26
|
+
* exhaustive switch ([ba582e2](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/ba582e28e24d8512040dc11d009459bbe00ff3b1))
|
|
27
|
+
* prefer ?? ([41f1c20](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/41f1c202153f8bd0d52fa8e107afad89b7a4dff3))
|
|
28
|
+
* prefer includes ([769da80](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/769da8089f7ed8baa7f0910cc59ee8d1f34ef184))
|
|
29
|
+
* prefer optional chaining ([a13c023](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/a13c0239a7eecb4726a5a864dc6213a407f05f6a))
|
|
30
|
+
* return await ([2ad7d4c](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/2ad7d4c9c5b49e501d338660dedf97a8e43da56a))
|
|
31
|
+
* type params on reduce ([e735d70](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/e735d70e799e481489f4e991ce8a8e97e68ae407))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* turn off base rule ([a4e9d91](https://github.com/forcedotcom/eslint-config-salesforce-typescript/commit/a4e9d9195403680aaaa952c864226b16afb0b549))
|
|
37
|
+
|
|
5
38
|
### 0.2.8 (2021-09-09)
|
|
6
39
|
|
|
7
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-salesforce-typescript",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "The eslint config for Salesforce typescript projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Salesforce",
|
|
@@ -19,14 +19,13 @@
|
|
|
19
19
|
"url": "https://github.com/forcedotcom/eslint-config-salesforce-typescript/issues"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
23
|
-
"@typescript-eslint/parser": "^
|
|
24
|
-
"eslint": "^
|
|
25
|
-
"eslint-config-prettier": "^
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
|
23
|
+
"@typescript-eslint/parser": "^5.33.0",
|
|
24
|
+
"eslint": "^8.21.0",
|
|
25
|
+
"eslint-config-prettier": "^8.5.0",
|
|
26
26
|
"eslint-config-salesforce-license": "^0.1.6",
|
|
27
|
-
"eslint-plugin-import": "2.
|
|
28
|
-
"eslint-plugin-jsdoc": "^
|
|
29
|
-
"eslint-plugin-prettier": "^3.1.3"
|
|
27
|
+
"eslint-plugin-import": "^2.26.0",
|
|
28
|
+
"eslint-plugin-jsdoc": "^39.3.6"
|
|
30
29
|
},
|
|
31
30
|
"publishConfig": {
|
|
32
31
|
"access": "public"
|