@agoric/eslint-config 0.4.1-other-dev-8f8782b.0 → 0.4.1-other-dev-fbe72e7.0.fbe72e7

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.
@@ -0,0 +1,133 @@
1
+ /* eslint-env node */
2
+
3
+ const orchestrationFlowRestrictions = [
4
+ {
5
+ selector: "Identifier[name='heapVowE']",
6
+ message: 'Eventual send is not yet supported within an orchestration flow',
7
+ },
8
+ {
9
+ selector: "Identifier[name='E']",
10
+ message: 'Eventual send is not yet supported within an orchestration flow',
11
+ },
12
+ ];
13
+
14
+ module.exports = {
15
+ extends: [
16
+ 'airbnb-base',
17
+ 'plugin:@endo/recommended',
18
+ 'plugin:jsdoc/recommended',
19
+ 'prettier',
20
+ ],
21
+ plugins: ['import', 'github'],
22
+ rules: {
23
+ 'arrow-body-style': 'off',
24
+ 'arrow-parens': 'off',
25
+ 'no-continue': 'off',
26
+ 'no-await-in-loop': 'off',
27
+ 'implicit-arrow-linebreak': 'off',
28
+ 'function-paren-newline': 'off',
29
+ strict: 'off',
30
+ 'prefer-destructuring': 'off',
31
+ 'prefer-regex-literals': 'off',
32
+ 'no-else-return': 'off',
33
+ 'no-console': 'off',
34
+ 'no-lone-blocks': 'off',
35
+ 'no-unused-vars': [
36
+ 'error',
37
+ {
38
+ argsIgnorePattern: '^_',
39
+ varsIgnorePattern: '^_',
40
+ caughtErrors: 'none', // Needed now that in ESLint v9.0.0, varsIgnorePattern no longer applies to errors in catch clauses
41
+ },
42
+ ],
43
+ 'no-inner-declarations': 'off',
44
+ 'no-loop-func': 'off',
45
+ 'no-param-reassign': 'off',
46
+ 'no-promise-executor-return': 'off', // common to return setTimeout(), we know the value won't be accessible
47
+ 'no-restricted-syntax': ['off'],
48
+ 'no-return-assign': 'off',
49
+ 'no-unused-expressions': 'off',
50
+ 'prefer-arrow-callback': 'off',
51
+ 'default-param-last': 'off', // unaware of TS type annotations
52
+ 'consistent-return': 'off', // unaware of throws. TS detects more reliably.
53
+ 'no-fallthrough': 'warn', // unaware of throws.
54
+ 'no-redeclare': ['error', { builtinGlobals: false }], // Allow redeclaration of built-in globals when explicitly declared
55
+ 'spaced-comment': [
56
+ 'error',
57
+ 'always',
58
+ {
59
+ line: {
60
+ // 'region' for code folding and '/' for TS '///' directive
61
+ markers: ['#region', '#endregion', 'region', 'endregion', '/'],
62
+ },
63
+ },
64
+ ],
65
+
66
+ 'github/array-foreach': 'warn',
67
+
68
+ // Covered faster by TS
69
+ // https://typescript-eslint.io/troubleshooting/typed-linting/performance/#eslint-plugin-import
70
+ 'import/named': 'off',
71
+ 'import/namespace': 'off',
72
+ 'import/default': 'off',
73
+ 'import/no-named-as-default-member': 'off',
74
+ 'import/no-unresolved': 'off', // Plus no-unresolved doesn't support exports maps https://github.com/import-js/eslint-plugin-import/issues/1810
75
+
76
+ 'import/prefer-default-export': 'off',
77
+
78
+ 'jsdoc/no-multi-asterisks': ['warn', { allowWhitespace: true }],
79
+ 'jsdoc/no-undefined-types': 'off',
80
+ 'jsdoc/require-jsdoc': 'off',
81
+ 'jsdoc/require-property-description': 'off',
82
+ 'jsdoc/require-param-description': 'off',
83
+ 'jsdoc/require-returns': 'off',
84
+ 'jsdoc/require-returns-check': 'off', // TS checks
85
+ 'jsdoc/require-returns-description': 'off',
86
+ 'jsdoc/require-yields': 'off',
87
+ 'jsdoc/tag-lines': 'off',
88
+ 'jsdoc/valid-types': 'off',
89
+ // Not severe but the default 'warning' clutters output and it's easy to fix
90
+ 'jsdoc/check-param-names': 'error',
91
+ 'jsdoc/check-syntax': 'error',
92
+
93
+ 'import/extensions': ['warn', 'ignorePackages'],
94
+ 'import/no-extraneous-dependencies': [
95
+ 'error',
96
+ {
97
+ devDependencies: [
98
+ '**/*.config.js',
99
+ '**/*.config.*.js',
100
+ // leading wildcard to work in CLI (package path) and IDE (repo path)
101
+ '**/test/**',
102
+ '**/demo*/**',
103
+ '**/scripts/**',
104
+ ],
105
+ },
106
+ ],
107
+ },
108
+ overrides: [
109
+ {
110
+ files: ['**/*.ts'],
111
+ rules: {
112
+ // Handled better by tsc
113
+ 'import/no-unresolved': 'off',
114
+ 'no-unused-vars': 'off',
115
+ },
116
+ },
117
+ {
118
+ // Zoe contract module
119
+ files: ['**/*.contract.js'],
120
+ rules: {
121
+ '@endo/harden-exports': 'error',
122
+ },
123
+ },
124
+ {
125
+ // Orchestration flows
126
+ files: ['**/*.flows.js'],
127
+ rules: {
128
+ 'no-restricted-syntax': ['error', ...orchestrationFlowRestrictions],
129
+ '@endo/harden-exports': 'error',
130
+ },
131
+ },
132
+ ],
133
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/eslint-config",
3
- "version": "0.4.1-other-dev-8f8782b.0+8f8782b",
3
+ "version": "0.4.1-other-dev-fbe72e7.0.fbe72e7",
4
4
  "description": "Rules used by the @agoric packages",
5
5
  "main": "./eslint-config.cjs",
6
6
  "repository": {
@@ -22,23 +22,23 @@
22
22
  "lint": "exit 0"
23
23
  },
24
24
  "files": [
25
- "eslint-config.json"
25
+ "eslint-config.*"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@endo/eslint-plugin": "0.4.4",
29
- "@jessie.js/eslint-plugin": "^0.3.0",
30
- "@typescript-eslint/parser": "^5.55.0",
31
- "eslint": "^8.36.0",
28
+ "@endo/eslint-plugin": "^2.4.0",
29
+ "@jessie.js/eslint-plugin": "^0.4.2",
30
+ "eslint": "^9.0.0",
32
31
  "eslint-config-airbnb-base": "^15.0.0",
33
32
  "eslint-config-jessie": "^0.0.6",
34
- "eslint-config-prettier": "^8.8.0",
33
+ "eslint-config-prettier": "^9.0.0",
34
+ "eslint-plugin-github": "^5.1.4",
35
35
  "eslint-plugin-import": "^2.25.3",
36
- "eslint-plugin-jsdoc": "^40.1.0",
37
- "eslint-plugin-jsx-a11y": "^6.5.1",
38
- "eslint-plugin-prettier": "^4.2.1",
39
- "eslint-plugin-react": "^7.28.0",
40
- "eslint-plugin-react-hooks": "^4.3.0",
41
- "prettier": "^2.8.1"
36
+ "eslint-plugin-jsdoc": "^46.4.3",
37
+ "prettier": "^3.4.2",
38
+ "typescript-eslint": "^8.17.0"
42
39
  },
43
- "gitHead": "8f8782bc52393e9d4fc82523ecf31cab429b11b3"
40
+ "engines": {
41
+ "node": "^20.9 || ^22.11"
42
+ },
43
+ "gitHead": "fbe72e72107f9997f788674e668c660d92ec4492"
44
44
  }
