@rebeccastevens/eslint-config 1.2.2 → 1.3.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,33 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file. Dates are displayed in UTC.
3
3
 
4
+ ## [1.3.2](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/compare/v1.3.1...v1.3.2) (2022-03-22)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * update node rules ([81a5c93](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/commit/81a5c931f79bee9314fea099d3fa532216c2104b))
10
+
11
+ ## [1.3.1](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/compare/v1.3.0...v1.3.1) (2022-02-09)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * update unicorn rules ([d0bca6e](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/commit/d0bca6ee46f296ece9da5b0cb2758a59400996ad))
17
+
18
+ # [1.3.0](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/compare/v1.2.2...v1.3.0) (2022-02-07)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * allow throw statements inside async functions ([4bc76bf](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/commit/4bc76bf167517fd3ab1643a896834238d982ebb5))
24
+
25
+
26
+ ### Features
27
+
28
+ * check tsdocs when using typescript ([3b3d586](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/commit/3b3d586ee6d01754c6db6faf2f302e866b1fd7f8))
29
+ * update script config and add test config ([88196bc](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/commit/88196bc1fd5983fa1ff5d610f42c5e7f1a041daf))
30
+
4
31
  ## [1.2.2](https://github.com/RebeccaStevens/eslint-config-rebeccastevens/compare/v1.2.1...v1.2.2) (2022-01-29)
5
32
 
6
33
 
package/README.md CHANGED
@@ -22,6 +22,10 @@ yarn add -D \
22
22
  @rebeccastevens/eslint-config
23
23
  ```
24
24
 
25
+ ```sh
26
+ npx install-peerdeps @rebeccastevens/eslint-config --dev -o -Y
27
+ ```
28
+
25
29
  ## Usage
26
30
 
27
31
  ### Language
@@ -86,6 +90,7 @@ yarn add -D \
86
90
  eslint-plugin-optimize-regex \
87
91
  eslint-plugin-promise \
88
92
  eslint-plugin-sonarjs \
93
+ eslint-plugin-tsdoc \
89
94
  eslint-plugin-unicorn
90
95
  ```
91
96
 
@@ -4,27 +4,20 @@ var commonOverrides = {
4
4
  overrides: [
5
5
  {
6
6
  files: ["*"],
7
+ extends: ["@rebeccastevens/eslint-config/script"],
7
8
  rules: {
8
- "functional/immutable-data": "off",
9
9
  "functional/functional-parameters": "off",
10
- "functional/no-expression-statement": "off",
10
+ "functional/immutable-data": "off",
11
11
  "node/no-sync": "off",
12
12
  },
13
13
  },
14
14
  {
15
15
  files: ["scripts/**/*"],
16
- rules: {
17
- "functional/no-expression-statement": "off",
18
- "functional/no-throw-statement": "off",
19
- },
16
+ extends: ["@rebeccastevens/eslint-config/script"],
20
17
  },
21
18
  {
22
19
  files: ["{test,tests}/**/*", "**/*.test.*"],
23
- rules: {
24
- "functional/functional-parameters": "off",
25
- "functional/no-expression-statement": "off",
26
- "node/no-sync": "off",
27
- },
20
+ extends: ["@rebeccastevens/eslint-config/test"],
28
21
  },
29
22
  ],
30
23
  };
@@ -2,27 +2,20 @@ var commonOverrides = {
2
2
  overrides: [
3
3
  {
4
4
  files: ["*"],
5
+ extends: ["@rebeccastevens/eslint-config/script"],
5
6
  rules: {
6
- "functional/immutable-data": "off",
7
7
  "functional/functional-parameters": "off",
8
- "functional/no-expression-statement": "off",
8
+ "functional/immutable-data": "off",
9
9
  "node/no-sync": "off",
10
10
  },
11
11
  },
12
12
  {
13
13
  files: ["scripts/**/*"],
14
- rules: {
15
- "functional/no-expression-statement": "off",
16
- "functional/no-throw-statement": "off",
17
- },
14
+ extends: ["@rebeccastevens/eslint-config/script"],
18
15
  },
19
16
  {
20
17
  files: ["{test,tests}/**/*", "**/*.test.*"],
21
- rules: {
22
- "functional/functional-parameters": "off",
23
- "functional/no-expression-statement": "off",
24
- "node/no-sync": "off",
25
- },
18
+ extends: ["@rebeccastevens/eslint-config/test"],
26
19
  },
27
20
  ],
28
21
  };
