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

PascalCase files #6955

Merged
merged 13 commits into from
Sep 14, 2023
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
globals: {
_: 'readonly'
},
plugins: ['prettier', 'simple-import-sort'],
plugins: ['prettier', 'unicorn', 'simple-import-sort'],
extends: [
'eslint:recommended',
'plugin:compat/recommended',
Expand Down Expand Up @@ -145,6 +145,17 @@ module.exports = {
'no-implicit-coercion': 'error',
//https://eslint.org/docs/rules/no-unneeded-ternary
'no-unneeded-ternary': 'error',
"unicorn/filename-case": [
"error",
{
"cases": {
"pascalCase": true
},
"ignore": [
"^.*\\.js$"
]
}
],
'vue/first-attribute-linebreak': 'error',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"eslint-plugin-playwright": "0.12.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-simple-import-sort": "10.0.0",
"eslint-plugin-unicorn": "44.0.2",
"eslint-plugin-vue": "9.15.0",
"eslint-plugin-you-dont-need-lodash-underscore": "6.12.0",
"eventemitter3": "1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/api/forms/components/controls/Locator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</template>

<script>
import MctTree from '@/ui/layout/mct-tree.vue';
import MctTree from '@/ui/layout/MctTree.vue';

export default {
components: {
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/LADTable/LADTableConfigurationViewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import mount from 'utils/mount';

import LADTableConfigurationComponent from './components/LADTableConfiguration.vue';
import LadTableConfiguration from './components/LadTableConfiguration.vue';

export default function LADTableConfigurationViewProvider(openmct) {
return {
Expand All @@ -46,12 +46,12 @@ export default function LADTableConfigurationViewProvider(openmct) {
{
el: element,
components: {
LADTableConfiguration: LADTableConfigurationComponent
LadTableConfiguration
},
provide: {
openmct
},
template: '<LADTableConfiguration />'
template: '<LadTableConfiguration />'
},
{
app: openmct.app,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/LADTable/LADTableView.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import mount from 'utils/mount';

import LadTable from './components/LADTable.vue';
import LadTable from './components/LadTable.vue';
import LADTableConfiguration from './LADTableConfiguration';

export default class LADTableView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import Vue, { toRaw } from 'vue';

import StalenessUtils from '@/utils/staleness';

import LadRow from './LADRow.vue';
import LadRow from './LadRow.vue';

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/LADTable/components/LadTableSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<script>
import StalenessUtils from '@/utils/staleness';

import LadRow from './LADRow.vue';
import LadRow from './LadRow.vue';

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/clearData/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import mount from 'utils/mount';

import ClearDataAction from './ClearDataAction';
import GlobalClearIndicator from './components/globalClearIndicator.vue';
import GlobalClearIndicator from './components/GlobalClearIndicator.vue';

export default function plugin(appliesToObjects, options = { indicator: true }) {
let installIndicator = options.indicator;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/condition/components/inspector/StyleEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
<script>
import { STYLE_CONSTANTS } from '@/plugins/condition/utils/constants';
import { getStylesWithoutNoneValue } from '@/plugins/condition/utils/styleUtils';
import ToolbarButton from '@/ui/toolbar/components/toolbar-button.vue';
import ToolbarColorPicker from '@/ui/toolbar/components/toolbar-color-picker.vue';
import ToolbarToggleButton from '@/ui/toolbar/components/toolbar-toggle-button.vue';
import ToolbarButton from '@/ui/toolbar/components/ToolbarButton.vue';
import ToolbarColorPicker from '@/ui/toolbar/components/ToolbarColorPicker.vue';
import ToolbarToggleButton from '@/ui/toolbar/components/ToolbarToggleButton.vue';

export default {
name: 'StyleEditor',
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/faultManagement/FaultManagementSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<script>
import SelectField from '@/api/forms/components/controls/SelectField.vue';
import Search from '@/ui/components/search.vue';
import Search from '@/ui/components/Search.vue';

import { FILTER_ITEMS } from './constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
</template>

<script>
import DropHint from './dropHint.vue';
import FrameComponent from './frame.vue';
import ResizeHandle from './resizeHandle.vue';
import DropHint from './DropHint.vue';

Check warning on line 78 in src/plugins/flexibleLayout/components/Container.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/flexibleLayout/components/Container.vue#L78

Added line #L78 was not covered by tests
import FrameComponent from './Frame.vue';
import ResizeHandle from './ResizeHandle.vue';

const MIN_FRAME_SIZE = 5;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@
<script>
import Container from '../utils/container';
import Frame from '../utils/frame';
import ContainerComponent from './container.vue';
import DropHint from './dropHint.vue';
import ResizeHandle from './resizeHandle.vue';
import ContainerComponent from './Container.vue';
import DropHint from './DropHint.vue';
import ResizeHandle from './ResizeHandle.vue';

const MIN_CONTAINER_SIZE = 5;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/flexibleLayout/flexibleLayoutViewProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import mount from 'utils/mount';

import FlexibleLayoutComponent from './components/flexibleLayout.vue';
import FlexibleLayoutComponent from './components/FlexibleLayout.vue';

const FLEXIBLE_LAYOUT_KEY = 'flexible-layout';
export default class FlexibleLayoutViewProvider {
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/imagery/components/Compass/Compass.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template>
<div class="c-compass" :style="`width: 100%; height: 100%`">
<CompassHUD
<compass-hud
:camera-angle-of-view="cameraAngleOfView"
:heading="heading"
:camera-azimuth="cameraAzimuth"
Expand All @@ -45,13 +45,13 @@
</template>

<script>
import CompassHUD from './CompassHUD.vue';
import CompassHud from './CompassHud.vue';
import CompassRose from './CompassRose.vue';
import { rotate } from './utils';

export default {
components: {
CompassHUD,
CompassHud,
CompassRose
},
props: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/inspectorViews/elements/ElementsPool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<script>
import _ from 'lodash';

import Search from '../../../ui/components/search.vue';
import Search from '../../../ui/components/Search.vue';

Check warning on line 56 in src/plugins/inspectorViews/elements/ElementsPool.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/inspectorViews/elements/ElementsPool.vue#L56

Added line #L56 was not covered by tests
import ElementItem from './ElementItem.vue';

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/inspectorViews/elements/PlotElementsPool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<script>
import _ from 'lodash';

import Search from '../../../ui/components/search.vue';
import Search from '../../../ui/components/Search.vue';

Check warning on line 74 in src/plugins/inspectorViews/elements/PlotElementsPool.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/inspectorViews/elements/PlotElementsPool.vue#L74

Added line #L74 was not covered by tests
import configStore from '../../plot/configuration/ConfigStore';
import ElementItem from './ElementItem.vue';
import ElementItemGroup from './ElementItemGroup.vue';
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/inspectorViews/styles/StylesInspectorView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
<script>
import StylesView from '@/plugins/condition/components/inspector/StylesView.vue';

import multipane from '../../../ui/layout/multipane.vue';
import pane from '../../../ui/layout/pane.vue';
import Multipane from '../../../ui/layout/Multipane.vue';
import Pane from '../../../ui/layout/Pane.vue';
import SavedStylesInspectorView from './SavedStylesInspectorView.vue';

export default {
components: {
multipane,
pane,
Multipane,
Pane,
StylesView,
SavedStylesInspectorView
},
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/notebook/components/Notebook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<script>
import { debounce } from 'lodash';

import Search from '@/ui/components/search.vue';
import Search from '@/ui/components/Search.vue';

import ProgressBar from '../../../ui/components/ProgressBar.vue';
import objectLink from '../../../ui/mixins/object-link';
Expand All @@ -184,7 +184,6 @@ import {
import NotebookEntry from './NotebookEntry.vue';
import SearchResults from './SearchResults.vue';
import Sidebar from './Sidebar.vue';

function objectCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import mount from 'utils/mount';

import TabsComponent from './components/tabs.vue';
import TabsComponent from './components/Tabs.vue';

const TABS_KEY = 'tabs';
export default class Tabs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import mount from 'utils/mount';

import TableConfigurationComponent from './components/table-configuration.vue';
import TableConfigurationComponent from './components/TableConfiguration.vue';
import TelemetryTableConfiguration from './TelemetryTableConfiguration';

export default function TableConfigurationViewProvider(openmct) {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/telemetryTable/TelemetryTableView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mount from 'utils/mount';

import TableComponent from './components/table.vue';
import TableComponent from './components/Table.vue';
import TelemetryTable from './TelemetryTable';

export default class TelemetryTableView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@

import CSVExporter from '../../../exporters/CSVExporter.js';
import ProgressBar from '../../../ui/components/ProgressBar.vue';
import search from '../../../ui/components/search.vue';
import Search from '../../../ui/components/Search.vue';
import ToggleSwitch from '../../../ui/components/ToggleSwitch.vue';
import SizingRow from './sizing-row.vue';
import TableColumnHeader from './table-column-header.vue';
import TableFooterIndicator from './table-footer-indicator.vue';
import TelemetryTableRow from './table-row.vue';
import SizingRow from './SizingRow.vue';
import TableColumnHeader from './TableColumnHeader.vue';
import TableFooterIndicator from './TableFooterIndicator.vue';
import TelemetryTableRow from './TableRow.vue';

Check warning on line 286 in src/plugins/telemetryTable/components/Table.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/telemetryTable/components/Table.vue#L285-L286

Added lines #L285 - L286 were not covered by tests

const VISIBLE_ROW_COUNT = 100;
const ROW_HEIGHT = 17;
Expand All @@ -294,7 +294,7 @@
components: {
TelemetryTableRow,
TableColumnHeader,
search,
Search,

Check warning on line 297 in src/plugins/telemetryTable/components/Table.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/telemetryTable/components/Table.vue#L297

Added line #L297 was not covered by tests
TableFooterIndicator,
ToggleSwitch,
SizingRow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</template>

<script>
import TableCell from './table-cell.vue';
import TableCell from './TableCell.vue';

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timeConductor/ConductorInputsFixed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import _ from 'lodash';

import { TIME_CONTEXT_EVENTS } from '../../api/time/constants';
import TimePopupFixed from './timePopupFixed.vue';
import TimePopupFixed from './TimePopupFixed.vue';

export default {
components: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timeConductor/ConductorInputsRealtime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import _ from 'lodash';

import { TIME_CONTEXT_EVENTS } from '../../api/time/constants';
import TimePopupRealtime from './timePopupRealtime.vue';
import TimePopupRealtime from './TimePopupRealtime.vue';

const DEFAULT_DURATION_FORMATTER = 'duration';

Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/ui/layout/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ import Toolbar from '../toolbar/Toolbar.vue';
import AppLogo from './AppLogo.vue';
import BrowseBar from './BrowseBar.vue';
import CreateButton from './CreateButton.vue';
import MctTree from './mct-tree.vue';
import multipane from './multipane.vue';
import pane from './pane.vue';
import MctTree from './MctTree.vue';
import Multipane from './Multipane.vue';
import Pane from './Pane.vue';
import RecentObjectsList from './RecentObjectsList.vue';
import GrandSearch from './search/GrandSearch.vue';
import Indicators from './status-bar/Indicators.vue';
Expand All @@ -174,8 +174,8 @@ export default {
ObjectView,
CreateButton,
GrandSearch,
multipane,
pane,
Multipane,
Pane,
BrowseBar,
Toolbar,
AppLogo,
Expand Down
8 changes: 4 additions & 4 deletions src/ui/layout/mct-tree.vue → src/ui/layout/MctTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
import _ from 'lodash';
import { markRaw, reactive } from 'vue';

import search from '../components/search.vue';
import treeItem from './tree-item.vue';
import Search from '../components/Search.vue';
import TreeItem from './TreeItem.vue';

const ITEM_BUFFER = 25;
const LOCAL_STORAGE_KEY__TREE_EXPANDED = 'mct-tree-expanded';
Expand All @@ -130,8 +130,8 @@
export default {
name: 'MctTree',
components: {
search,
treeItem
Search,
TreeItem

Check warning on line 134 in src/ui/layout/MctTree.vue

View check run for this annotation

Codecov / codecov/patch

src/ui/layout/MctTree.vue#L134

Added line #L134 was not covered by tests
},
inject: ['openmct'],
props: {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/ui/layout/tree-item.vue → src/ui/layout/TreeItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@

<script>
import ObjectLabel from '../components/ObjectLabel.vue';
import viewControl from '../components/viewControl.vue';
import ViewControl from '../components/ViewControl.vue';

Check warning on line 66 in src/ui/layout/TreeItem.vue

View check run for this annotation

Codecov / codecov/patch

src/ui/layout/TreeItem.vue#L66

Added line #L66 was not covered by tests

export default {
name: 'TreeItem',
components: {
viewControl,
ViewControl,
ObjectLabel
},
inject: ['openmct'],
Expand Down
4 changes: 2 additions & 2 deletions src/ui/layout/search/GrandSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
</template>

<script>
import search from '../../components/search.vue';
import Search from '../../components/Search.vue';
import SearchResultsDropDown from './SearchResultsDropDown.vue';

const SEARCH_DEBOUNCE_TIME = 200;

export default {
name: 'GrandSearch',
components: {
search,
Search,

Check warning on line 47 in src/ui/layout/search/GrandSearch.vue

View check run for this annotation

Codecov / codecov/patch

src/ui/layout/search/GrandSearch.vue#L47

Added line #L47 was not covered by tests
SearchResultsDropDown
},
inject: ['openmct'],
Expand Down
Loading
Loading