@agoric/eslint-config 0.4.1-dev-3c781f6.0 → 0.4.1-dev-f581a7e.0

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.
Files changed (2) hide show
  1. package/eslint-config.cjs +96 -0
  2. package/package.json +6 -8
@@ -0,0 +1,96 @@
1
+ /* eslint-env node */
2
+ module.exports = {
3
+ extends: [
4
+ 'airbnb-base',
5
+ 'plugin:@endo/recommended',
6
+ 'plugin:jsdoc/recommended',
7
+ 'prettier',
8
+ ],
9
+ plugins: ['import'],
10
+ rules: {
11
+ 'arrow-body-style': 'off',
12
+ 'arrow-parens': 'off',
13
+ 'no-continue': 'off',
14
+ 'no-await-in-loop': 'off',
15
+ 'implicit-arrow-linebreak': 'off',
16
+ 'function-paren-newline': 'off',
17
+ strict: 'off',
18
+ 'prefer-destructuring': 'off',
19
+ 'prefer-regex-literals': 'off',
20
+ 'no-else-return': 'off',
21
+ 'no-console': 'off',
22
+ 'no-unused-vars': [
23
+ 'error',
24
+ {
25
+ argsIgnorePattern: '^_',
26
+ varsIgnorePattern: '^_',
27
+ },
28
+ ],
29
+ 'no-inner-declarations': 'off',
30
+ 'no-loop-func': 'off',
31
+ 'no-param-reassign': 'off',
32
+ 'no-promise-executor-return': 'off', // common to return setTimeout(), we know the value won't be accessible
33
+ 'no-restricted-syntax': ['off'],
34
+ 'no-return-assign': 'off',
35
+ 'no-unused-expressions': 'off',
36
+ 'prefer-arrow-callback': 'off',
37
+ 'default-param-last': 'off', // unaware of TS type annotations
38
+ 'consistent-return': 'off', // unaware of throws. TS detects more reliably.
39
+ 'no-fallthrough': 'warn', // unaware of throws.
40
+
41
+ 'spaced-comment': [
42
+ 'error',
43
+ 'always',
44
+ {
45
+ line: {
46
+ // 'region' for code folding and '/' for TS '///' directive
47
+ markers: ['#region', '#endregion', 'region', 'endregion', '/'],
48
+ },
49
+ },
50
+ ],
51
+
52
+ // Work around https://github.com/import-js/eslint-plugin-import/issues/1810
53
+ 'import/no-unresolved': ['error', { ignore: ['ava'] }],
54
+ 'import/prefer-default-export': 'off',
55
+
56
+ 'jsdoc/no-multi-asterisks': ['warn', { allowWhitespace: true }],
57
+ 'jsdoc/no-undefined-types': 'off',
58
+ 'jsdoc/require-jsdoc': 'off',
59
+ 'jsdoc/require-property-description': 'off',
60
+ 'jsdoc/require-param-description': 'off',
61
+ 'jsdoc/require-returns': 'off',
62
+ 'jsdoc/require-returns-check': 'off', // TS checks
63
+ 'jsdoc/require-returns-description': 'off',
64
+ 'jsdoc/require-yields': 'off',
65
+ 'jsdoc/tag-lines': 'off',
66
+ 'jsdoc/valid-types': 'off',
67
+ // Not severe but the default 'warning' clutters output and it's easy to fix
68
+ 'jsdoc/check-param-names': 'error',
69
+ 'jsdoc/check-syntax': 'error',
70
+
71
+ 'import/extensions': ['warn', 'ignorePackages'],
72
+ 'import/no-extraneous-dependencies': [
73
+ 'error',
74
+ {
75
+ devDependencies: [
76
+ '**/*.config.js',
77
+ '**/*.config.*.js',
78
+ // leading wildcard to work in CLI (package path) and IDE (repo path)
79
+ '**/test/**',
80
+ '**/demo*/**/*.js',
81
+ '**/scripts/**/*.js',
82
+ ],
83
+ },
84
+ ],
85
+ },
86
+ overrides: [
87
+ {
88
+ files: ['**/*.ts'],
89
+ rules: {
90
+ // Handled better by tsc
91
+ 'import/no-unresolved': 'off',
92
+ 'no-unused-vars': 'off',
93
+ },
94
+ },
95
+ ],
96
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/eslint-config",
3
- "version": "0.4.1-dev-3c781f6.0+3c781f6",
3
+ "version": "0.4.1-dev-f581a7e.0+f581a7e",
4
4
  "description": "Rules used by the @agoric packages",
5
5
  "main": "./eslint-config.cjs",
6
6
  "repository": {
@@ -22,23 +22,21 @@
22
22
  "lint": "exit 0"
23
23
  },
24
24
  "files": [
25
- "eslint-config.json"
25
+ "eslint-config.*"
26
26
  ],
27
27
  "peerDependencies": {
28
28
  "@endo/eslint-plugin": "^0.4.4",
29
- "@jessie.js/eslint-plugin": "^0.3.0",
30
- "@typescript-eslint/parser": "^5.55.0",
29
+ "@jessie.js/eslint-plugin": "^0.4.0",
30
+ "@typescript-eslint/eslint-plugin": "^5.59.11",
31
+ "@typescript-eslint/parser": "^5.59.11",
31
32
  "eslint": "^8.36.0",
32
33
  "eslint-config-airbnb-base": "^15.0.0",
33
34
  "eslint-config-jessie": "^0.0.6",
34
35
  "eslint-config-prettier": "^8.8.0",
35
36
  "eslint-plugin-import": "^2.25.3",
36
37
  "eslint-plugin-jsdoc": "^40.1.0",
37
- "eslint-plugin-jsx-a11y": "^6.5.1",
38
38
  "eslint-plugin-prettier": "^4.2.1",
39
- "eslint-plugin-react": "^7.28.0",
40
- "eslint-plugin-react-hooks": "^4.3.0",
41
39
  "prettier": "^2.8.1"
42
40
  },
43
- "gitHead": "3c781f643c6c321d676272060bdff04fc9dd0fd8"
41
+ "gitHead": "f581a7ec109d157eb2224c94379ff2061d01bc5d"
44
42
  }