insomnia/packages/insomnia-app/.eslintrc.js
Dimitri Mitropoulos 9faf0b3fbb
sanitize all electron.shell.openExternal calls (#3336)
* sanitize all electron.shell.openExternal calls

* adds lint rule to disallow future usage of `openExternal`

* updates to use URL constructor per review feedback
2021-05-12 16:20:52 -04:00

16 lines
713 B
JavaScript

/** @type { import('eslint').Linter.Config } */
module.exports = {
extends: '../../.eslintrc.js',
rules: {
'filenames/match-exported': 'off',
camelcase: 'off',
'@typescript-eslint/array-type': ['error', { default: 'generic', readonly: 'generic' }],
'@typescript-eslint/no-use-before-define': 'off', // TSCONVERSION
'@typescript-eslint/no-explicit-any': 'off', // TSCONVERSION
'no-restricted-properties': ['error', {
property: 'openExternal',
message: 'use the `clickLink` function in `electron-helpers.ts` instead. see https://security.stackexchange.com/questions/225799/dangers-of-electrons-shell-openexternal-on-untrusted-content for more information.',
}],
},
};