Skip to content

Commit

Permalink
Prevent primitive linting limitations from being applied to unit test…
Browse files Browse the repository at this point in the history
…s found under `src/setup_node_env`

Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki committed Feb 9, 2023
1 parent d9dc91d commit 289d288
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ module.exports = {
* Files that run BEFORE node version check
*/
{
files: ['scripts/**/*.js', 'src/setup_node_env/**/*.js'],
files: ['scripts/**/*.js', 'src/setup_node_env/**/!(*.test).js'],
rules: {
'import/no-commonjs': 'off',
'prefer-object-spread/prefer-object-spread': 'off',
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Tests] Bumps `chromedriver` to v107 ([#3017](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3017))
- [Vis Builder] Adds field unit tests ([#3211](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3211))
- [BWC Tests] Add BWC tests for 2.6.0 ([#3356](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3356))
- Prevent primitive linting limitations from being applied to unit tests found under `src/setup_node_env` ([#3403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3403))

## [2.x]

Expand Down
4 changes: 2 additions & 2 deletions src/setup_node_env/root/force.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* under the License.
*/

var forceRoot = require('./force');
const forceRoot = require('./force');

describe('forceRoot', function () {
it('with flag', function () {
Expand All @@ -40,7 +40,7 @@ describe('forceRoot', function () {
});

test('remove argument', function () {
var args = ['--allow-root', 'foo'];
const args = ['--allow-root', 'foo'];
forceRoot(args);
expect(args.includes('--allow-root')).toBeFalsy();
});
Expand Down
2 changes: 1 addition & 1 deletion src/setup_node_env/root/is_root.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* under the License.
*/

var isRoot = require('./is_root');
const isRoot = require('./is_root');

describe('isRoot', function () {
test('0 is root', function () {
Expand Down

0 comments on commit 289d288

Please sign in to comment.