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'],
|
|
|
|
|
2021-08-29 04:36:17 -07:00
|
|
|
parserOptions: {
|
2022-09-12 02:41:50 -07:00
|
|
|
project: ['./tsconfig.json'],
|
2022-11-15 09:20:54 -08:00
|
|
|
tsconfigRootDir: __dirname,
|
|
|
|
extraFileExtensions: ['.vue'],
|
2021-08-29 04:36:17 -07:00
|
|
|
},
|
2022-09-12 02:41:50 -07:00
|
|
|
|
|
|
|
rules: {
|
|
|
|
// TODO: Remove these
|
|
|
|
'import/no-default-export': 'off',
|
|
|
|
'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',
|
2022-11-16 07:35:02 -08:00
|
|
|
'@typescript-eslint/prefer-optional-chain': 'off',
|
|
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
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
|
|
|
};
|