Skip to content

Commit

Permalink
fixing linting issues • minor config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnselmMarie committed Aug 4, 2024
1 parent 895e84e commit 6dcfb37
Show file tree
Hide file tree
Showing 15 changed files with 128 additions and 1,170 deletions.
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --concurrent false --relative
20 changes: 20 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"./apps/**/*.ts(x)": [
"prettier --write",
"eslint --fix"
],
"./libs/**/*.ts(x)": [
"prettier --write",
"eslint --fix"
],
"./apps/**/*.html": [
"eslint --fix",
"prettier --write"
],
"./libs/**/*.html": [
"eslint --fix",
"prettier --write"
],
"./apps/**/*.css": ["prettier --write", "stylelint --write"],
"./libs/**/*.css": ["prettier --write", "stylelint --write"]
}
2 changes: 1 addition & 1 deletion apps/mobile-app/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { withNxMetro } = require('@nx/expo');
const { getDefaultConfig } = require('@expo/metro-config');
const { withNxMetro } = require('@nx/expo');
const { mergeConfig } = require('metro-config');

const defaultConfig = getDefaultConfig(__dirname);
Expand Down
1 change: 1 addition & 0 deletions apps/mobile-app/src/app/App.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';

import { render } from '@testing-library/react-native';

import App from './App';
Expand Down
252 changes: 42 additions & 210 deletions apps/mobile-app/src/app/App.tsx

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion apps/web-app/src/homepage/homepage.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render } from '@testing-library/react';

import { BrowserRouter } from 'react-router-dom';

import App from './homepage';
Expand Down
5 changes: 2 additions & 3 deletions apps/web-app/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { StrictMode } from 'react';

import * as ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';

import App from './app/app';

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
<StrictMode>
<BrowserRouter>
Expand Down
3 changes: 1 addition & 2 deletions apps/web-design-system/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { StorybookConfig } from '@storybook/react-vite';

import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import type { StorybookConfig } from '@storybook/react-vite';
import { mergeConfig } from 'vite';

const config: StorybookConfig = {
Expand Down
6 changes: 3 additions & 3 deletions apps/web-design-system/src/app/app.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { expect } from '@storybook/jest';
import type { Meta, StoryObj } from '@storybook/react';
import { App } from './app';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';

import { App } from './app';

const meta: Meta<typeof App> = {
component: App,
Expand Down
8 changes: 1 addition & 7 deletions apps/web-design-system/src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import styles from './app.module.css';

import NxWelcome from './nx-welcome';

export function App() {
return (
<div>
<NxWelcome title="web-design-system" />
</div>
);
return <div>Hi</div>;
}

export default App;
24 changes: 0 additions & 24 deletions apps/web-design-system/src/app/nx-welcome.stories.tsx

This file was deleted.

Loading

0 comments on commit 6dcfb37

Please sign in to comment.