package/dist/modern.cjs CHANGED
@@ -5,14 +5,8 @@ var deepmergeTs = require('deepmerge-ts');
5
5
  const useNumberIsFinite = "Please use Number.isFinite instead";
6
6
  const useNumberIsNan = "Please use Number.isNaN instead";
7
7
  const useObjectDefineProperty = "Please use Object.defineProperty instead.";
8
- const rules$6 = {
8
+ const rules$7 = {
9
9
  "accessor-pairs": "error",
10
- "array-callback-return": [
11
- "error",
12
- {
13
- allowImplicit: false,
14
- },
15
- ],
16
10
  "block-scoped-var": "error",
17
11
  "class-methods-use-this": "error",
18
12
  "complexity": "off",
@@ -157,6 +151,32 @@ const rules$6 = {
157
151
  "yoda": ["error", "never"],
158
152
  };
159
153
 
154
+ const rules$6 = {
155
+ "callback-return": "off",
156
+ "global-require": "off",
157
+ "handle-callback-err": "off",
158
+ "id-blacklist": "off",
159
+ "indent-legacy": "off",
160
+ "lines-around-directive": "off",
161
+ "newline-after-var": "off",
162
+ "newline-before-return": "off",
163
+ "no-buffer-constructor": "off",
164
+ "no-catch-shadow": "off",
165
+ "no-mixed-requires": "off",
166
+ "no-native-reassign": "off",
167
+ "no-negated-in-lhs": "off",
168
+ "no-new-require": "off",
169
+ "no-path-concat": "off",
170
+ "no-process-env": "off",
171
+ "no-process-exit": "off",
172
+ "no-restricted-modules": "off",
173
+ "no-spaced-func": "off",
174
+ "no-sync": "off",
175
+ "prefer-reflect": "off",
176
+ "require-jsdoc": "off",
177
+ "valid-jsdoc": "off",
178
+ };
179
+
160
180
  const rules$5 = {
161
181
  "arrow-body-style": ["error", "as-needed"],
162
182
  "arrow-parens": ["error", "always"],
@@ -585,12 +605,13 @@ const rules$1 = {
585
605
  };
586
606
 
587
607
  const rules = {
588
- ...rules$6,
608
+ ...rules$7,
589
609
  ...rules$5,
590
610
  ...rules$4,
591
611
  ...rules$3,
592
612
  ...rules$2,
593
613
  ...rules$1,
614
+ ...rules$6,
594
615
  };
595
616
 
596
617
  const settings$9 = {
@@ -625,6 +646,12 @@ const settings$8 = {
625
646
  allowReturningBranches: true,
626
647
  },
627
648
  ],
649
+ "functional/no-throw-statement": [
650
+ "error",
651
+ {
652
+ allowInAsyncFunctions: true,
653
+ },
654
+ ],
628
655
  "functional/no-try-statement": "off",
629
656
  "functional/prefer-readonly-type": [
630
657
  "error",
@@ -947,6 +974,7 @@ const settings$4 = {
947
974
  "node/no-process-exit": "error",
948
975
  "node/no-sync": "error",
949
976
  "node/no-unpublished-import": "warn",
977
+ "node/no-unsupported-features/es-syntax": "off",
950
978
  "node/prefer-global/buffer": ["error", "always"],
951
979
  "node/prefer-global/console": ["error", "always"],
952
980
  "node/prefer-global/process": ["error", "always"],
@@ -1002,14 +1030,17 @@ const settings = {
1002
1030
  "unicorn/no-array-reduce": "off",
1003
1031
  "unicorn/no-nested-ternary": "off",
1004
1032
  "unicorn/no-null": "off",
1033
+ // "node/no-process-exit" covers this.
1034
+ "unicorn/no-process-exit": "off",
1005
1035
  "unicorn/no-useless-undefined": "off",
1006
- // "unicorn/prefer-at": [
1007
- // "error",
1008
- // {
1009
- // checkAllIndexAccess: true,
1010
- // },
1011
- // ],
1012
- // "unicorn/prefer-object-has-own": "error",
1036
+ "unicorn/prefer-at": [
1037
+ "error",
1038
+ {
1039
+ checkAllIndexAccess: false,
1040
+ },
1041
+ ],
1042
+ "unicorn/prefer-json-parse-buffer": "off",
1043
+ "unicorn/prefer-object-has-own": "error",
1013
1044
  "unicorn/prefer-string-replace-all": "error",
1014
1045
  "unicorn/prefer-top-level-await": "error",
1015
1046
  "unicorn/prevent-abbreviations": "off",
package/dist/modern.mjs CHANGED
@@ -3,14 +3,8 @@ import { deepmerge } from 'deepmerge-ts';
3
3
  const useNumberIsFinite = "Please use Number.isFinite instead";
4
4
  const useNumberIsNan = "Please use Number.isNaN instead";
5
5
  const useObjectDefineProperty = "Please use Object.defineProperty instead.";
6
- const rules$6 = {
6
+ const rules$7 = {
7
7
  "accessor-pairs": "error",
8
- "array-callback-return": [
9
- "error",
10
- {
11
- allowImplicit: false,
12
- },
13
- ],
14
8
  "block-scoped-var": "error",
15
9
  "class-methods-use-this": "error",
16
10
  "complexity": "off",
@@ -155,6 +149,32 @@ const rules$6 = {
155
149
  "yoda": ["error", "never"],
156
150
  };
157
151
 
152
+ const rules$6 = {
153
+ "callback-return": "off",
154
+ "global-require": "off",
155
+ "handle-callback-err": "off",
156
+ "id-blacklist": "off",
157
+ "indent-legacy": "off",
158
+ "lines-around-directive": "off",
159
+ "newline-after-var": "off",
160
+ "newline-before-return": "off",
161
+ "no-buffer-constructor": "off",
162
+ "no-catch-shadow": "off",
163
+ "no-mixed-requires": "off",
164
+ "no-native-reassign": "off",
165
+ "no-negated-in-lhs": "off",
166
+ "no-new-require": "off",
167
+ "no-path-concat": "off",
168
+ "no-process-env": "off",
169
+ "no-process-exit": "off",
170
+ "no-restricted-modules": "off",
171
+ "no-spaced-func": "off",
172
+ "no-sync": "off",
173
+ "prefer-reflect": "off",
174
+ "require-jsdoc": "off",
175
+ "valid-jsdoc": "off",
176
+ };
177
+
158
178
  const rules$5 = {
159
179
  "arrow-body-style": ["error", "as-needed"],
160
180
  "arrow-parens": ["error", "always"],
@@ -583,12 +603,13 @@ const rules$1 = {
583
603
  };
584
604
 
585
605
  const rules = {
586
- ...rules$6,
606
+ ...rules$7,
587
607
  ...rules$5,
588
608
  ...rules$4,
589
609
  ...rules$3,
590
610
  ...rules$2,
591
611
  ...rules$1,
612
+ ...rules$6,
592
613
  };
593
614
 
594
615
  const settings$9 = {
@@ -623,6 +644,12 @@ const settings$8 = {
623
644
  allowReturningBranches: true,
624
645
  },
625
646
  ],
647
+ "functional/no-throw-statement": [
648
+ "error",
649
+ {
650
+ allowInAsyncFunctions: true,
651
+ },
652
+ ],
626
653
  "functional/no-try-statement": "off",
627
654
  "functional/prefer-readonly-type": [
628
655
  "error",
@@ -945,6 +972,7 @@ const settings$4 = {
945
972
  "node/no-process-exit": "error",
946
973
  "node/no-sync": "error",
947
974
  "node/no-unpublished-import": "warn",
975
+ "node/no-unsupported-features/es-syntax": "off",
948
976
  "node/prefer-global/buffer": ["error", "always"],
949
977
  "node/prefer-global/console": ["error", "always"],
950
978
  "node/prefer-global/process": ["error", "always"],
@@ -1000,14 +1028,17 @@ const settings = {
1000
1028
  "unicorn/no-array-reduce": "off",
1001
1029
  "unicorn/no-nested-ternary": "off",
1002
1030
  "unicorn/no-null": "off",
1031
+ // "node/no-process-exit" covers this.
1032
+ "unicorn/no-process-exit": "off",
1003
1033
  "unicorn/no-useless-undefined": "off",
1004
- // "unicorn/prefer-at": [
1005
- // "error",
1006
- // {
1007
- // checkAllIndexAccess: true,
1008
- // },
1009
- // ],
1010
- // "unicorn/prefer-object-has-own": "error",
1034
+ "unicorn/prefer-at": [
1035
+ "error",
1036
+ {
1037
+ checkAllIndexAccess: false,
1038
+ },
1039
+ ],
1040
+ "unicorn/prefer-json-parse-buffer": "off",
1041
+ "unicorn/prefer-object-has-own": "error",
1011
1042
  "unicorn/prefer-string-replace-all": "error",
1012
1043
  "unicorn/prefer-top-level-await": "error",
1013
1044
  "unicorn/prevent-abbreviations": "off",
package/dist/script.cjs CHANGED
@@ -3,8 +3,12 @@
3
3
  const baseConfig = {
4
4
  rules: {
5
5
  "functional/no-conditional-statement": "off",
6
+ "functional/no-expression-statement": "off",
6
7
  "functional/no-loop-statement": "off",
7
8
  "functional/no-throw-statement": "off",
9
+ "node/no-process-exit": "off",
10
+ "node/no-sync": "off",
11
+ "node/no-unpublished-import": "off",
8
12
  },
9
13
  };
10
14
 
package/dist/script.mjs CHANGED
@@ -1,8 +1,12 @@
1
1
  const baseConfig = {
2
2
  rules: {
3
3
  "functional/no-conditional-statement": "off",
4
+ "functional/no-expression-statement": "off",
4
5
  "functional/no-loop-statement": "off",
5
6
  "functional/no-throw-statement": "off",
7
+ "node/no-process-exit": "off",
8
+ "node/no-sync": "off",
9
+ "node/no-unpublished-import": "off",
6
10
  },
7
11
  };
8
12
 
package/dist/test.cjs ADDED
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ const baseConfig = {
4
+ extends: ["@rebeccastevens/eslint-config/script"],
5
+ rules: {
6
+ "functional/functional-parameters": "off",
7
+ "functional/immutable-data": "warn",
8
+ "functional/no-conditional-statement": "warn",
9
+ "functional/no-expression-statement": "off",
10
+ "functional/no-loop-statement": "warn",
11
+ "functional/no-throw-statement": "off",
12
+ "node/no-sync": "off",
13
+ },
14
+ };
15
+
16
+ module.exports = baseConfig;
package/dist/test.mjs ADDED
@@ -0,0 +1,14 @@
1
+ const baseConfig = {
2
+ extends: ["@rebeccastevens/eslint-config/script"],
3
+ rules: {
4
+ "functional/functional-parameters": "off",
5
+ "functional/immutable-data": "warn",
6
+ "functional/no-conditional-statement": "warn",
7
+ "functional/no-expression-statement": "off",
8
+ "functional/no-loop-statement": "warn",
9
+ "functional/no-throw-statement": "off",
10
+ "node/no-sync": "off",
11
+ },
12
+ };
13
+
14
+ export { baseConfig as default };
@@ -2,6 +2,13 @@
2
2
 
3
3
  var deepmergeTs = require('deepmerge-ts');
4
4
 
5
+ const settings$1 = {
6
+ plugins: ["tsdoc"],
7
+ rules: {
8
+ "tsdoc/syntax": "warn",
9
+ },
10
+ };
11
+
5
12
  const settings = {
6
13
  plugins: ["@typescript-eslint"],
7
14
  extends: [
@@ -264,6 +271,6 @@ const baseConfig = {
264
271
  },
265
272
  ],
266
273
  };
267
- var typescript = deepmergeTs.deepmerge(baseConfig, settings);
274
+ var typescript = deepmergeTs.deepmerge(baseConfig, settings, settings$1);
268
275
 
269
276
  module.exports = typescript;
@@ -1,5 +1,12 @@
1
1
  import { deepmerge } from 'deepmerge-ts';
2
2
 
3
+ const settings$1 = {
4
+ plugins: ["tsdoc"],
5
+ rules: {
6
+ "tsdoc/syntax": "warn",
7
+ },
8
+ };
9
+
3
10
  const settings = {
4
11
  plugins: ["@typescript-eslint"],
5
12
  extends: [
@@ -262,6 +269,6 @@ const baseConfig = {
262
269
  },
263
270
  ],
264
271
  };
265
- var typescript = deepmerge(baseConfig, settings);
272
+ var typescript = deepmerge(baseConfig, settings, settings$1);
266
273
 
267
274
  export { typescript as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebeccastevens/eslint-config",
3
- "version": "1.2.2",
3
+ "version": "1.3.2",
4
4
  "description": "My ESLint shareable config.",
5
5
  "keywords": [
6
6
  "eslint config"
@@ -28,6 +28,10 @@
28
28
  "import": "./dist/script.mjs",
29
29
  "require": "./dist/script.cjs"
30
30
  },
31
+ "./test": {
32
+ "import": "./dist/test.mjs",
33
+ "require": "./dist/test.cjs"
34
+ },
31
35
  "./typescript": {
32
36
  "import": "./dist/typescript.mjs",
33
37
  "require": "./dist/typescript.cjs"
@@ -56,69 +60,72 @@
56
60
  "test": "echo no tests"
57
61
  },
58
62
  "dependencies": {
59
- "deepmerge-ts": "^2.0.1"
63
+ "deepmerge-ts": "^4.0.0"
60
64
  },
61
65
  "devDependencies": {
62
- "@commitlint/cli": "^16.0.1",
66
+ "@commitlint/cli": "^16.1.0",
63
67
  "@commitlint/config-conventional": "^16.0.0",
64
- "@rollup/plugin-commonjs": "^21.0.0",
65
- "@rollup/plugin-node-resolve": "^13.0.4",
68
+ "@rollup/plugin-commonjs": "^21.0.1",
69
+ "@rollup/plugin-node-resolve": "^13.1.3",
66
70
  "@rollup/plugin-typescript": "^8.3.0",
67
- "@semantic-release/changelog": "^6.0.0",
68
- "@semantic-release/commit-analyzer": "^9.0.1",
69
- "@semantic-release/git": "^10.0.0",
70
- "@semantic-release/github": "^8.0.1",
71
- "@semantic-release/npm": "^8.0.1",
72
- "@semantic-release/release-notes-generator": "^10.0.2",
73
- "@types/eslint": "^8.2.1",
74
- "@types/node": "^16.11.1",
75
- "@typescript-eslint/eslint-plugin": "^5.0.0",
76
- "@typescript-eslint/parser": "^5.0.0",
71
+ "@semantic-release/changelog": "^6.0.1",
72
+ "@semantic-release/commit-analyzer": "^9.0.2",
73
+ "@semantic-release/git": "^10.0.1",
74
+ "@semantic-release/github": "^8.0.2",
75
+ "@semantic-release/npm": "^9.0.0",
76
+ "@semantic-release/release-notes-generator": "^10.0.3",
77
+ "@types/eslint": "^8.4.1",
78
+ "@types/node": "^17.0.15",
79
+ "@typescript-eslint/eslint-plugin": "^5.10.2",
80
+ "@typescript-eslint/parser": "^5.10.2",
77
81
  "commitizen": "^4.2.4",
78
- "cspell": "^5.12.3",
82
+ "cspell": "^5.18.3",
79
83
  "cz-conventional-changelog": "^3.3.0",
80
- "eslint": "^8.0.0",
84
+ "eslint": "^8.8.0",
81
85
  "eslint-config-prettier": "^8.3.0",
82
- "eslint-import-resolver-typescript": "^2.3.0",
86
+ "eslint-import-resolver-typescript": "^2.5.0",
83
87
  "eslint-plugin-eslint-comments": "^3.2.0",
84
- "eslint-plugin-functional": "^4.0.0",
85
- "eslint-plugin-import": "^2.25.2",
86
- "eslint-plugin-jsdoc": "^37.0.3",
87
- "eslint-plugin-markdown": "^2.2.0",
88
+ "eslint-plugin-functional": "^4.2.0",
89
+ "eslint-plugin-import": "^2.25.4",
90
+ "eslint-plugin-jsdoc": "^37.7.1",
91
+ "eslint-plugin-markdown": "^2.2.1",
88
92
  "eslint-plugin-node": "^11.1.0",
89
- "eslint-plugin-optimize-regex": "^1.2.0",
93
+ "eslint-plugin-optimize-regex": "^1.2.1",
90
94
  "eslint-plugin-prettier": "^4.0.0",
91
95
  "eslint-plugin-promise": "^6.0.0",
92
- "eslint-plugin-sonarjs": "^0.11.0",
93
- "eslint-plugin-unicorn": "^40.0.0",
94
- "husky": "^7.0.2",
95
- "lint-staged": "^12.1.4",
96
- "markdownlint-cli": "^0.30.0",
96
+ "eslint-plugin-sonarjs": "^0.12.0",
97
+ "eslint-plugin-tsdoc": "^0.2.14",
98
+ "eslint-plugin-unicorn": "^41.0.0",
99
+ "husky": "^7.0.4",
100
+ "lint-staged": "^12.3.3",
101
+ "markdownlint-cli": "^0.31.0",
97
102
  "nyc": "^15.1.0",
98
- "prettier": "^2.4.1",
103
+ "prettier": "^2.5.1",
99
104
  "rimraf": "^3.0.2",
100
- "rollup": "^2.56.3",
105
+ "rollup": "^2.67.0",
101
106
  "rollup-plugin-auto-external": "^2.0.0",
102
- "semantic-release": "^18.0.0",
103
- "ts-node": "^10.3.0",
104
- "tsconfig-paths": "^3.11.0",
107
+ "semantic-release": "^19.0.2",
108
+ "ts-node": "^10.4.0",
109
+ "tsconfig-paths": "^3.12.0",
105
110
  "tslib": "^2.3.1",
106
- "typescript": "^4.4.4"
111
+ "typescript": "^4.5.5"
107
112
  },
108
113
  "peerDependencies": {
109
114
  "@typescript-eslint/eslint-plugin": "*",
110
115
  "@typescript-eslint/parser": "*",
111
- "eslint": ">=8.0.0",
112
116
  "eslint-import-resolver-typescript": "*",
113
117
  "eslint-plugin-eslint-comments": "*",
114
118
  "eslint-plugin-functional": "*",
115
119
  "eslint-plugin-import": "*",
116
120
  "eslint-plugin-jsdoc": "*",
117
121
  "eslint-plugin-markdown": "*",
122
+ "eslint-plugin-node": "*",
118
123
  "eslint-plugin-optimize-regex": "*",
119
124
  "eslint-plugin-promise": "*",
120
125
  "eslint-plugin-sonarjs": "*",
121
- "eslint-plugin-unicorn": "*"
126
+ "eslint-plugin-tsdoc": "*",
127
+ "eslint-plugin-unicorn": "*",
128
+ "eslint": ">=8.0.0"
122
129
  },
123
130
  "engines": {
124
131
  "node": "^14.17.0 || >=16.0.0"