Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enterprise Search]Allow snake_case variables in server #142881

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,37 @@ module.exports = {
},
},

/**
* Enterprise Search case override
* Allows snake_case variables in the server, because that's how we return API properties
*/
{
files: ['x-pack/plugins/enterprise_search/server/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase', 'snake_case'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},

{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'snake_case'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},

{
selector: 'typeLike',
format: ['PascalCase'],
},
],
},
},

/**
* Code inside .buildkite runs separately from everything else in CI, before bootstrap, with ts-node. It needs a few tweaks because of this.
*/
Expand Down