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}
|
|
|
|
*/
|
2021-08-29 04:36:17 -07:00
|
|
|
module.exports = {
|
2022-09-12 02:41:50 -07:00
|
|
|
extends: ['@n8n_io/eslint-config/frontend'],
|
|
|
|
|
2022-12-22 00:55:39 -08:00
|
|
|
...sharedOptions(__dirname, 'frontend'),
|
2022-09-12 02:41:50 -07:00
|
|
|
|
|
|
|
rules: {
|
2023-05-24 01:12:41 -07:00
|
|
|
'n8n-local-rules/dangerously-use-html-string-missing': 'off',
|
|
|
|
|
2022-09-12 02:41:50 -07:00
|
|
|
// TODO: Remove these
|
2023-07-28 09:28:17 -07:00
|
|
|
'import/no-default-export': 'warn',
|
2022-09-12 02:41:50 -07:00
|
|
|
'import/order': 'off',
|
2022-11-15 09:20:54 -08:00
|
|
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
2023-07-28 09:28:17 -07:00
|
|
|
'@typescript-eslint/prefer-optional-chain': 'warn',
|
|
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
|
2022-11-15 09:20:54 -08:00
|
|
|
},
|
|
|
|
|
|
|
|
overrides: [
|
|
|
|
{
|
2022-11-25 01:51:51 -08:00
|
|
|
files: ['src/**/*.stories.ts'],
|
2022-11-15 09:20:54 -08:00
|
|
|
rules: {
|
|
|
|
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-11-25 01:51:51 -08:00
|
|
|
files: ['src/**/*.stories.ts', 'src/**/*.vue', 'src/**/*.spec.ts'],
|
2022-11-15 09:20:54 -08:00
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/naming-convention': [
|
|
|
|
'warn',
|
|
|
|
{
|
|
|
|
selector: ['variable', 'property'],
|
|
|
|
format: ['PascalCase', 'camelCase', 'UPPER_CASE'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['src/components/N8nFormInput/validators.ts'],
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/naming-convention': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
selector: ['property'],
|
|
|
|
format: ['camelCase', 'UPPER_CASE'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2021-08-29 04:36:17 -07:00
|
|
|
};
|