Lint: update config to support ESM imports

This commit is contained in:
larabr
2023-06-20 14:23:08 +02:00
parent e07a0c432a
commit 6ef4392fb1

View File

@@ -95,10 +95,14 @@ module.exports = {
// eslint-plugin-import rules:
'import/named': 'error',
'import/extensions': 'error',
'import/extensions': 'off', // temporary: we use them in tests (ESM compliant), but not in the lib (to limit diff)
'import/first': 'off',
'import/no-extraneous-dependencies': ['error', { 'devDependencies': true, 'optionalDependencies': false, 'peerDependencies': false }],
'import/no-unassigned-import': 'error',
'import/no-unresolved': ['error', {
// esm exports not supported: https://github.com/import-js/eslint-plugin-import/issues/1810
ignore: ['openpgp', '@openpgp/noble-hashes', '@openpgp/web-stream-tools', '@openpgp/asmcrypto.js']
}],
'import/prefer-default-export': 'off',
// Custom silencers: