2023-07-19 00:35:10 -07:00
|
|
|
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
2022-12-22 00:55:39 -08:00
|
|
|
|
2022-09-12 02:41:50 -07:00
|
|
|
/**
|
|
|
|
* @type {import('@types/eslint').ESLint.ConfigData}
|
|
|
|
*/
|
|
|
|
module.exports = {
|
|
|
|
extends: ['@n8n_io/eslint-config/base'],
|
2022-11-09 06:25:00 -08:00
|
|
|
|
2022-12-22 00:55:39 -08:00
|
|
|
...sharedOptions(__dirname),
|
2022-11-09 06:25:00 -08:00
|
|
|
|
2022-09-12 02:41:50 -07:00
|
|
|
rules: {
|
2024-04-10 05:02:02 -07:00
|
|
|
complexity: 'error',
|
|
|
|
|
2023-07-28 09:28:17 -07:00
|
|
|
// TODO: remove these
|
|
|
|
'import/order': 'off',
|
|
|
|
'@typescript-eslint/no-base-to-string': 'warn',
|
|
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
|
|
'@typescript-eslint/no-redundant-type-constituents': 'warn',
|
|
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
|
|
|
|
'@typescript-eslint/prefer-optional-chain': 'warn',
|
2024-01-17 07:08:50 -08:00
|
|
|
/**
|
|
|
|
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/return-await.md
|
|
|
|
*/
|
|
|
|
'@typescript-eslint/return-await': ['error', 'always'],
|
2022-09-12 02:41:50 -07:00
|
|
|
},
|
|
|
|
};
|