Skip to content

Commit

Permalink
Merge pull request #490 from adobe/fixExportedTypes
Browse files Browse the repository at this point in the history
Fix exported types
  • Loading branch information
richiepreece authored Jan 7, 2025
2 parents baa5997 + a5ea1eb commit fac37ef
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module.exports = {
name: 'types',
message: 'Please use relative path import for types instead (ex. ../types).',
},
{
name: 'types/locales',
message: 'Please use relative path import for types instead (ex. ../types/locales).',
},
],
'header/header': [
2,
Expand Down
2 changes: 1 addition & 1 deletion src/locales/numberLocales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import { NumberLocaleCode } from 'types/locales';
import { NumberLocale } from 'vega';

import { NumberLocaleCode } from '../../types/locales';
import arae from './ar-AE.json';
import arbh from './ar-BH.json';
import ardj from './ar-DJ.json';
Expand Down
2 changes: 1 addition & 1 deletion src/locales/timeLocales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import { TimeLocaleCode } from 'types/locales';
import { TimeLocale } from 'vega';

import { TimeLocaleCode } from '../../types/locales';
import areg from './ar-EG.json';
import arsy from './ar-SY.json';
import caes from './ca-ES.json';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/locale.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import { LocaleCode, NumberLocaleCode, TimeLocaleCode } from 'types/locales';
import { NumberLocale, TimeLocale } from 'vega';

import enNumber from '../locales/numberLocales/en-US.json';
import frNumber from '../locales/numberLocales/fr-FR.json';
import enTime from '../locales/timeLocales/en-US.json';
import frTime from '../locales/timeLocales/fr-FR.json';
import { LocaleCode, NumberLocaleCode, TimeLocaleCode } from '../types/locales';
import { getLocale } from './locale';

describe('getLocale()', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
* governing permissions and limitations under the License.
*/
import { numberLocales, timeLocales } from '@locales';
import { NumberLocaleCode, TimeLocaleCode } from 'types/locales';
import { Locale, NumberLocale, TimeLocale } from 'vega';

import { ChartProps } from '../types';
import { NumberLocaleCode, TimeLocaleCode } from '../types/locales';

export const getLocale = (locale: ChartProps['locale'] = 'en-US'): Locale => {
if (typeof locale === 'string') {
Expand Down

0 comments on commit fac37ef

Please sign in to comment.