mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 21:37:32 -08:00
ci: Use eslint-plugin-diff
only on the CI (#4194)
This commit is contained in:
parent
a4f9f041a0
commit
bc42073e28
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||||
*/
|
*/
|
||||||
module.exports = {
|
const config = module.exports = {
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
|
@ -34,13 +34,6 @@ module.exports = {
|
||||||
*/
|
*/
|
||||||
'eslint-plugin-prettier',
|
'eslint-plugin-prettier',
|
||||||
|
|
||||||
/**
|
|
||||||
* Plugin to lint only changes
|
|
||||||
*
|
|
||||||
* https://github.com/paleite/eslint-plugin-diff#plugindiffdiff-recommended
|
|
||||||
*/
|
|
||||||
'eslint-plugin-diff',
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Plugin to allow specifying local ESLint rules.
|
* Plugin to allow specifying local ESLint rules.
|
||||||
* https://github.com/ivov/eslint-plugin-n8n-local-rules
|
* https://github.com/ivov/eslint-plugin-n8n-local-rules
|
||||||
|
@ -77,13 +70,6 @@ module.exports = {
|
||||||
* https://github.com/prettier/eslint-config-prettier
|
* https://github.com/prettier/eslint-config-prettier
|
||||||
*/
|
*/
|
||||||
'eslint-config-prettier',
|
'eslint-config-prettier',
|
||||||
|
|
||||||
/**
|
|
||||||
* Config for eslint-plugin-diff
|
|
||||||
*
|
|
||||||
* https://github.com/paleite/eslint-plugin-diff#plugindiffdiff-recommended
|
|
||||||
*/
|
|
||||||
'plugin:diff/diff',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -385,3 +371,19 @@ module.exports = {
|
||||||
'import/prefer-default-export': 'off',
|
'import/prefer-default-export': 'off',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ('ESLINT_PLUGIN_DIFF_COMMIT' in process.env) {
|
||||||
|
/**
|
||||||
|
* Plugin to lint only changes
|
||||||
|
*
|
||||||
|
* https://github.com/paleite/eslint-plugin-diff#plugindiffdiff-recommended
|
||||||
|
*/
|
||||||
|
config.plugins.push('eslint-plugin-diff');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Config for eslint-plugin-diff
|
||||||
|
*
|
||||||
|
* https://github.com/paleite/eslint-plugin-diff#plugindiffdiff-recommended
|
||||||
|
*/
|
||||||
|
config.extends.push('plugin:diff/diff');
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue