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