mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
d7b3d649d6
👕 Enforce `no-explicit-any` in design-system
57 lines
1.3 KiB
JavaScript
57 lines
1.3 KiB
JavaScript
/**
|
|
* @type {import('@types/eslint').ESLint.ConfigData}
|
|
*/
|
|
module.exports = {
|
|
extends: ['@n8n_io/eslint-config/frontend'],
|
|
|
|
parserOptions: {
|
|
project: ['./tsconfig.json'],
|
|
tsconfigRootDir: __dirname,
|
|
extraFileExtensions: ['.vue'],
|
|
},
|
|
|
|
rules: {
|
|
// TODO: Remove these
|
|
'import/no-default-export': 'off',
|
|
'import/order': 'off',
|
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
'@typescript-eslint/prefer-optional-chain': 'off',
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
},
|
|
|
|
overrides: [
|
|
{
|
|
files: ['src/**/*.stories.ts'],
|
|
rules: {
|
|
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
|
},
|
|
},
|
|
{
|
|
files: ['src/**/*.stories.ts', 'src/**/*.vue', 'src/**/*.spec.ts'],
|
|
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'],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
};
|