diff --git a/.prettierignore b/.prettierignore index 30e6091..592e54f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,3 +11,4 @@ dist .prettierignore styleguide CHANGELOG.md +.all-contributorsrc \ No newline at end of file diff --git a/packages/eslint-config/src/rules/namingConvention.ts b/packages/eslint-config/src/rules/namingConvention.ts index 4c9dd01..f3bb675 100644 --- a/packages/eslint-config/src/rules/namingConvention.ts +++ b/packages/eslint-config/src/rules/namingConvention.ts @@ -111,6 +111,15 @@ export const namingRules: Linter.RulesRecord = { match: false, }, }, + { + selector: ['property', 'parameterProperty'], + format: null, + types: ['boolean'], + filter: { + regex: '^_destroy(_|$)', // `_destroy` and `_destroy_*` is used in monolith APIs as a convention + match: true, + }, + }, { selector: ['property', 'parameterProperty'], format: ['camelCase', 'PascalCase', 'snake_case', 'UPPER_CASE'], diff --git a/packages/eslint-config/tests/namingConvention.ts/variables.tsx b/packages/eslint-config/tests/namingConvention.ts/variables.tsx index 420244c..534af90 100644 --- a/packages/eslint-config/tests/namingConvention.ts/variables.tsx +++ b/packages/eslint-config/tests/namingConvention.ts/variables.tsx @@ -11,3 +11,12 @@ function SomeComponent({ icon: Icon, command }) { const { other: Other } = command; const iconComponentRef = null; } + +/** _destroy: true special property */ +saveValue({ id: 'id', _destroy: true }); +cy.wait('@monolithSettings_PUT_/sections/1') + .its('request.body') + .should('deep.equal', { + name: 'section 1', + _destroy_background_image: true, + });