mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
feat: Allow eslint-config
to be externally consumable (#6694)
* feat: Allow `eslint-config` to be externally consumable * refactor: Adjust import styles
This commit is contained in:
parent
0a31b8e2b4
commit
3566c13afc
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @type {(dir: string, mode: 'frontend' | undefined) => import('@types/eslint').ESLint.ConfigData}
|
||||
*/
|
||||
exports.sharedOptions = (tsconfigRootDir, mode) => {
|
||||
module.exports = (tsconfigRootDir, mode) => {
|
||||
const isFrontend = mode === 'frontend';
|
||||
const parser = isFrontend ? 'vue-eslint-parser' : '@typescript-eslint/parser';
|
||||
const extraParserOptions = isFrontend
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { sharedOptions } = require('@n8n_io/eslint-config/shared');
|
||||
const sharedOptions = require('@n8n_io/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
|
|
Loading…
Reference in a new issue