n8n/packages/design-system/.eslintrc.js
कारतोफ्फेलस्क्रिप्ट™ 17f13b3b6e
ci: Setup eslint-import-resolver-typescript for improved TS linting (#4996)
* Setup stricter linting for typescript

* make `import/no-unresolved` an error everywhere

* use prettier to format `.vscode/settings.default.json`

* address PR comments
2022-12-22 09:55:39 +01:00

55 lines
1.3 KiB
JavaScript

const { sharedOptions } = require('@n8n_io/eslint-config/shared');
/**
* @type {import('@types/eslint').ESLint.ConfigData}
*/
module.exports = {
extends: ['@n8n_io/eslint-config/frontend'],
...sharedOptions(__dirname, 'frontend'),
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'],
},
],
},
},
],
};