mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
13659d036f
* ensure that eslint runs on all frontend code * remove tslint from `design-system` * enable prettier and eslint-prettier for `design-system` * Delete tslint.json * use a single editorconfig for the repo * enable prettier for all code in `design-system` * more linting fixes on design-system * ignore coverage for git and prettier * lintfix on editor-ui
56 lines
1.2 KiB
JavaScript
56 lines
1.2 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-explicit-any': 'warn',
|
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
},
|
|
|
|
overrides: [
|
|
{
|
|
files: ['src/**/*.stories.{js,ts}'],
|
|
rules: {
|
|
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
|
},
|
|
},
|
|
{
|
|
files: ['src/**/*.stories.{js,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'],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
};
|