Skip to content

Commit e0e9e65

Browse files
committed
feat(app): chat parsing
1 parent 6d0e715 commit e0e9e65

17 files changed

Lines changed: 14 additions & 143 deletions

File tree

eslint.config.mjs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import tsParser from '@typescript-eslint/parser';
77
import globals from 'globals';
88
import path from 'node:path';
99
import { fileURLToPath } from 'node:url';
10+
import eslintPluginReact from 'eslint-plugin-react';
1011

1112
const __filename = fileURLToPath(import.meta.url);
1213
const __dirname = path.dirname(__filename);
@@ -18,6 +19,7 @@ const compat = new FlatCompat({
1819

1920
export default [
2021
{
22+
files: ['src/**/*.{js,mjs,cjs,ts,jsx,tsx}'],
2123
ignores: [
2224
'**/node_modules',
2325
'**/.github',
@@ -51,15 +53,15 @@ export default [
5153
},
5254
languageOptions: {
5355
globals: {
54-
...globals.browser,
56+
...globals.es2023,
5557
...globals.jest,
5658
...globals.node,
5759
__DEV__: 'readonly',
5860
},
5961
parser: tsParser,
6062
parserOptions: {
6163
project: ['./tsconfig.json'],
62-
tsconfigRootDir: __dirname,
64+
tsconfigRootDir: import.meta.dirname,
6365
},
6466
},
6567
settings: {
@@ -74,26 +76,17 @@ export default [
7476
},
7577
rules: {
7678
'import/no-cycle': 'off',
77-
79+
'import/no-unresolved': ['error'],
7880
'import/extensions': [
7981
'error',
8082
'ignorePackages',
8183
{
8284
js: 'never',
83-
mjs: 'never',
8485
jsx: 'never',
8586
ts: 'never',
8687
tsx: 'never',
8788
},
8889
],
89-
90-
'import/no-unresolved': [
91-
'error',
92-
{
93-
ignore: ['^(part|all):'],
94-
},
95-
],
96-
9790
'import/order': [
9891
'error',
9992
{
@@ -119,7 +112,6 @@ export default [
119112
'react/function-component-definition': 'off',
120113
'import/prefer-default-export': 'off',
121114
'no-unsafe-finally': 'off',
122-
123115
'@typescript-eslint/no-unused-vars': [
124116
'error',
125117
{
@@ -152,7 +144,6 @@ export default [
152144
'@next/next/no-img-element': 'off',
153145
'react/jsx-props-no-spreading': 'off',
154146
'jsx-a11y/anchor-is-valid': 'off',
155-
156147
'comma-dangle': ['error', 'always-multiline'],
157148
'consistent-return': 0,
158149
'function-paren-newline': 0,
@@ -169,7 +160,6 @@ export default [
169160
'object-curly-spacing': ['error', 'always'],
170161
'operator-linebreak': 0,
171162
'quote-props': 0,
172-
173163
'react-hooks/rules-of-hooks': 'error',
174164
'react/jsx-wrap-multilines': [
175165
'error',
@@ -178,12 +168,10 @@ export default [
178168
'react/react-in-jsx-scope': 0,
179169
semi: ['error', 'always'],
180170
'spaced-comment': 0,
181-
182171
'react/prop-types': 'off',
183172
'import/no-extraneous-dependencies': 'off',
184173
'react/require-default-props': 'off',
185174
'react/state-in-constructor': 'off',
186-
187175
'react/no-unescaped-entities': [
188176
'error',
189177
{

src/components/ChatMessage/ChatMessage.tsx

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/components/ChatMessage/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/Modal/Modal.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
/* eslint-disable no-alert */
23
import type { Meta, StoryObj } from '@storybook/react';
34
import { View } from 'react-native';

src/components/ScrollToTop/ScrollToTop.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
/* eslint-disable no-alert */
23
import type { Meta, StoryObj } from '@storybook/react';
34
import { View } from 'react-native';

src/components/SearchHistory/SearchHistory.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
/* eslint-disable no-alert */
23
import type { Meta, StoryObj } from '@storybook/react';
34
import { View } from 'react-native';

src/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ export * from './BuildDetails';
33
export * from './Button';
44
export * from './CategoryCard';
55
export * from './Chat';
6-
export * from './ChatMessage';
76
export * from './DismissableKeyboard';
87
export * from './EmptyState';
98
export * from './form';

src/hooks/useIsLandscape.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Dimensions } from 'react-native';
44
export const useIsLandscape = () => {
55
const [landscape, setLandscape] = useState(false);
66

7-
Dimensions.addEventListener('change', _ => {
7+
Dimensions.addEventListener('change', () => {
88
setLandscape(Dimensions.get('window').width > 500);
99
});
1010

src/hooks/useScript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
import { useEffect, useState } from 'react';
23

34
export interface ScriptState {

src/services/bttvWsService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const bttvWsService = {
77
const ws = new WebSocket('wss://sockets.betterttv.net/ws');
88

99
ws.onopen = () => {
10-
console.info(`🔴 -> BTTV ws opened`);
10+
console.info('🔴 -> BTTV ws opened');
1111
};
1212

1313
ws.send(

0 commit comments

Comments
 (0)