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