package/CHANGELOG.md DELETED
@@ -1,264 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [0.4.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.25...@agoric/eslint-config@0.4.0) (2023-05-19)
7
-
8
-
9
- ### Features
10
-
11
- * **eslint-config:** disable no-continue ([c89afca](https://github.com/Agoric/agoric-sdk/commit/c89afca17dbb6a750a1caa12a0daff91138d475b))
12
-
13
-
14
-
15
- ### [0.3.25](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.24...@agoric/eslint-config@0.3.25) (2022-09-20)
16
-
17
- **Note:** Version bump only for package @agoric/eslint-config
18
-
19
-
20
-
21
-
22
-
23
- ### [0.3.24](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.23...@agoric/eslint-config@0.3.24) (2022-04-18)
24
-
25
- **Note:** Version bump only for package @agoric/eslint-config
26
-
27
-
28
-
29
-
30
-
31
- ### [0.3.23](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.22...@agoric/eslint-config@0.3.23) (2022-02-21)
32
-
33
- **Note:** Version bump only for package @agoric/eslint-config
34
-
35
-
36
-
37
-
38
-
39
- ### [0.3.22](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.21...@agoric/eslint-config@0.3.22) (2021-12-02)
40
-
41
-
42
- ### Bug Fixes
43
-
44
- * **eslint-config:** loosen no-extraneous-dependencies patterns ([71be149](https://github.com/Agoric/agoric-sdk/commit/71be149522823ec41900bcf96a0b39f75b38bfd9))
45
-
46
-
47
-
48
- ### [0.3.21](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.20...@agoric/eslint-config@0.3.21) (2021-10-13)
49
-
50
-
51
- ### Bug Fixes
52
-
53
- * **eslint-config:** adapt new JSDoc rules ([91fd093](https://github.com/Agoric/agoric-sdk/commit/91fd093bf95f80e19cde520c920b89c50dbf9782))
54
-
55
-
56
-
57
- ### [0.3.20](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.19...@agoric/eslint-config@0.3.20) (2021-09-23)
58
-
59
- **Note:** Version bump only for package @agoric/eslint-config
60
-
61
-
62
-
63
-
64
-
65
- ### [0.3.19](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.18...@agoric/eslint-config@0.3.19) (2021-09-15)
66
-
67
- **Note:** Version bump only for package @agoric/eslint-config
68
-
69
-
70
-
71
-
72
-
73
- ### [0.3.18](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.17...@agoric/eslint-config@0.3.18) (2021-08-18)
74
-
75
- **Note:** Version bump only for package @agoric/eslint-config
76
-
77
-
78
-
79
-
80
-
81
- ### [0.3.17](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.16...@agoric/eslint-config@0.3.17) (2021-08-17)
82
-
83
- **Note:** Version bump only for package @agoric/eslint-config
84
-
85
-
86
-
87
-
88
-
89
- ### [0.3.16](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.13...@agoric/eslint-config@0.3.16) (2021-08-15)
90
-
91
-
92
- ### Bug Fixes
93
-
94
- * gut `packages/eslint-config` to use `[@jessie](https://github.com/jessie).js` and `[@endo](https://github.com/endo)` ([68a4f7d](https://github.com/Agoric/agoric-sdk/commit/68a4f7d8cbc70bc3d87f7581c7235f8730c32709))
95
-
96
- ### 0.26.10 (2021-07-28)
97
-
98
-
99
-
100
- ### [0.3.15](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.13...@agoric/eslint-config@0.3.15) (2021-08-14)
101
-
102
-
103
- ### Bug Fixes
104
-
105
- * gut `packages/eslint-config` to use `[@jessie](https://github.com/jessie).js` and `[@endo](https://github.com/endo)` ([68a4f7d](https://github.com/Agoric/agoric-sdk/commit/68a4f7d8cbc70bc3d87f7581c7235f8730c32709))
106
-
107
- ### 0.26.10 (2021-07-28)
108
-
109
-
110
-
111
- ### [0.3.14](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.13...@agoric/eslint-config@0.3.14) (2021-07-28)
112
-
113
- **Note:** Version bump only for package @agoric/eslint-config
114
-
115
-
116
-
117
-
118
-
119
- ### [0.3.13](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.12...@agoric/eslint-config@0.3.13) (2021-07-01)
120
-
121
- **Note:** Version bump only for package @agoric/eslint-config
122
-
123
-
124
-
125
-
126
-
127
- ### [0.3.12](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.11...@agoric/eslint-config@0.3.12) (2021-06-28)
128
-
129
- **Note:** Version bump only for package @agoric/eslint-config
130
-
131
-
132
-
133
-
134
-
135
- ### [0.3.11](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.10...@agoric/eslint-config@0.3.11) (2021-06-25)
136
-
137
- **Note:** Version bump only for package @agoric/eslint-config
138
-
139
-
140
-
141
-
142
-
143
- ### [0.3.10](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.9...@agoric/eslint-config@0.3.10) (2021-06-24)
144
-
145
- **Note:** Version bump only for package @agoric/eslint-config
146
-
147
-
148
-
149
-
150
-
151
- ### [0.3.9](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.8...@agoric/eslint-config@0.3.9) (2021-06-23)
152
-
153
- **Note:** Version bump only for package @agoric/eslint-config
154
-
155
-
156
-
157
-
158
-
159
- ### [0.3.8](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.7...@agoric/eslint-config@0.3.8) (2021-06-16)
160
-
161
- **Note:** Version bump only for package @agoric/eslint-config
162
-
163
-
164
-
165
-
166
-
167
- ### [0.3.7](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.6...@agoric/eslint-config@0.3.7) (2021-06-15)
168
-
169
- **Note:** Version bump only for package @agoric/eslint-config
170
-
171
-
172
-
173
-
174
-
175
- ## [0.3.6](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.5...@agoric/eslint-config@0.3.6) (2021-05-10)
176
-
177
- **Note:** Version bump only for package @agoric/eslint-config
178
-
179
-
180
-
181
-
182
-
183
- ## [0.3.5](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.4...@agoric/eslint-config@0.3.5) (2021-05-05)
184
-
185
- **Note:** Version bump only for package @agoric/eslint-config
186
-
187
-
188
-
189
-
190
-
191
- ## [0.3.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.3...@agoric/eslint-config@0.3.4) (2021-05-05)
192
-
193
- **Note:** Version bump only for package @agoric/eslint-config
194
-
195
-
196
-
197
-
198
-
199
- ## [0.3.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.2...@agoric/eslint-config@0.3.3) (2021-04-07)
200
-
201
- **Note:** Version bump only for package @agoric/eslint-config
202
-
203
-
204
-
205
-
206
-
207
- ## [0.3.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.1...@agoric/eslint-config@0.3.2) (2021-04-06)
208
-
209
-
210
- ### Bug Fixes
211
-
212
- * update eslint version ([#2804](https://github.com/Agoric/agoric-sdk/issues/2804)) ([3fc6c5e](https://github.com/Agoric/agoric-sdk/commit/3fc6c5e593f7cdcf5f908365c29cc469e309229d))
213
-
214
-
215
-
216
-
217
-
218
- ## [0.3.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.3.0...@agoric/eslint-config@0.3.1) (2021-03-24)
219
-
220
- **Note:** Version bump only for package @agoric/eslint-config
221
-
222
-
223
-
224
-
225
-
226
- # [0.3.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.2.1...@agoric/eslint-config@0.3.0) (2021-03-16)
227
-
228
-
229
- ### Bug Fixes
230
-
231
- * make separate 'test:xs' target, remove XS from 'test' target ([b9c1a69](https://github.com/Agoric/agoric-sdk/commit/b9c1a6987093fc8e09e8aba7acd2a1618413bac8)), closes [#2647](https://github.com/Agoric/agoric-sdk/issues/2647)
232
-
233
-
234
- ### Features
235
-
236
- * eslint 'use jessie'; detection and first cut at rules ([9ea9909](https://github.com/Agoric/agoric-sdk/commit/9ea99097336ade6bb5645b06a1714e38c7185864))
237
-
238
-
239
-
240
-
241
-
242
- ## [0.2.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.2.0...@agoric/eslint-config@0.2.1) (2021-02-22)
243
-
244
- **Note:** Version bump only for package @agoric/eslint-config
245
-
246
-
247
-
248
-
249
-
250
- # [0.2.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/eslint-config@0.1.1...@agoric/eslint-config@0.2.0) (2021-02-16)
251
-
252
-
253
- ### Features
254
-
255
- * make @agoric/eslint-plugin deal with assert.fail as throw ([f23adee](https://github.com/Agoric/agoric-sdk/commit/f23adee512aec50788d9c9efed1cea9d774dfe8f))
256
- * modified eslint config to forbid the use of for...in loops ([#2423](https://github.com/Agoric/agoric-sdk/issues/2423)) ([1eb65d4](https://github.com/Agoric/agoric-sdk/commit/1eb65d4af52a40e229ec1eefaff0200d3ab6aba0))
257
-
258
-
259
-
260
-
261
-
262
- ## 0.1.1 (2020-12-10)
263
-
264
- **Note:** Version bump only for package @agoric/eslint-config